Skip to contentSkip to conversation

drm/amdgpu: Remove duplicate fdinfo fields

PATCH In review Umio Yasuno 2 participants 3 messages Oct 26, 2023 – Oct 27, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu: Remove duplicate fdinfo fields

From: Rob Clark <[email protected]>

Some of the fields that are handled by drm_show_fdinfo() crept back in when rebasing the patch. Remove them again.

Fixes 376c25f8ca47 ("drm/amdgpu: Switch to fdinfo helper")

---

This thread has been inactive for nearly 5 months, so I re-created the patch.

 drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c +0 -3
index 6038b5021..e9b5d1903 100644
@@ -87,9 +87,6 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file)
 	 */
 
 	drm_printf(p, "pasid:\t%u\n", fpriv->vm.pasid);
-	drm_printf(p, "drm-driver:\t%s\n", file->minor->dev->driver->name);
-	drm_printf(p, "drm-pdev:\t%04x:%02x:%02x.%d\n", domain, bus, dev, fn);
-	drm_printf(p, "drm-client-id:\t%llu\n", vm->immediate.fence_context);
 	drm_printf(p, "drm-memory-vram:\t%llu KiB\n", stats.vram/1024UL);
 	drm_printf(p, "drm-memory-gtt: \t%llu KiB\n", stats.gtt/1024UL);
 	drm_printf(p, "drm-memory-cpu: \t%llu KiB\n", stats.cpu/1024UL);
Signature · 1 line
2.42.0
#1 lore raw

PATCH 2/2 drm/amdgpu: Remove unused variables from amdgpu_show_fdinfo

Remove unused variables from amdgpu_show_fdinfo

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c +0 -6
index e9b5d1903..b960ca7ba 100644
@@ -55,21 +55,15 @@ static const char *amdgpu_ip_name[AMDGPU_HW_IP_NUM] = {
 
 void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file)
 {
-	struct amdgpu_device *adev = drm_to_adev(file->minor->dev);
 	struct amdgpu_fpriv *fpriv = file->driver_priv;
 	struct amdgpu_vm *vm = &fpriv->vm;
 
 	struct amdgpu_mem_stats stats;
 	ktime_t usage[AMDGPU_HW_IP_NUM];
-	uint32_t bus, dev, fn, domain;
 	unsigned int hw_ip;
 	int ret;
 
 	memset(&stats, 0, sizeof(stats));
-	bus = adev->pdev->bus->number;
-	domain = pci_domain_nr(adev->pdev->bus);
-	dev = PCI_SLOT(adev->pdev->devfn);
-	fn = PCI_FUNC(adev->pdev->devfn);
 
 	ret = amdgpu_bo_reserve(vm->root.bo, false);
 	if (ret)
Signature · 1 line
2.42.0
maintainer Reviewed-by on v1 1/2
#2 lore raw
In reply to Umio Yasuno

Am 27.10.23 um 00:05 schrieb Umio Yasuno:

Quoted 10 lines

From: Rob Clark <[email protected]>

Some of the fields that are handled by drm_show_fdinfo() crept back in when rebasing the patch. Remove them again.

Fixes 376c25f8ca47 ("drm/amdgpu: Switch to fdinfo helper")
Quoted 21 lines

---

This thread has been inactive for nearly 5 months, so I re-created the patch.

  drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c +0 -3
index 6038b5021..e9b5d1903 100644
@@ -87,9 +87,6 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file)
  	 */
 
  	drm_printf(p, "pasid:\t%u\n", fpriv->vm.pasid);
-	drm_printf(p, "drm-driver:\t%s\n", file->minor->dev->driver->name);
-	drm_printf(p, "drm-pdev:\t%04x:%02x:%02x.%d\n", domain, bus, dev, fn);
-	drm_printf(p, "drm-client-id:\t%llu\n", vm->immediate.fence_context);
  	drm_printf(p, "drm-memory-vram:\t%llu KiB\n", stats.vram/1024UL);
  	drm_printf(p, "drm-memory-gtt: \t%llu KiB\n", stats.gtt/1024UL);
  	drm_printf(p, "drm-memory-cpu: \t%llu KiB\n", stats.cpu/1024UL);