aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2017-11-17 03:41:16 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-11-20 18:20:24 -0500
commit8d8258bdab735d9f3c4b78e091ecfbb2b2b1f2ca (patch)
tree00e459b6a50f82f2d03188638106243780ec889d
parent18c437caa5b18a235dd65cec224eab54bebcee65 (diff)
drm/amd/pp: fix typecast error in powerplay.
resulted in unexpected data truncation Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c b/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
index d1af1483c69b..a651ebcf44fd 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
@@ -830,9 +830,9 @@ static int init_over_drive_limits(
830 const ATOM_Tonga_POWERPLAYTABLE *powerplay_table) 830 const ATOM_Tonga_POWERPLAYTABLE *powerplay_table)
831{ 831{
832 hwmgr->platform_descriptor.overdriveLimit.engineClock = 832 hwmgr->platform_descriptor.overdriveLimit.engineClock =
833 le16_to_cpu(powerplay_table->ulMaxODEngineClock); 833 le32_to_cpu(powerplay_table->ulMaxODEngineClock);
834 hwmgr->platform_descriptor.overdriveLimit.memoryClock = 834 hwmgr->platform_descriptor.overdriveLimit.memoryClock =
835 le16_to_cpu(powerplay_table->ulMaxODMemoryClock); 835 le32_to_cpu(powerplay_table->ulMaxODMemoryClock);
836 836
837 hwmgr->platform_descriptor.minOverdriveVDDC = 0; 837 hwmgr->platform_descriptor.minOverdriveVDDC = 0;
838 hwmgr->platform_descriptor.maxOverdriveVDDC = 0; 838 hwmgr->platform_descriptor.maxOverdriveVDDC = 0;