]> Gentwo Git Trees - linux/.git/commit
drm/amdgpu: Save and restore switch state
authorLijo Lazar <lijo.lazar@amd.com>
Sat, 28 Jun 2025 05:20:25 +0000 (10:50 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 11 Aug 2025 15:12:53 +0000 (11:12 -0400)
commit1dd2fa0e00f17b909ff0fab92c1c48c2d7911c15
tree61a12ab77d5b2077cd56846718df592e999ac32a
parent111821e4b5a3105c42c7c99f4abd4d8af9f64248
drm/amdgpu: Save and restore switch state

During a DPC error kernel waits for the link to be active before
notifying downstream devices. On certain platforms with Broadcom switch
in synthetiic mode, switch responds with values even though the link is
not fully ready. The config space restoration done by pcie port driver
for SWUS/DS of dGPU is thus not effective as the switch is still doing
internal enumeration.

As a workaround, save state of SWUS/DS device in driver. Add additional
check to see if link is active and restore the values during DPC error
callbacks.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c