diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2017-05-11 19:09:49 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-24 18:32:51 -0400 |
commit | b5ab16bf64347ebc9dbdc51a4f603511babda1e6 (patch) | |
tree | 1c552a654580e0925a570accd29c7e9e411e3070 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | cd70f3d6e3fa816d516a22347292c4eda07cf8ee (diff) |
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.c | 22 |
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) | |||
1462 | (const struct gpu_info_firmware_v1_0 *)(fw->data + | 1462 | (const struct gpu_info_firmware_v1_0 *)(fw->data + |
1463 | le32_to_cpu(hdr->header.ucode_array_offset_bytes)); | 1463 | le32_to_cpu(hdr->header.ucode_array_offset_bytes)); |
1464 | 1464 | ||
1465 | adev->gfx.config.max_shader_engines = gpu_info_fw->gc_num_se; | 1465 | adev->gfx.config.max_shader_engines = le32_to_cpu(gpu_info_fw->gc_num_se); |
1466 | adev->gfx.config.max_cu_per_sh = gpu_info_fw->gc_num_cu_per_sh; | 1466 | adev->gfx.config.max_cu_per_sh = le32_to_cpu(gpu_info_fw->gc_num_cu_per_sh); |
1467 | adev->gfx.config.max_sh_per_se = gpu_info_fw->gc_num_sh_per_se; | 1467 | adev->gfx.config.max_sh_per_se = le32_to_cpu(gpu_info_fw->gc_num_sh_per_se); |
1468 | adev->gfx.config.max_backends_per_se = gpu_info_fw->gc_num_rb_per_se; | 1468 | adev->gfx.config.max_backends_per_se = le32_to_cpu(gpu_info_fw->gc_num_rb_per_se); |
1469 | adev->gfx.config.max_texture_channel_caches = | 1469 | adev->gfx.config.max_texture_channel_caches = |
1470 | gpu_info_fw->gc_num_tccs; | 1470 | le32_to_cpu(gpu_info_fw->gc_num_tccs); |
1471 | adev->gfx.config.max_gprs = gpu_info_fw->gc_num_gprs; | 1471 | adev->gfx.config.max_gprs = le32_to_cpu(gpu_info_fw->gc_num_gprs); |
1472 | adev->gfx.config.max_gs_threads = gpu_info_fw->gc_num_max_gs_thds; | 1472 | adev->gfx.config.max_gs_threads = le32_to_cpu(gpu_info_fw->gc_num_max_gs_thds); |
1473 | adev->gfx.config.gs_vgt_table_depth = gpu_info_fw->gc_gs_table_depth; | 1473 | adev->gfx.config.gs_vgt_table_depth = le32_to_cpu(gpu_info_fw->gc_gs_table_depth); |
1474 | adev->gfx.config.gs_prim_buffer_depth = gpu_info_fw->gc_gsprim_buff_depth; | 1474 | adev->gfx.config.gs_prim_buffer_depth = le32_to_cpu(gpu_info_fw->gc_gsprim_buff_depth); |
1475 | adev->gfx.config.double_offchip_lds_buf = | 1475 | adev->gfx.config.double_offchip_lds_buf = |
1476 | gpu_info_fw->gc_double_offchip_lds_buffer; | 1476 | le32_to_cpu(gpu_info_fw->gc_double_offchip_lds_buffer); |
1477 | adev->gfx.cu_info.wave_front_size = gpu_info_fw->gc_wave_size; | 1477 | adev->gfx.cu_info.wave_front_size = le32_to_cpu(gpu_info_fw->gc_wave_size); |
1478 | break; | 1478 | break; |
1479 | } | 1479 | } |
1480 | default: | 1480 | default: |