From: Dillon Varone Date: Fri, 29 Dec 2023 02:36:39 +0000 (-0500) Subject: drm/amd/display: Init link enc resources in dc_state only if res_pool presents X-Git-Tag: v6.7.3~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da37d00c636966c8a0856417d02cb79811b61692;p=thirdparty%2Fkernel%2Fstable.git drm/amd/display: Init link enc resources in dc_state only if res_pool presents [ Upstream commit aa36d8971fccb55ef3241cbfff9d1799e31d8628 ] [Why & How] res_pool is not initialized in all situations such as virtual environments, and therefore link encoder resources should not be initialized if res_pool is NULL. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Martin Leung Acked-by: Alex Hung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index c16190a108838..990d775e4cea2 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -3774,7 +3774,8 @@ void dc_resource_state_construct( dst_ctx->clk_mgr = dc->clk_mgr; /* Initialise DIG link encoder resource tracking variables. */ - link_enc_cfg_init(dc, dst_ctx); + if (dc->res_pool) + link_enc_cfg_init(dc, dst_ctx); }