drm/amd/display: Fix DMUB errors introduced by DML2
Subsystems (3)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +5 -4
@@ -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); }
Signature · 1 line
2.42.0
Harry Wentland
maintainerQuoted 20 lines · Rodrigo Siqueira
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 <[email protected]>Cc Roman Li <[email protected]>Cc Qingqing Zhuo <[email protected]>Cc Daniel Wheeler <[email protected]>Cc Alex Deucher <[email protected]>Fixes 7966f319c66d ("drm/amd/display: Introduce DML2")Signed-off-by Rodrigo Siqueira <[email protected]>--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/display/dc/core/dc_resource.c +0
-0
drivers/gpu/drm/amd/display/dc/core/dc_resource.c struct resource_pool *dc_create_resource_pool(struct dc *dc, · line 324
Quoted 8 lines
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1
-4@@ -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 )
A better check would be dc->debug.using_dml2
Harry
Quoted 7 lines
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +4
-0+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); }
[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.
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 <[email protected]>
Sent: Friday, October 20, 2023 12:42 PM
To: [email protected]
Cc: Siqueira, Rodrigo <[email protected]>; Prosyak, Vitaly <[email protected]>; Li, Roman <[email protected]>; Zhuo, Lillian <[email protected]>; Wheeler, Daniel <[email protected]>; Deucher, Alexander <[email protected]>
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.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +5 -4
@@ -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