From: Hawking Zhang <[email protected]>

Signed-off-by: Hawking Zhang <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 00a668817cb0..6f22e77f908f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1427,6 +1427,15 @@ static int amdgpu_device_parse_gpu_info_fw(struct 
amdgpu_device *adev)
                adev->gfx.cu_info.max_scratch_slots_per_cu =
                        le32_to_cpu(gpu_info_fw->gc_max_scratch_slots_per_cu);
                adev->gfx.cu_info.lds_size = 
le32_to_cpu(gpu_info_fw->gc_lds_size);
+               if (hdr->version_minor == 1) {
+                       const struct gpu_info_firmware_v1_1 *gpu_info_fw =
+                               (const struct gpu_info_firmware_v1_1 
*)(adev->firmware.gpu_info_fw->data +
+                                                                       
le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+                       adev->gfx.config.num_sc_per_sh =
+                               le32_to_cpu(gpu_info_fw->num_sc_per_sh);
+                       adev->gfx.config.num_packer_per_sc =
+                               le32_to_cpu(gpu_info_fw->num_packer_per_sc);
+               }
                break;
        }
        default:
-- 
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to