drm/amdgpu: Export ip_discovery sysfs on probe failure
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 12 Jun 2026 16:44:43 +0000 (11:44 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Jun 2026 20:23:22 +0000 (16:23 -0400)
commit402e04f11ff75fe4580a6e5f00622b58f4c544b9
treeaa6cc96cff6ba5ec92cc26b13b7b50d1a77f3454
parentd3f30034f861a585f8e487ae1555d9f288a96f87
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c