drm/amdgpu: fix the missed vcn fw version report

Submitted by Huang, Ray on May 23, 2018, 6:13 a.m.

Details

Message ID 1527055996-32237-1-git-send-email-ray.huang@amd.com
State New
Headers show
Series "drm/amdgpu: fix the missed vcn fw version report" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Huang, Ray May 23, 2018, 6:13 a.m.
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>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index 58e4953..87e89cc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -84,6 +84,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;

Comments

Am 23.05.2018 um 08:13 schrieb Huang Rui:
> 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>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> index 58e4953..87e89cc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> @@ -84,6 +84,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;