drm/amd/display: Convert 10kHz clks from PPLib into kHz for Vega
Subsystems (3)
PATCH 1/1 drm/amd/display: Convert 10kHz clks from PPLib into kHz for Vega
The driver is expecting clock frequency in kHz, while SMU returns the values in 10kHz, which causes the bandwidth validation to fail
4.18 has the faulty clock assignment in pp_to_dc_clock_levels_with_latency only, which is only used by Vega. Make sure we multiply these values by 10 here, as we do for other ASICs as powerplay assigned them wrong. 4.19 has the proper fix in powerplay.
---
Alex, please pull this into drm-fixes-4.18.
Harry
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +3 -2
@@ -255,8 +255,9 @@ static void pp_to_dc_clock_levels_with_latency( DC_DECODE_PP_CLOCK_TYPE(dc_clk_type));for (i =0 ; i < clk_level_info->num_levels; i++) { -DRM_DEBUG ("DM_PPLIB:\t %d\n" , pp_clks->data[i].clocks_in_khz); - clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz; +DRM_DEBUG ("DM_PPLIB:\t %d in 10kHz\n" , pp_clks->data[i].clocks_in_khz); +/* translate 10kHz to kHz */ + clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz *10 ; clk_level_info->data[i].latency_in_us = pp_clks->data[i].latency_in_us; } }
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180712133605.13625-1-harry.wentland-5C7GfCeVMHo@public.gmane.org
Fixing Nicholas's email.
Quoted 26 lines · Harry Wentland
The driver is expecting clock frequency in kHz, while SMU returns the values in 10kHz, which causes the bandwidth validation to fail
4.18 has the faulty clock assignment in
pp_to_dc_clock_levels_with_latencyonly, which is only used by Vega. Make sure we multiply these values by 10 here, as we do for other ASICs as powerplay assigned them wrong. 4.19 has the proper fix in powerplay.Signed-off-by Mikita Lipski <[email protected]>Signed-off-by Harry Wentland <[email protected]>---
Alex, please pull this into drm-fixes-4.18.
Harry
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +0
-0@@ -255,8 +255,9 @@ static void pp_to_dc_clock_levels_with_latency( DC_DECODE_PP_CLOCK_TYPE(dc_clk_type));
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c static void pp_to_dc_clock_levels_with_latency( · line 263
Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +3
-2for (i =0 ; i < clk_level_info->num_levels; i++) { -DRM_DEBUG ("DM_PPLIB:\t %d\n" , pp_clks->data[i].clocks_in_khz); - clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz; +DRM_DEBUG ("DM_PPLIB:\t %d in 10kHz\n" , pp_clks->data[i].clocks_in_khz); +/* translate 10kHz to kHz */ + clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz *10 ; clk_level_info->data[i].latency_in_us = pp_clks->data[i].latency_in_us; } }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 33db9a5d-1ed7-f051-48fe-84522751ac90-5C7GfCeVMHo@public.gmane.org
Quoted 16 lines · Harry Wentland
Fixing Nicholas's email.
Quoted 13 lines · Harry Wentland
The driver is expecting clock frequency in kHz, while SMU returns the values in 10kHz, which causes the bandwidth validation to fail
4.18 has the faulty clock assignment in
pp_to_dc_clock_levels_with_latencyonly, which is only used by Vega. Make sure we multiply these values by 10 here, as we do for other ASICs as powerplay assigned them wrong. 4.19 has the proper fix in powerplay.Signed-off-by Mikita Lipski <[email protected]>Signed-off-by Harry Wentland <[email protected]>---
Alex, please pull this into drm-fixes-4.18.
I assume this fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=107082 ?
Thanks,
Alex
Quoted 13 lines
Quoted 13 lines
Harry
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +0
-0@@ -255,8 +255,9 @@ static void pp_to_dc_clock_levels_with_latency( DC_DECODE_PP_CLOCK_TYPE(dc_clk_type));
Quoted 14 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c static void pp_to_dc_clock_levels_with_latency( · line 263
Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +3
-2for (i =0 ; i < clk_level_info->num_levels; i++) { -DRM_DEBUG ("DM_PPLIB:\t %d\n" , pp_clks->data[i].clocks_in_khz); - clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz; +DRM_DEBUG ("DM_PPLIB:\t %d in 10kHz\n" , pp_clks->data[i].clocks_in_khz); +/* translate 10kHz to kHz */ + clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz *10 ; clk_level_info->data[i].latency_in_us = pp_clks->data[i].latency_in_us; } }_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CADnq5_OFtLZbZEf6hZGjcN+MdtsAckqL=mBZ_L44VW-SSvaAjQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 12 lines · Alex Deucher
Quoted 11 lines · Harry Wentland
Fixing Nicholas's email.
Quoted 8 lines · Harry Wentland
The driver is expecting clock frequency in kHz, while SMU returns the values in 10kHz, which causes the bandwidth validation to fail
4.18 has the faulty clock assignment in
pp_to_dc_clock_levels_with_latencyonly, which is only used by Vega. Make sure we multiply these values by 10 here, as we do for other ASICs as powerplay assigned them wrong. 4.19 has the proper fix in powerplay.
Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by Mikita Lipski <[email protected]>Signed-off-by Harry Wentland <[email protected]>---
Alex, please pull this into drm-fixes-4.18.
I assume this fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=107082 ?
Correct, sending v2.
Harry
Quoted 31 lines
Thanks,
Alex
Quoted 27 lines
Quoted 13 lines
Harry
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +0
-0@@ -255,8 +255,9 @@ static void pp_to_dc_clock_levels_with_latency( DC_DECODE_PP_CLOCK_TYPE(dc_clk_type));drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c static void pp_to_dc_clock_levels_with_latency( · line 263
Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +3
-2for (i =0 ; i < clk_level_info->num_levels; i++) { -DRM_DEBUG ("DM_PPLIB:\t %d\n" , pp_clks->data[i].clocks_in_khz); - clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz; +DRM_DEBUG ("DM_PPLIB:\t %d in 10kHz\n" , pp_clks->data[i].clocks_in_khz); +/* translate 10kHz to kHz */ + clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz *10 ; clk_level_info->data[i].latency_in_us = pp_clks->data[i].latency_in_us; } }_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH v2 1/1 drm/amd/display: Convert 10kHz clks from PPLib into kHz for Vega
In reply to a message not in the archiveThe driver is expecting clock frequency in kHz, while SMU returns the values in 10kHz, which causes the bandwidth validation to fail
4.18 has the faulty clock assignment in pp_to_dc_clock_levels_with_latency only, which is only used by Vega. Make sure we multiply these values by 10 here, as we do for other ASICs as powerplay assigned them wrong. 4.19 has the proper fix in powerplay.
v2: Add Fixes tag
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +3 -2
@@ -255,8 +255,9 @@ static void pp_to_dc_clock_levels_with_latency( DC_DECODE_PP_CLOCK_TYPE(dc_clk_type));for (i =0 ; i < clk_level_info->num_levels; i++) { -DRM_DEBUG ("DM_PPLIB:\t %d\n" , pp_clks->data[i].clocks_in_khz); - clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz; +DRM_DEBUG ("DM_PPLIB:\t %d in 10kHz\n" , pp_clks->data[i].clocks_in_khz); +/* translate 10kHz to kHz */ + clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz *10 ; clk_level_info->data[i].latency_in_us = pp_clks->data[i].latency_in_us; } }
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180712140909.15981-1-harry.wentland-5C7GfCeVMHo@public.gmane.org
Michel Dänzer
Acked-byQuoted 11 lines · Harry Wentland
The driver is expecting clock frequency in kHz, while SMU returns the values in 10kHz, which causes the bandwidth validation to fail
4.18 has the faulty clock assignment in
pp_to_dc_clock_levels_with_latencyonly, which is only used by Vega. Make sure we multiply these values by 10 here, as we do for other ASICs as powerplay assigned them wrong. 4.19 has the proper fix in powerplay.v2: Add Fixes tag
Bugzilla: https://bugs.freedesktop.org/107082
With that fixed,
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Nicholas Kazlauskas
Reviewed-byThis does get called from both dce120 and dce112, but it will also any fix any problems for dce112 as well. Looks fine to me.
Nicholas Kazlauskas
Quoted 25 lines · Harry Wentland
The driver is expecting clock frequency in kHz, while SMU returns the values in 10kHz, which causes the bandwidth validation to fail
4.18 has the faulty clock assignment in
pp_to_dc_clock_levels_with_latencyonly, which is only used by Vega. Make sure we multiply these values by 10 here, as we do for other ASICs as powerplay assigned them wrong. 4.19 has the proper fix in powerplay.v2: Add Fixes tag
Signed-off-by Mikita Lipski <[email protected]>Signed-off-by Harry Wentland <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +0
-0@@ -255,8 +255,9 @@ static void pp_to_dc_clock_levels_with_latency( DC_DECODE_PP_CLOCK_TYPE(dc_clk_type));
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c static void pp_to_dc_clock_levels_with_latency( · line 263
Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +3
-2for (i =0 ; i < clk_level_info->num_levels; i++) { -DRM_DEBUG ("DM_PPLIB:\t %d\n" , pp_clks->data[i].clocks_in_khz); - clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz; +DRM_DEBUG ("DM_PPLIB:\t %d in 10kHz\n" , pp_clks->data[i].clocks_in_khz); +/* translate 10kHz to kHz */ + clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz *10 ; clk_level_info->data[i].latency_in_us = pp_clks->data[i].latency_in_us; } }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH v3 1/1 drm/amd/display: Convert 10kHz clks from PPLib into kHz for Vega
In reply to a message not in the archiveThe driver is expecting clock frequency in kHz, while SMU returns the values in 10kHz, which causes the bandwidth validation to fail
4.18 has the faulty clock assignment in pp_to_dc_clock_levels_with_latency only, which is only used by Vega. Make sure we multiply these values by 10 here, as we do for other ASICs as powerplay assigned them wrong. 4.19 has the proper fix in powerplay.
v2: Add Fixes tag
v3: Fixes -> Bugzilla, with simplified link
Bugzilla: https://bugs.freedesktop.org/107082
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +3 -2
@@ -255,8 +255,9 @@ static void pp_to_dc_clock_levels_with_latency( DC_DECODE_PP_CLOCK_TYPE(dc_clk_type));for (i =0 ; i < clk_level_info->num_levels; i++) { -DRM_DEBUG ("DM_PPLIB:\t %d\n" , pp_clks->data[i].clocks_in_khz); - clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz; +DRM_DEBUG ("DM_PPLIB:\t %d in 10kHz\n" , pp_clks->data[i].clocks_in_khz); +/* translate 10kHz to kHz */ + clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz *10 ; clk_level_info->data[i].latency_in_us = pp_clks->data[i].latency_in_us; } }
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx