Skip to contentSkip to conversation

accel/amdxdna: Use compatible fdinfo engine key

PATCH Applied Max Zhen 3 participants 3 messages Oct 22 – Oct 23

Subsystems (3)
lore
Share & tools
lore

Max Zhen

author
#0 lore raw

PATCH 1/5 accel/amdxdna: Use compatible fdinfo engine key

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.

Fixes 489a8539ca6f ("accel/amdxdna: Expose NPU device busy time via DRM fdinfo")
---
 Documentation/accel/amdxdna/amdnpu.rst  | 2 +-
 drivers/accel/amdxdna/amdxdna_pci_drv.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/accel/amdxdna/amdnpu.rst +1 -1
index d72af1b51ccf..b0cc481c73ae 100644
@@ -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
drivers/accel/amdxdna/amdxdna_pci_drv.c +2 -2
index edf807c93144..f233eb70a295 100644
@@ -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);
Signature · 1 line
2.34.1
Reviewed-by on v1 1/5
#1 lore raw
Quoted 10 lines · Max Zhen

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.

Fixes 489a8539ca6f ("accel/amdxdna: Expose NPU device busy time via DRM fdinfo")

Thanks!

Quoted 38 lines
---
 Documentation/accel/amdxdna/amdnpu.rst  | 2 +-
 drivers/accel/amdxdna/amdxdna_pci_drv.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/accel/amdxdna/amdnpu.rst +1 -1
index d72af1b51ccf..b0cc481c73ae 100644
@@ -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
drivers/accel/amdxdna/amdxdna_pci_drv.c +2 -3
index edf807c93144..f233eb70a295 100644
@@ -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

maintainer Applied
#2 lore raw

Applied to drm-misc-next.

Quoted 55 lines · Umio-Yasuno - coelacanth_dream
Quoted 10 lines · Max Zhen

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.

Fixes 489a8539ca6f ("accel/amdxdna: Expose NPU device busy time via DRM fdinfo")

Thanks!

Quoted 38 lines
---
  Documentation/accel/amdxdna/amdnpu.rst  | 2 +-
  drivers/accel/amdxdna/amdxdna_pci_drv.c | 4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/accel/amdxdna/amdnpu.rst +1 -1
index d72af1b51ccf..b0cc481c73ae 100644
@@ -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
drivers/accel/amdxdna/amdxdna_pci_drv.c +2 -3
index edf807c93144..f233eb70a295 100644
@@ -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