]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: deduplicate ring preempt ib function
authorLeonardo Cesar <leonardocesar@usp.br>
Tue, 28 Apr 2026 23:19:44 +0000 (20:19 -0300)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 May 2026 13:56:29 +0000 (09:56 -0400)
commitdc0d6fdfa5b6ab36ddaa774265261336c3e7dbae
tree97128fe97a8bfa1596f76c407b7297a577478ef5
parentc1a3ff1d327820cd9a52bc1056b98681fc088949
drm/amdgpu: deduplicate ring preempt ib function

The ring preemption function is identical for both gfx_v11_0 and
gfx_v12_0. This patch refactors the code by moving the core logic
into a generic function inside amdgpu_gfx.c to reduce code
duplication and simplify future maintenance.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Leonardo Cesar <leonardocesar@usp.br>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c