From: =?UTF-8?Q?Christian_K=c3=b6nig?= Subject: Re: print firmware versions on amdgpu sysfs Date: Mon, 29 Apr 2019 14:22:03 +0200 Message-ID: References: <355c6cb6-ccf7-ef6f-4f34-0e978b9effe2@amd.com> Reply-To: christian.koenig-5C7GfCeVMHo@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0456384584==" Return-path: In-Reply-To: Content-Language: en-US List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "amd-gfx" To: "Russell, Kent" , "Deucher, Alexander" , "Lin, Amber" , "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org" Cc: "Freehill, Chris" This is a multi-part message in MIME format. --===============0456384584== Content-Type: multipart/alternative; boundary="------------56D911CAFF7E38DEC613DAD3" Content-Language: en-US This is a multi-part message in MIME format. --------------56D911CAFF7E38DEC613DAD3 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit 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 on behalf of > Deucher, Alexander > *Sent:* Friday, April 26, 2019 12:18:22 PM > *To:* Lin, Amber; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > *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 on behalf of > Lin, Amber > *Sent:* Friday, April 26, 2019 10:14 AM > *To:* amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > *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 > amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > > _______________________________________________ > amd-gfx mailing list > amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx --------------56D911CAFF7E38DEC613DAD3 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit
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> on behalf of Deucher, Alexander <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>
Sent: Friday, April 26, 2019 12:18:22 PM
To: Lin, Amber; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
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 <Amber.Lin-5C7GfCeVMHo@public.gmane.org>
Sent: Friday, April 26, 2019 10:14 AM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
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
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

--------------56D911CAFF7E38DEC613DAD3-- --===============0456384584== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KYW1kLWdmeCBt YWlsaW5nIGxpc3QKYW1kLWdmeEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9hbWQtZ2Z4 --===============0456384584==--