Skip to content

Commit 72d72e8

Browse files
Chris Parkalexdeucher
authored andcommitted
drm/amd/display: Prevent crash when disable stream
[Why] Disabling stream encoder invokes a function that no longer exists. [How] Check if the function declaration is NULL in disable stream encoder. Cc: Mario Limonciello <[email protected]> Cc: Alex Deucher <[email protected]> Cc: [email protected] Reviewed-by: Charlene Liu <[email protected]> Acked-by: Wayne Lin <[email protected]> Signed-off-by: Chris Park <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent a99d819 commit 72d72e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,8 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)
11851185
if (dccg) {
11861186
dccg->funcs->disable_symclk32_se(dccg, dp_hpo_inst);
11871187
dccg->funcs->set_dpstreamclk(dccg, REFCLK, tg->inst, dp_hpo_inst);
1188-
dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
1188+
if (dccg && dccg->funcs->set_dtbclk_dto)
1189+
dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
11891190
}
11901191
} else if (dccg && dccg->funcs->disable_symclk_se) {
11911192
dccg->funcs->disable_symclk_se(dccg, stream_enc->stream_enc_inst,

0 commit comments

Comments
 (0)