[PATCH] drm/amdgpu: Field type update in drm_amdgpu_info_vbios

Jiawei Gu Jiawei.Gu at amd.com
Tue May 11 05:31:09 UTC 2021


Use numeric type serial in drm_amdgpu_info_vbios instead.

Signed-off-by: Jiawei Gu <Jiawei.Gu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
 include/uapi/drm/amdgpu_drm.h           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 75f34a9008e7..e1008a79b441 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -871,7 +871,7 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
 			memcpy(vbios_info.vbios_pn, atom_context->vbios_pn, sizeof(atom_context->vbios_pn));
 			vbios_info.version = atom_context->version;
 			memcpy(vbios_info.date, atom_context->date, sizeof(atom_context->date));
-			memcpy(vbios_info.serial, adev->serial, sizeof(adev->serial));
+			vbios_info.serial = adev->unique_id;
 			vbios_info.dev_id = adev->pdev->device;
 			vbios_info.rev_id = adev->pdev->revision;
 			vbios_info.sub_dev_id = atom_context->sub_dev_id;
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index 2b487a8d2727..2d9e84658bbc 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -957,7 +957,7 @@ struct drm_amdgpu_info_vbios {
 	__u8 vbios_pn[64];
 	__u32 version;
 	__u8 date[32];
-	__u8 serial[16];
+	__u64 serial;
 	__u32 dev_id;
 	__u32 rev_id;
 	__u32 sub_dev_id;
-- 
2.17.1



More information about the amd-gfx mailing list