[PATCH] drm/amd/display: Fix DMUB errors introduced by DML2

Wheeler, Daniel Daniel.Wheeler at amd.com
Fri Oct 20 19:21:16 UTC 2023


[Public]

Hi all,

I verified that this fix solved both a GPU init error and a hubbub2_get_dchub_ref_freq warning when re-enabling the amdgpu module.

Tested-by: Daniel Wheeler <daniel.wheeler at amd.com>

Thank you,

Dan Wheeler
Sr. Technologist  |  AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
Facebook |  Twitter |  amd.com


-----Original Message-----
From: Siqueira, Rodrigo <Rodrigo.Siqueira at amd.com>
Sent: Friday, October 20, 2023 12:42 PM
To: amd-gfx at lists.freedesktop.org
Cc: Siqueira, Rodrigo <Rodrigo.Siqueira at amd.com>; Prosyak, Vitaly <Vitaly.Prosyak at amd.com>; Li, Roman <Roman.Li at amd.com>; Zhuo, Lillian <Qingqing.Zhuo at amd.com>; Wheeler, Daniel <Daniel.Wheeler at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH] drm/amd/display: Fix DMUB errors introduced by DML2

When DML 2 was introduced, it changed part of the generic sequence of DC, which caused issues on previous DCNs with DMUB support. This commit ensures the new sequence only works for new DCNs from 3.5 and above.

Cc: Vitaly Prosyak <vprosyak at amd.com>
Cc: Roman Li <roman.li at amd.com>
Cc: Qingqing Zhuo <Qingqing.Zhuo at amd.com>
Cc: Daniel Wheeler <daniel.wheeler at amd.com>
Cc: Alex Deucher <alexander.deucher at amd.com>
Fixes: 7966f319c66d ("drm/amd/display: Introduce DML2")
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 97f402123fbb..73cc6e1b0e65 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -321,10 +321,11 @@ struct resource_pool *dc_create_resource_pool(struct dc  *dc,
                                res_pool->ref_clocks.xtalin_clock_inKhz;
                        res_pool->ref_clocks.dchub_ref_clock_inKhz =
                                res_pool->ref_clocks.xtalin_clock_inKhz;
-                       if (res_pool->hubbub && res_pool->hubbub->funcs->get_dchub_ref_freq)
-                               res_pool->hubbub->funcs->get_dchub_ref_freq(res_pool->hubbub,
-                                       res_pool->ref_clocks.dccg_ref_clock_inKhz,
-                                       &res_pool->ref_clocks.dchub_ref_clock_inKhz);
+                       if (dc_version >= DCN_VERSION_3_5)
+                               if (res_pool->hubbub && res_pool->hubbub->funcs->get_dchub_ref_freq)
+                                       res_pool->hubbub->funcs->get_dchub_ref_freq(res_pool->hubbub,
+                                                                                   res_pool->ref_clocks.dccg_ref_clock_inKhz,
+                                                                                   &res_pool->ref_clocks.dchub_ref_clock_inKhz);
                } else
                        ASSERT_CRITICAL(false);
        }
--
2.42.0



More information about the amd-gfx mailing list