[PATCH 33/43] drm/amd/display: Prevent crash on bring-up

Pillai, Aurabindo Aurabindo.Pillai at amd.com
Wed Mar 13 14:40:49 UTC 2024


[AMD Official Use Only - General]

Might want to avoid bringup in the commit description

--

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

From: Chris Park <chris.park at amd.com>

[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 <mario.limonciello at amd.com>
Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: stable at vger.kernel.org
Reviewed-by: Charlene Liu <charlene.liu at amd.com>
Acked-by: Wayne Lin <wayne.lin at amd.com>
Signed-off-by: Chris Park <chris.park at amd.com>
---
 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20240313/9a35311b/attachment.htm>


More information about the amd-gfx mailing list