drm/amd/pp: Fix OD feature enable failed on Vega10 workstation cards
Subsystems (2)
PATCH 1/1 drm/amd/pp: Fix OD feature enable failed on Vega10 workstation cards
As hw required, soc clock must large than mclk, So we set max soc clock to OD Max Memory clk.
But on workstation, vbios do not support OD featur, the OD max memory clock is equal to 0. In this case, driver can support underclocking. and set od max memory clock to the value in highest memory dpm level. So the od max memory clock should be less than highest soc clock. and driver should not change the soc clock.
caused by commit ca57b9b0a156
("drm/amd/pp: Allow underclocking when od table is empty in vbios")
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +7 -2
@@ -321,8 +321,12 @@ static int vega10_odn_initial_default_setting(struct pp_hwmgr *hwmgr) odn_table->min_vddc = dep_table[0 ]->entries[0 ].vddc; i = od_table[2 ]->count -1 ; - od_table[2 ]->entries[i].clk = hwmgr->platform_descriptor.overdriveLimit.memoryClock; - od_table[2 ]->entries[i].vddc = odn_table->max_vddc; + od_table[2 ]->entries[i].clk = hwmgr->platform_descriptor.overdriveLimit.memoryClock > od_table[2 ]->entries[i].clk ? + hwmgr->platform_descriptor.overdriveLimit.memoryClock : + od_table[2 ]->entries[i].clk; + od_table[2 ]->entries[i].vddc = odn_table->max_vddc > od_table[2 ]->entries[i].vddc ? + odn_table->max_vddc : + od_table[2 ]->entries[i].vddc;return 0 ; }
@@ -1325,6 +1329,7 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)if (hwmgr->platform_descriptor.overdriveLimit.memoryClock ==0 ) hwmgr->platform_descriptor.overdriveLimit.memoryClock = dpm_table->dpm_levels[dpm_table->count-1 ].value; +vega10_init_dpm_state (&(dpm_table->dpm_state)); data->dpm_table.eclk_table.count =0 ;
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 1 line
But on workstation, vbios do not support OD featur, the OD max memory
With typo "featur" fixed, Reviewed-by: Evan Quan <[email protected]>
Quoted 60 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Tuesday, June 12, 2018 3:09 PM
To: [email protected]
Cc: Zhu, Rex <[email protected]>
Subject: [PATCH] drm/amd/pp: Fix OD feature enable failed on Vega10 workstation cardsAs hw required, soc clock must large than mclk, So we set max soc clock to OD Max Memory clk.
But on workstation, vbios do not support OD featur, the OD max memory clock is equal to 0. In this case, driver can support underclocking. and set od max memory clock to the value in highest memory dpm level. So the od max memory clock should be less than highest soc clock. and driver should not change the soc clock.caused by commit
ca57b9b0a156
("drm/amd/pp: Allow underclocking when od table is empty in vbios")Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +1
-2@@ -321,8 +321,12 @@ static int vega10_odn_initial_default_setting(struct pp_hwmgr *hwmgr) odn_table->min_vddc = dep_table[0]->entries[0].vddc; i = od_table[2 ]->count -1 ; - od_table[2 ]->entries[i].clk = hwmgr- >platform_descriptor.overdriveLimit.memoryClock; - od_table[2 ]->entries[i].vddc = odn_table->max_vddc; + od_table[2]->entries[i].clk = hwmgr-Quoted 2 lines
platform_descriptor.overdriveLimit.memoryClock > od_table[2]- entries[i].clk ?
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +1
-0+ hwmgr-Quoted 1 line
platform_descriptor.overdriveLimit.memoryClock :
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +2
-0+ od_table[2 ]->entries[i].clk; + od_table[2]->entries[i].vddc = odn_table->max_vddc > od_table[2]-Quoted 1 line
entries[i].vddc ?
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +3
-0+ odn_table->max_vddc : + od_table[2 ]->entries[i].vddc;return 0 ; }@@ -1325,6 +1329,7 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)if (hwmgr->platform_descriptor.overdriveLimit.memoryClock ==0 ) hwmgr->platform_descriptor.overdriveLimit.memoryClock = dpm_table->dpm_levels[dpm_table- >count-1].value; +vega10_init_dpm_state (&(dpm_table->dpm_state));
Quoted 8 lines
data->dpm_table.eclk_table.count= 0;
--
1.9.1_______________________________________________
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