[AMD Official Use Only - General]

Might want to avoid bringup in the commit description

--

Regards,
Jay
________________________________
From: Wayne Lin <[email protected]>
Sent: Tuesday, March 12, 2024 5:20 AM
To: [email protected] <[email protected]>
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) 
<[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, 
Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne 
<[email protected]>; Gutierrez, Agustin <[email protected]>; Chung, 
ChiaHsuan (Tom) <[email protected]>; Wu, Hersen <[email protected]>; 
Zuo, Jerry <[email protected]>; Park, Chris <[email protected]>; Limonciello, 
Mario <[email protected]>; Deucher, Alexander 
<[email protected]>; [email protected] <[email protected]>; 
Liu, Charlene <[email protected]>
Subject: [PATCH 33/43] drm/amd/display: Prevent crash on bring-up

From: Chris Park <[email protected]>

[Why]
Disabling stream encoder invokes a function that no longer exists
in bring-up.

[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]>
---
 drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
index 9d5df4c0da59..0ba1feaf96c0 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
@@ -1185,7 +1185,8 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)
                 if (dccg) {
                         dccg->funcs->disable_symclk32_se(dccg, dp_hpo_inst);
                         dccg->funcs->set_dpstreamclk(dccg, REFCLK, tg->inst, 
dp_hpo_inst);
-                       dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
+                       if (dccg && dccg->funcs->set_dtbclk_dto)
+                               dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
                 }
         } else if (dccg && dccg->funcs->disable_symclk_se) {
                 dccg->funcs->disable_symclk_se(dccg, 
stream_enc->stream_enc_inst,
--
2.37.3

Reply via email to