Skip to content

Commit aa36d89

Browse files
Dillon Varonealexdeucher
authored andcommitted
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>
1 parent 3bb9b1f commit aa36d89

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/gpu/drm/amd/display/dc/core/dc_state.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ void dc_state_construct(struct dc *dc, struct dc_state *state)
267267
state->clk_mgr = dc->clk_mgr;
268268

269269
/* Initialise DIG link encoder resource tracking variables. */
270-
link_enc_cfg_init(dc, state);
270+
if (dc->res_pool)
271+
link_enc_cfg_init(dc, state);
271272
}
272273

273274
void dc_state_destruct(struct dc_state *state)

0 commit comments

Comments
 (0)