drm/amdgpu: fix the missed vcn fw version report
authorHuang Rui <ray.huang@amd.com>
Wed, 23 May 2018 03:18:43 +0000 (11:18 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Jun 2018 18:45:20 +0000 (13:45 -0500)
It missed vcn.fw_version setting when init vcn microcode, and it will be used to
report vcn ucode version via amdgpu_firmware_info sysfs interface.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c

index 6fd606f90cb22812e805427d5cbb12647b3230e8..127e87b470ff4da368c8c1feb0576f0b6cb0c62c 100644 (file)
@@ -82,6 +82,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
        }
 
        hdr = (const struct common_firmware_header *)adev->vcn.fw->data;
+       adev->vcn.fw_version = le32_to_cpu(hdr->ucode_version);
        family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
        version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
        version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;