]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd: Fix amdgpu_device_find_parent()
authorMario Limonciello <mario.limonciello@amd.com>
Sat, 30 May 2026 07:16:25 +0000 (09:16 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jun 2026 17:47:12 +0000 (13:47 -0400)
commitfbace613a5a4a910956380c1cc1f49e321e3906a
tree9b8e4ce75f74f0e30291e05ed8d6811b5955fb64
parentee911514a9f8382df08181b5e90702c3284a697e
drm/amd: Fix amdgpu_device_find_parent()

commit eb53125a7ad9 ("drm/amd: Add dedicated helper for
amdgpu_device_find_parent()") created a dedicated helper to find
the parent device outside of the dGPU but it had a logic error
that caused it to walk all the way up the topology and return
the wrong device.

Break out of the loop when the device is found.

Reviewed-by: Alexander Deucher <alexander.deucher@amd.com>
Fixes: eb53125a7ad9 ("drm/amd: Add dedicated helper for amdgpu_device_find_parent()")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c