diff options
author | Vijayakumar <vsubbu@nvidia.com> | 2017-03-27 08:09:52 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-28 12:39:13 -0400 |
commit | d066a6fa3cdcff1d767822afb79bc6148add0e24 (patch) | |
tree | a487feae0f53a08cd79d5b86230cfe9187c04b95 /drivers | |
parent | e1c4d19b4cd2462c2f5b8c6653573ea0e6bbe823 (diff) |
gpu: nvgpu: mark bios structures as packed
volt and therm bios structures are not marked packed. In VBIOS
they are packed, so trying to read them as unpacked causes
mismatches. Mark the structures packed to fix the mismatches.
JIRA DNVGPU-221
Change-Id: I0e24cc34e2b206fa90982305dcfa390a2452ea8f
Signed-off-by: Vijayakumar <vsubbu@nvidia.com>
Reviewed-on: http://git-master/r/1329124
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: David Martinez Nieto <dmartineznie@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/bios.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/bios.h b/drivers/gpu/nvgpu/include/nvgpu/bios.h index c6465313..6fbf068c 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/bios.h +++ b/drivers/gpu/nvgpu/include/nvgpu/bios.h | |||
@@ -734,7 +734,7 @@ struct vbios_voltage_device_table_1x_header { | |||
734 | u8 header_size; | 734 | u8 header_size; |
735 | u8 table_entry_size; | 735 | u8 table_entry_size; |
736 | u8 num_table_entries; | 736 | u8 num_table_entries; |
737 | }; | 737 | } __packed; |
738 | 738 | ||
739 | struct vbios_voltage_device_table_1x_entry { | 739 | struct vbios_voltage_device_table_1x_entry { |
740 | u8 type; | 740 | u8 type; |
@@ -745,7 +745,7 @@ struct vbios_voltage_device_table_1x_entry { | |||
745 | u32 param2; | 745 | u32 param2; |
746 | u32 param3; | 746 | u32 param3; |
747 | u32 param4; | 747 | u32 param4; |
748 | }; | 748 | } __packed; |
749 | 749 | ||
750 | #define NV_VBIOS_VOLTAGE_DEVICE_1X_ENTRY_TYPE_INVALID 0x00 | 750 | #define NV_VBIOS_VOLTAGE_DEVICE_1X_ENTRY_TYPE_INVALID 0x00 |
751 | #define NV_VBIOS_VOLTAGE_DEVICE_1X_ENTRY_TYPE_PSV 0x02 | 751 | #define NV_VBIOS_VOLTAGE_DEVICE_1X_ENTRY_TYPE_PSV 0x02 |
@@ -796,13 +796,13 @@ struct vbios_voltage_policy_table_1x_header { | |||
796 | u8 table_entry_size; | 796 | u8 table_entry_size; |
797 | u8 num_table_entries; | 797 | u8 num_table_entries; |
798 | u8 perf_core_vf_seq_policy_idx; | 798 | u8 perf_core_vf_seq_policy_idx; |
799 | }; | 799 | } __packed; |
800 | 800 | ||
801 | struct vbios_voltage_policy_table_1x_entry { | 801 | struct vbios_voltage_policy_table_1x_entry { |
802 | u8 type; | 802 | u8 type; |
803 | u32 param0; | 803 | u32 param0; |
804 | u32 param1; | 804 | u32 param1; |
805 | }; | 805 | } __packed; |
806 | 806 | ||
807 | #define NV_VBIOS_VOLTAGE_POLICY_1X_ENTRY_TYPE_INVALID 0x00 | 807 | #define NV_VBIOS_VOLTAGE_POLICY_1X_ENTRY_TYPE_INVALID 0x00 |
808 | #define NV_VBIOS_VOLTAGE_POLICY_1X_ENTRY_TYPE_SINGLE_RAIL 0x01 | 808 | #define NV_VBIOS_VOLTAGE_POLICY_1X_ENTRY_TYPE_SINGLE_RAIL 0x01 |
@@ -870,7 +870,7 @@ struct therm_channel_1x_header { | |||
870 | u8 board_pri_ch_idx; | 870 | u8 board_pri_ch_idx; |
871 | u8 mem_pri_ch_idx; | 871 | u8 mem_pri_ch_idx; |
872 | u8 pwr_supply_pri_ch_idx; | 872 | u8 pwr_supply_pri_ch_idx; |
873 | }; | 873 | } __packed; |
874 | 874 | ||
875 | struct therm_channel_1x_entry { | 875 | struct therm_channel_1x_entry { |
876 | u8 class_id; | 876 | u8 class_id; |
@@ -878,7 +878,7 @@ struct therm_channel_1x_entry { | |||
878 | u8 param1; | 878 | u8 param1; |
879 | u8 param2; | 879 | u8 param2; |
880 | u8 flags; | 880 | u8 flags; |
881 | }; | 881 | } __packed; |
882 | 882 | ||
883 | #define NV_VBIOS_THERM_CHANNEL_1X_ENTRY_CLASS_DEVICE 0x01 | 883 | #define NV_VBIOS_THERM_CHANNEL_1X_ENTRY_CLASS_DEVICE 0x01 |
884 | 884 | ||