[PATCH] drm/amdgpu/pp: add missing byte swapping in process_pptables_v1_0.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Rex Zhu <Rex.Zhu at amd.com>



Best Regards

Rex



________________________________
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Alex Deucher <alexdeucher at gmail.com>
Sent: Friday, June 29, 2018 2:38 AM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander
Subject: [PATCH] drm/amdgpu/pp: add missing byte swapping in process_pptables_v1_0.c

Values need to be swapped on big endian.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 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 35bd9870ab10..4e1fd5393845 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
@@ -183,10 +183,10 @@ static int get_vddc_lookup_table(
                                         ATOM_Tonga_Voltage_Lookup_Record,
                                         entries, vddc_lookup_pp_tables, i);
                 record->us_calculated = 0;
-               record->us_vdd = atom_record->usVdd;
-               record->us_cac_low = atom_record->usCACLow;
-               record->us_cac_mid = atom_record->usCACMid;
-               record->us_cac_high = atom_record->usCACHigh;
+               record->us_vdd = le16_to_cpu(atom_record->usVdd);
+               record->us_cac_low = le16_to_cpu(atom_record->usCACLow);
+               record->us_cac_mid = le16_to_cpu(atom_record->usCACMid);
+               record->us_cac_high = le16_to_cpu(atom_record->usCACHigh);
         }

         *lookup_table = table;
--
2.13.6

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of Conduct.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180629/57de5d4b/attachment.html>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux