Skip to contentSkip to conversation

print firmware versions on amdgpu sysfs

DISCUSSION Lin, Amber 4 participants 5 messages Apr 26, 2019 – Apr 29, 2019 4 messages not in the archive

lore
Share & tools
lore

Lin, Amber

author
#0 lore raw

Hi Alex,

Currently we retrieve firmware versions from /sys/kernel/debug but this requires debugfs being enabled and superuser privilege. Do you see a concern we add firmware versions to amdgpu sysfs at /sys/class/drm/cardX/device like vbios_version?

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

A message that is not in the archive (sent off-list or not yet received): 355c6cb6-ccf7-ef6f-4f34-0e978b9effe2-5C7GfCeVMHo@public.gmane.org

#2 lore raw

We also expose the firmware versions via ioctl which is what the UMDs uses. If you'd prefer it in sysfs, we could do that too.

Alex

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Lin, Amber <[email protected]>
Sent: Friday, April 26, 2019 10:14 AM
To: [email protected]
Cc: Freehill, Chris
Subject: print firmware versions on amdgpu sysfs

Hi Alex,

Currently we retrieve firmware versions from /sys/kernel/debug but this requires debugfs being enabled and superuser privilege. Do you see a concern we add firmware versions to amdgpu sysfs at /sys/class/drm/cardX/device like vbios_version?

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

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

A message that is not in the archive (sent off-list or not yet received): CY4PR12MB18136C9A3F7719CFD0C50D60F73E0-rpdhrqHFk05Nhq0cRkx5WwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#4 lore raw

The main reasoning and use case for sysfs would be the SMI CLI, since unfortunately there is no ioctl support in there.

Kent

KENT RUSSELL
Sr. Software Engineer | Linux Compute Kernel
1 Commerce Valley Drive East
Markham, ON L3T 7X6
O +(1) 289-695-2122 | Ext 72122
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Deucher, Alexander <[email protected]>
Sent: Friday, April 26, 2019 12:18:22 PM
To: Lin, Amber; [email protected]
Cc: Freehill, Chris
Subject: Re: print firmware versions on amdgpu sysfs

We also expose the firmware versions via ioctl which is what the UMDs uses. If you'd prefer it in sysfs, we could do that too.

Alex

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Lin, Amber <[email protected]>
Sent: Friday, April 26, 2019 10:14 AM
To: [email protected]
Cc: Freehill, Chris
Subject: print firmware versions on amdgpu sysfs

Hi Alex,

Currently we retrieve firmware versions from /sys/kernel/debug but this requires debugfs being enabled and superuser privilege. Do you see a concern we add firmware versions to amdgpu sysfs at /sys/class/drm/cardX/device like vbios_version?

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

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

A message that is not in the archive (sent off-list or not yet received): BN6PR12MB1618CE8C21ED572094D9BB10853E0-/b2+HYfkarRqaFUXYJa4HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#6 lore raw

We just need to keep in mind that sysfs has more restrictions than debugfs.

E.g. one value per file, backward compatibility etc...

Apart from that I don't see any reason to not do it in sysfs.

Christian.

Am 26.04.19 um 20:35 schrieb Russell, Kent:

Quoted 39 lines

The main reasoning and use case for sysfs would be the SMI CLI, since unfortunately there is no ioctl support in there.

Kent

KENT RUSSELL
Sr. Software Engineer | Linux Compute Kernel
1 Commerce Valley Drive East
Markham, ON L3T 7X6
O +(1) 289-695-2122 | Ext 72122
------------------------------------------------------------------------
*From:* amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Deucher, Alexander <[email protected]> *Sent:* Friday, April 26, 2019 12:18:22 PM
*To:* Lin, Amber; [email protected]
*Cc:* Freehill, Chris
*Subject:* Re: print firmware versions on amdgpu sysfs
We also expose the firmware versions via ioctl which is what the UMDs uses.  If you'd prefer it in sysfs, we could do that too.

Alex

------------------------------------------------------------------------
*From:* amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Lin, Amber <[email protected]> *Sent:* Friday, April 26, 2019 10:14 AM
*To:* [email protected]
*Cc:* Freehill, Chris
*Subject:* print firmware versions on amdgpu sysfs
Hi Alex,

Currently we retrieve firmware versions from /sys/kernel/debug but this requires debugfs being enabled and superuser privilege. Do you see a concern we add firmware versions to amdgpu sysfs at /sys/class/drm/cardX/device like vbios_version?

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

Quoted 4 lines

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

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

A message that is not in the archive (sent off-list or not yet received): d6c60e91-4311-069b-0612-03337830481d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

author
#8 lore raw

Thank you Alex and Christian for the feedback. Ori will try to add ioctl into SMI CLI to retrieve firmware versions.

Amber

On 2019-04-29 8:22 a.m., Christian König wrote:
We just need to keep in mind that sysfs has more restrictions than debugfs.

E.g. one value per file, backward compatibility etc...

Apart from that I don't see any reason to not do it in sysfs.

Christian.

Am 26.04.19 um 20:35 schrieb Russell, Kent:
The main reasoning and use case for sysfs would be the SMI CLI, since unfortunately there is no ioctl support in there.

Kent

KENT RUSSELL
Sr. Software Engineer | Linux Compute Kernel
1 Commerce Valley Drive East
Markham, ON L3T 7X6
O +(1) 289-695-2122 | Ext 72122
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org><mailto:[email protected]> on behalf of Deucher, Alexander <[email protected]><mailto:[email protected]>
Sent: Friday, April 26, 2019 12:18:22 PM
To: Lin, Amber; [email protected]<mailto:amd-gfx-PD4FTy7X32lzq7FAFJ/[email protected]>
Cc: Freehill, Chris
Subject: Re: print firmware versions on amdgpu sysfs

We also expose the firmware versions via ioctl which is what the UMDs uses. If you'd prefer it in sysfs, we could do that too.

Alex

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org><mailto:[email protected]> on behalf of Lin, Amber <[email protected]><mailto:[email protected]>
Sent: Friday, April 26, 2019 10:14 AM
To: [email protected]<mailto:[email protected]>
Cc: Freehill, Chris
Subject: print firmware versions on amdgpu sysfs

Hi Alex,

Currently we retrieve firmware versions from /sys/kernel/debug but this requires debugfs being enabled and superuser privilege. Do you see a concern we add firmware versions to amdgpu sysfs at /sys/class/drm/cardX/device like vbios_version?

Regards,
Amber
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

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