summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDillon Varone <dillon.varone@amd.com>2023-12-28 21:36:39 -0500
committerAlex Deucher <alexander.deucher@amd.com>2024-01-18 16:30:00 -0500
commitaa36d8971fccb55ef3241cbfff9d1799e31d8628 (patch)
tree56a5b3531a2720f5840189d977471bcbe67b8983 /drivers/gpu
parent3bb9b1f958c3d986ed90a3ff009f1e77e9553207 (diff)
downloadlinux-aa36d8971fccb55ef3241cbfff9d1799e31d8628.tar.gz
linux-aa36d8971fccb55ef3241cbfff9d1799e31d8628.tar.bz2
linux-aa36d8971fccb55ef3241cbfff9d1799e31d8628.zip
drm/amd/display: Init link enc resources in dc_state only if res_pool presents
[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 <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Martin Leung <martin.leung@amd.com> Acked-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Dillon Varone <dillon.varone@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_state.c b/drivers/gpu/drm/amd/display/dc/core/dc_state.c
index 460a8010c79f..56feee0ff01b 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_state.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_state.c
@@ -267,7 +267,8 @@ void dc_state_construct(struct dc *dc, struct dc_state *state)
state->clk_mgr = dc->clk_mgr;
/* Initialise DIG link encoder resource tracking variables. */
- link_enc_cfg_init(dc, state);
+ if (dc->res_pool)
+ link_enc_cfg_init(dc, state);
}
void dc_state_destruct(struct dc_state *state)