diff options
| author | Mario Limonciello <mario.limonciello@amd.com> | 2026-06-12 11:44:43 -0500 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-06-17 16:23:22 -0400 |
| commit | 402e04f11ff75fe4580a6e5f00622b58f4c544b9 (patch) | |
| tree | aa6cc96cff6ba5ec92cc26b13b7b50d1a77f3454 /drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | |
| parent | d3f30034f861a585f8e487ae1555d9f288a96f87 (diff) | |
| download | linux-next-402e04f11ff75fe4580a6e5f00622b58f4c544b9.tar.gz linux-next-402e04f11ff75fe4580a6e5f00622b58f4c544b9.zip | |
drm/amdgpu: Export ip_discovery sysfs on probe failure
When driver probe fails (missing firmware, unsupported hardware, etc.),
the entire device is torn down including the ip_discovery sysfs folder,
preventing users from identifying what hardware is present.
Export ip_discovery sysfs even when probe fails by creating it early
in the probe flow and tying its lifetime to the PCI device rather than
the driver. The sysfs folder persists across probe failures and module
reloads, but is cleaned up on driver unbind.
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index b4120207bfa0..65f2de86fdd2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2557,6 +2557,8 @@ amdgpu_pci_remove(struct pci_dev *pdev) amdgpu_driver_unload_kms(dev); + amdgpu_discovery_sysfs_early_fini(pdev); + /* * Flush any in flight DMA operations from device. * Clear the Bus Master Enable bit and then wait on the PCIe Device |
