drm/amd/pp: fix typecast error in powerplay.
Subsystems (2)
PATCH 1/1 drm/amd/pp: fix typecast error in powerplay.
resulted in data truncation
Change-Id I110011ba402a85fade89bb797adcf7318c0f0eb0
Signed-off-by Rex Zhu <[email protected]>
--- drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c +2 -2
@@ -830,9 +830,9 @@ static int init_over_drive_limits( const ATOM_Tonga_POWERPLAYTABLE *powerplay_table) { hwmgr->platform_descriptor.overdriveLimit.engineClock = -le16_to_cpu (powerplay_table->ulMaxODEngineClock); +le32_to_cpu (powerplay_table->ulMaxODEngineClock); hwmgr->platform_descriptor.overdriveLimit.memoryClock = -le16_to_cpu (powerplay_table->ulMaxODMemoryClock); +le32_to_cpu (powerplay_table->ulMaxODMemoryClock); hwmgr->platform_descriptor.minOverdriveVDDC =0 ; hwmgr->platform_descriptor.maxOverdriveVDDC =0 ;
Signature · 6 lines
1.9.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): 1510909144-15464-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Reviewed-byQuoted 4 lines · Rex Zhu
resulted in data truncation
Change-Id I110011ba402a85fade89bb797adcf7318c0f0eb0Signed-off-by Rex Zhu <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
Quoted 23 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c +2
-3@@ -830,9 +830,9 @@ static int init_over_drive_limits( const ATOM_Tonga_POWERPLAYTABLE *powerplay_table) { hwmgr->platform_descriptor.overdriveLimit.engineClock = -le16_to_cpu (powerplay_table->ulMaxODEngineClock); +le32_to_cpu (powerplay_table->ulMaxODEngineClock); hwmgr->platform_descriptor.overdriveLimit.memoryClock = -le16_to_cpu (powerplay_table->ulMaxODMemoryClock); +le32_to_cpu (powerplay_table->ulMaxODMemoryClock); hwmgr->platform_descriptor.minOverdriveVDDC =0 ; hwmgr->platform_descriptor.maxOverdriveVDDC =0 ; --1.9.1
Quoted 4 lines
_______________________________________________
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