]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amdgpu: completely rework eviction fence handling v2
authorChristian König <christian.koenig@amd.com>
Wed, 28 Jan 2026 12:58:14 +0000 (13:58 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Mar 2026 21:46:13 +0000 (17:46 -0400)
commit2cd7284ba54b22869c301fba7aff9ec96a12f8c0
treef2008c9a26be9ab1b5da113f959d67f3abc27405
parent87327658c848f56eac166cb382b57b83bf06c5ac
drm/amdgpu: completely rework eviction fence handling v2

Well that was broken on multiple levels.

First of all a lot of checks were placed at incorrect locations, especially if
the resume worker should run or not.

Then a bunch of code was just mid-layering because of incorrect assignment who
should do what.

And finally comments explaining what happens instead of why.

Just re-write it from scratch, that should at least fix some of the hangs we
are seeing.

Use RCU for the eviction fence pointer in the manager, the spinlock usage was
mostly incorrect as well. Then finally remove all the nonsense checks and
actually add them in the correct locations.

v2: some typo fixes and cleanups suggested by Sunil

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.h
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h