mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V1 1/5] accel/amdxdna: Use compatible fdinfo engine key
@ 2026-10-22 15:57 Max Zhen
  2026-10-23 10:37 ` Umio-Yasuno - coelacanth_dream
  0 siblings, 1 reply; 3+ messages in thread
From: Max Zhen @ 2026-10-22 15:57 UTC (permalink / raw)
  To: ogabbay, quic_jhugo, lizhi.hou, dri-devel, mario.limonciello,
	karol.wachowski
  Cc: Max Zhen, linux-kernel, sonal.santan, Umio Yasuno

The released out-of-tree amdxdna driver uses amdxdna_accel_driver as the
drm-engine key string, which is consumed by several applications.

Use the same key string in the upstream driver to maintain compatibility
with the out-of-tree driver.

Reported-by: Umio Yasuno <coelacanth_dream@protonmail.com>
Closes: https://github.com/amd/xdna-driver/issues/1754
Fixes: 489a8539ca6f ("accel/amdxdna: Expose NPU device busy time via DRM fdinfo")
Signed-off-by: Max Zhen <max.zhen@amd.com>
---
 Documentation/accel/amdxdna/amdnpu.rst  | 2 +-
 drivers/accel/amdxdna/amdxdna_pci_drv.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/accel/amdxdna/amdnpu.rst b/Documentation/accel/amdxdna/amdnpu.rst
index d72af1b51ccf..b0cc481c73ae 100644
--- a/Documentation/accel/amdxdna/amdnpu.rst
+++ b/Documentation/accel/amdxdna/amdnpu.rst
@@ -289,7 +289,7 @@ Example of the output showing the implemented key value pairs:
         drm-driver:	amdxdna_accel_driver
         drm-client-id:	3219
         drm-pdev:	0000:c5:00.1
-        drm-engine-npu: 14003870 ns
+        drm-engine-amdxdna_accel_driver:        14003870 ns
         amdxdna_accel_driver-heap-alloc:	60 KiB
         amdxdna_accel_driver-internal-alloc:	67588 KiB
         amdxdna_accel_driver-external-alloc:	0
diff --git a/drivers/accel/amdxdna/amdxdna_pci_drv.c b/drivers/accel/amdxdna/amdxdna_pci_drv.c
index edf807c93144..f233eb70a295 100644
--- a/drivers/accel/amdxdna/amdxdna_pci_drv.c
+++ b/drivers/accel/amdxdna/amdxdna_pci_drv.c
@@ -284,9 +284,9 @@ static void amdxdna_show_fdinfo(struct drm_printer *p, struct drm_file *filp)
 {
 	struct amdxdna_client *client = filp->driver_priv;
 	size_t heap_usage, external_usage, internal_usage;
-	char *drv_name = filp->minor->dev->driver->name;
+	char *drv_name = "amdxdna_accel_driver";
 
-	drm_printf(p, "drm-engine-npu:\t%llu ns\n",
+	drm_printf(p, "drm-engine-%s:\t%llu ns\n", drv_name,
 		   amdxdna_io_stats_busy_time_ns(client));
 
 	mutex_lock(&client->mm_lock);
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V1 1/5] accel/amdxdna: Use compatible fdinfo engine key
  2026-10-22 15:57 [PATCH V1 1/5] accel/amdxdna: Use compatible fdinfo engine key Max Zhen
@ 2026-10-23 10:37 ` Umio-Yasuno - coelacanth_dream
  2026-10-23 16:10   ` Lizhi Hou
  0 siblings, 1 reply; 3+ messages in thread
From: Umio-Yasuno - coelacanth_dream @ 2026-10-23 10:37 UTC (permalink / raw)
  To: Max Zhen
  Cc: ogabbay, quic_jhugo, lizhi.hou, dri-devel, mario.limonciello,
	karol.wachowski, linux-kernel, sonal.santan


On Friday, October 23rd, 2026 at 0:58, Max Zhen <max.zhen@amd.com> wrote:

> The released out-of-tree amdxdna driver uses amdxdna_accel_driver as the
> drm-engine key string, which is consumed by several applications.
>
> Use the same key string in the upstream driver to maintain compatibility
> with the out-of-tree driver.
>
> Reported-by: Umio Yasuno <coelacanth_dream@protonmail.com>
> Closes: https://github.com/amd/xdna-driver/issues/1754
> Fixes: 489a8539ca6f ("accel/amdxdna: Expose NPU device busy time via DRM fdinfo")
> Signed-off-by: Max Zhen <max.zhen@amd.com>

Reviewed-by: Umio Yasuno <coelacanth_dream@protonmail.com>

Thanks!

> ---
>  Documentation/accel/amdxdna/amdnpu.rst  | 2 +-
>  drivers/accel/amdxdna/amdxdna_pci_drv.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/accel/amdxdna/amdnpu.rst b/Documentation/accel/amdxdna/amdnpu.rst
> index d72af1b51ccf..b0cc481c73ae 100644
> --- a/Documentation/accel/amdxdna/amdnpu.rst
> +++ b/Documentation/accel/amdxdna/amdnpu.rst
> @@ -289,7 +289,7 @@ Example of the output showing the implemented key value pairs:
>          drm-driver:	amdxdna_accel_driver
>          drm-client-id:	3219
>          drm-pdev:	0000:c5:00.1
> -        drm-engine-npu: 14003870 ns
> +        drm-engine-amdxdna_accel_driver:        14003870 ns
>          amdxdna_accel_driver-heap-alloc:	60 KiB
>          amdxdna_accel_driver-internal-alloc:	67588 KiB
>          amdxdna_accel_driver-external-alloc:	0
> diff --git a/drivers/accel/amdxdna/amdxdna_pci_drv.c b/drivers/accel/amdxdna/amdxdna_pci_drv.c
> index edf807c93144..f233eb70a295 100644
> --- a/drivers/accel/amdxdna/amdxdna_pci_drv.c
> +++ b/drivers/accel/amdxdna/amdxdna_pci_drv.c
> @@ -284,9 +284,9 @@ static void amdxdna_show_fdinfo(struct drm_printer *p, struct drm_file *filp)
>  {
>  	struct amdxdna_client *client = filp->driver_priv;
>  	size_t heap_usage, external_usage, internal_usage;
> -	char *drv_name = filp->minor->dev->driver->name;
> +	char *drv_name = "amdxdna_accel_driver";
>
> -	drm_printf(p, "drm-engine-npu:\t%llu ns\n",
> +	drm_printf(p, "drm-engine-%s:\t%llu ns\n", drv_name,
>  		   amdxdna_io_stats_busy_time_ns(client));
>
>  	mutex_lock(&client->mm_lock);
> --
> 2.34.1
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V1 1/5] accel/amdxdna: Use compatible fdinfo engine key
  2026-10-23 10:37 ` Umio-Yasuno - coelacanth_dream
@ 2026-10-23 16:10   ` Lizhi Hou
  0 siblings, 0 replies; 3+ messages in thread
From: Lizhi Hou @ 2026-10-23 16:10 UTC (permalink / raw)
  To: Umio-Yasuno - coelacanth_dream, Max Zhen
  Cc: ogabbay, quic_jhugo, dri-devel, mario.limonciello,
	karol.wachowski, linux-kernel, sonal.santan

Applied to drm-misc-next.

On 10/23/26 03:37, Umio-Yasuno - coelacanth_dream wrote:
> On Friday, October 23rd, 2026 at 0:58, Max Zhen <max.zhen@amd.com> wrote:
>
>> The released out-of-tree amdxdna driver uses amdxdna_accel_driver as the
>> drm-engine key string, which is consumed by several applications.
>>
>> Use the same key string in the upstream driver to maintain compatibility
>> with the out-of-tree driver.
>>
>> Reported-by: Umio Yasuno <coelacanth_dream@protonmail.com>
>> Closes: https://github.com/amd/xdna-driver/issues/1754
>> Fixes: 489a8539ca6f ("accel/amdxdna: Expose NPU device busy time via DRM fdinfo")
>> Signed-off-by: Max Zhen <max.zhen@amd.com>
> Reviewed-by: Umio Yasuno <coelacanth_dream@protonmail.com>
>
> Thanks!
>
>> ---
>>   Documentation/accel/amdxdna/amdnpu.rst  | 2 +-
>>   drivers/accel/amdxdna/amdxdna_pci_drv.c | 4 ++--
>>   2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/accel/amdxdna/amdnpu.rst b/Documentation/accel/amdxdna/amdnpu.rst
>> index d72af1b51ccf..b0cc481c73ae 100644
>> --- a/Documentation/accel/amdxdna/amdnpu.rst
>> +++ b/Documentation/accel/amdxdna/amdnpu.rst
>> @@ -289,7 +289,7 @@ Example of the output showing the implemented key value pairs:
>>           drm-driver:	amdxdna_accel_driver
>>           drm-client-id:	3219
>>           drm-pdev:	0000:c5:00.1
>> -        drm-engine-npu: 14003870 ns
>> +        drm-engine-amdxdna_accel_driver:        14003870 ns
>>           amdxdna_accel_driver-heap-alloc:	60 KiB
>>           amdxdna_accel_driver-internal-alloc:	67588 KiB
>>           amdxdna_accel_driver-external-alloc:	0
>> diff --git a/drivers/accel/amdxdna/amdxdna_pci_drv.c b/drivers/accel/amdxdna/amdxdna_pci_drv.c
>> index edf807c93144..f233eb70a295 100644
>> --- a/drivers/accel/amdxdna/amdxdna_pci_drv.c
>> +++ b/drivers/accel/amdxdna/amdxdna_pci_drv.c
>> @@ -284,9 +284,9 @@ static void amdxdna_show_fdinfo(struct drm_printer *p, struct drm_file *filp)
>>   {
>>   	struct amdxdna_client *client = filp->driver_priv;
>>   	size_t heap_usage, external_usage, internal_usage;
>> -	char *drv_name = filp->minor->dev->driver->name;
>> +	char *drv_name = "amdxdna_accel_driver";
>>
>> -	drm_printf(p, "drm-engine-npu:\t%llu ns\n",
>> +	drm_printf(p, "drm-engine-%s:\t%llu ns\n", drv_name,
>>   		   amdxdna_io_stats_busy_time_ns(client));
>>
>>   	mutex_lock(&client->mm_lock);
>> --
>> 2.34.1
>>
>>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-23 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-22 15:57 [PATCH V1 1/5] accel/amdxdna: Use compatible fdinfo engine key Max Zhen
2026-10-23 10:37 ` Umio-Yasuno - coelacanth_dream
2026-10-23 16:10   ` Lizhi Hou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®