aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2017-05-11 19:09:49 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-05-24 18:32:51 -0400
commitb5ab16bf64347ebc9dbdc51a4f603511babda1e6 (patch)
tree1c552a654580e0925a570accd29c7e9e411e3070 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentdrm/amd/powerplay: PP/DAL interface changes for dynamic clock switch (diff)
downloadlinux-b5ab16bf64347ebc9dbdc51a4f603511babda1e6.tar.gz
linux-b5ab16bf64347ebc9dbdc51a4f603511babda1e6.zip
drm/amdgpu: properly byteswap gpu_info firmware
It's stored in LE format. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 794e14d8e906..a1d631ab8eb9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1462,19 +1462,19 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
(const struct gpu_info_firmware_v1_0 *)(fw->data +
le32_to_cpu(hdr->header.ucode_array_offset_bytes));
- adev->gfx.config.max_shader_engines = gpu_info_fw->gc_num_se;
- adev->gfx.config.max_cu_per_sh = gpu_info_fw->gc_num_cu_per_sh;
- adev->gfx.config.max_sh_per_se = gpu_info_fw->gc_num_sh_per_se;
- adev->gfx.config.max_backends_per_se = gpu_info_fw->gc_num_rb_per_se;
+ adev->gfx.config.max_shader_engines = le32_to_cpu(gpu_info_fw->gc_num_se);
+ adev->gfx.config.max_cu_per_sh = le32_to_cpu(gpu_info_fw->gc_num_cu_per_sh);
+ adev->gfx.config.max_sh_per_se = le32_to_cpu(gpu_info_fw->gc_num_sh_per_se);
+ adev->gfx.config.max_backends_per_se = le32_to_cpu(gpu_info_fw->gc_num_rb_per_se);
adev->gfx.config.max_texture_channel_caches =
- gpu_info_fw->gc_num_tccs;
- adev->gfx.config.max_gprs = gpu_info_fw->gc_num_gprs;
- adev->gfx.config.max_gs_threads = gpu_info_fw->gc_num_max_gs_thds;
- adev->gfx.config.gs_vgt_table_depth = gpu_info_fw->gc_gs_table_depth;
- adev->gfx.config.gs_prim_buffer_depth = gpu_info_fw->gc_gsprim_buff_depth;
+ le32_to_cpu(gpu_info_fw->gc_num_tccs);
+ adev->gfx.config.max_gprs = le32_to_cpu(gpu_info_fw->gc_num_gprs);
+ adev->gfx.config.max_gs_threads = le32_to_cpu(gpu_info_fw->gc_num_max_gs_thds);
+ adev->gfx.config.gs_vgt_table_depth = le32_to_cpu(gpu_info_fw->gc_gs_table_depth);
+ adev->gfx.config.gs_prim_buffer_depth = le32_to_cpu(gpu_info_fw->gc_gsprim_buff_depth);
adev->gfx.config.double_offchip_lds_buf =
- gpu_info_fw->gc_double_offchip_lds_buffer;
- adev->gfx.cu_info.wave_front_size = gpu_info_fw->gc_wave_size;
+ le32_to_cpu(gpu_info_fw->gc_double_offchip_lds_buffer);
+ adev->gfx.cu_info.wave_front_size = le32_to_cpu(gpu_info_fw->gc_wave_size);
break;
}
default:
b83c7e1aa65416520aeee6&follow=1'>l10n: sv.po: Update Swedish translation (4800t0f0u)Peter Krefting1-2282/+2825 2020-01-03l10n: fr.po v2.25.0 rnd 1Jean-Noël Avila1-2271/+2800 2020-01-03l10n: vi(4800t): Updated Vietnamese translation v2.25.0Tran Ngoc Quan1-2273/+2839 2020-01-02commit-graph: prefer default size_mult when given zeroDerrick Stolee2-4/+4 2020-01-02mingw: only test index entries for backslashes, not tree entriesJohannes Schindelin3-9/+9 2020-01-02Git 2.25-rc1v2.25.0-rc1Junio C Hamano2-1/+14 2020-01-02merge-recursive: remove unnecessary oid_eq functionElijah Newren1-22/+11 2020-01-02sparse-checkout: use extern for global variablesDerrick Stolee1-2/+2 2019-12-31l10n: zh_TW.po: update translation for v2.25.0 round 1pan934121-2343/+2974 2019-12-31git-gui: allow opening currently selected file in default appZoli Szabó1-5/+24 2019-12-30sparse-checkout: document interactions with submodulesDerrick Stolee2-0/+38 2019-12-30sparse-checkout: list directories in cone modeDerrick Stolee3-1/+42 2019-12-30l10n: it.po: update the Italian translation for Git 2.25.0Alessandro Menti1-2277/+2854 2019-12-30l10n: git.pot: v2.25.0 round 1 (119 new, 13 removed)Jiang Xin1-2252/+2755 2019-12-27t3008: find test-tool through path lookupJohannes Sixt1-1/+1 2019-12-27l10n: Update Catalan translationJordi Mas1-8/+8 2019-12-26packfile: replace lseek+read with preadEric Wong1-3/+2 2019-12-26doc: log, gitk: line-log arguments must exist in starting revisionPhilippe Blain2-2/+4 2019-12-26doc: log, gitk: document accepted line-log diff formatsPhilippe Blain2-2/+8 2019-12-26packfile: remove redundant fcntl F_GETFD/F_SETFDEric Wong1-11/+0 2019-12-26mailmap: mask accentless variant for Công DanhJunio C Hamano1-0/+1 2019-12-25Git 2.25-rc0v2.25.0-rc0Junio C Hamano2-6/+27 2019-12-21mingw: refuse paths containing reserved namesJohannes Schindelin3-18/+110 2019-12-21mingw: short-circuit the conversion of `/dev/null` to UTF-16Johannes Schindelin1-10/+16 2019-12-20sparse-checkout: improve OS ls compatibilityEd Maste1-14/+22