Skip to contentSkip to conversation

drm/amdgpu: Field type update in drm_amdgpu_info_vbios

PATCH In review Jiawei Gu 2 participants 3 messages May 11, 2021 – May 12, 2021

Subsystems (3)
lore
Share & tools
lore

Jiawei Gu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Field type update in drm_amdgpu_info_vbios

Use numeric type serial in drm_amdgpu_info_vbios instead.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
 include/uapi/drm/amdgpu_drm.h           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -1
index 75f34a9008e7..e1008a79b441 100644
@@ -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;
include/uapi/drm/amdgpu_drm.h +1 -1
index 2b487a8d2727..2d9e84658bbc 100644
@@ -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;
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
maintainer Acked-by on v1 1/1
#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

Please update the umr patch as well.

________________________________
From: amd-gfx <[email protected]> on behalf of Jiawei Gu <[email protected]>
Sent: Tuesday, May 11, 2021 1:31 AM
To: [email protected] <[email protected]>
Cc: StDenis, Tom <[email protected]>; Gu, JiaWei (Will) <[email protected]>; [email protected] <[email protected]>; Nieto, David M <[email protected]>
Subject: [PATCH] drm/amdgpu: Field type update in drm_amdgpu_info_vbios

Use numeric type serial in drm_amdgpu_info_vbios instead.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
 include/uapi/drm/amdgpu_drm.h           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -1
index 75f34a9008e7..e1008a79b441 100644
@@ -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;
include/uapi/drm/amdgpu_drm.h +1 -1
index 2b487a8d2727..2d9e84658bbc 100644
@@ -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

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Calexander.deucher%40amd.com%7C9c3ad129089d4585544f08d9143e1892%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637563079204768525%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=efCxiLv4J5KWmoKqy1geARlt%2FJppT1eetVI3R%2FMNfzw%3D&amp;reserved=0

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

author Acked-by Alex Deucher
#2 lore raw

[AMD Official Use Only - Internal Distribution Only]

Done. UMR patch sent out.

Hi Tom,

Please help review it to bring the umr part back.

Thanks in advance!
Jiawei

From: Deucher, Alexander <[email protected]>
Sent: Tuesday, May 11, 2021 9:16 PM
To: Gu, JiaWei (Will) <[email protected]>; [email protected]
Cc: StDenis, Tom <[email protected]>; [email protected]; Nieto, David M <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Field type update in drm_amdgpu_info_vbios

[AMD Official Use Only - Internal Distribution Only]

Please update the umr patch as well.

________________________________
From: amd-gfx <[email protected]<mailto:[email protected]>> on behalf of Jiawei Gu <[email protected]<mailto:[email protected]>>
Sent: Tuesday, May 11, 2021 1:31 AM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: StDenis, Tom <[email protected]<mailto:[email protected]>>; Gu, JiaWei (Will) <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>; Nieto, David M <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amdgpu: Field type update in drm_amdgpu_info_vbios

Use numeric type serial in drm_amdgpu_info_vbios instead.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
 include/uapi/drm/amdgpu_drm.h           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -1
index 75f34a9008e7..e1008a79b441 100644
@@ -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;
include/uapi/drm/amdgpu_drm.h +1 -1
index 2b487a8d2727..2d9e84658bbc 100644
@@ -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

_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Calexander.deucher%40amd.com%7C9c3ad129089d4585544f08d9143e1892%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637563079204768525%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=efCxiLv4J5KWmoKqy1geARlt%2FJppT1eetVI3R%2FMNfzw%3D&amp;reserved=0

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