]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/v3d: Remove dedicated fence_lock
authorMaíra Canal <mcanal@igalia.com>
Fri, 6 Mar 2026 11:30:38 +0000 (08:30 -0300)
committerMaíra Canal <mcanal@igalia.com>
Fri, 13 Mar 2026 21:02:32 +0000 (18:02 -0300)
commit7315728ab5388bf4956835b20497332b1d45fe98
treee26b04ceef1f9683833bc02ad83fdf8e6e217d7c
parent2f0e110735a4e59e71e44d04b4f70e58f06c61c9
drm/v3d: Remove dedicated fence_lock

Commit adefb2ccea1e ("drm/v3d: create a dedicated lock for dma fence")
split `fence_lock` from `queue_lock` because v3d_job_update_stats() was
taking `queue_lock` to protect `job->file_priv` during stats collection
in the IRQ handler. Using the same lock for both DMA fence signaling and
stats protection in a IRQ context caused issues on PREEMPT_RT.

Since then, the stats infrastructure has been reworked: v3d_stats is now
refcounted and jobs hold their own references to stats objects, so
v3d_job_update_stats() no longer takes `queue_lock` at all.

With the original reason for the split gone, merge `fence_lock` back
into `queue_lock` to simplify the locking scheme.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Link: https://patch.msgid.link/20260306-v3d-reset-locking-improv-v3-6-49864fe00692@igalia.com
Signed-off-by: Maíra Canal <mcanal@igalia.com>
drivers/gpu/drm/v3d/v3d_drv.h
drivers/gpu/drm/v3d/v3d_fence.c
drivers/gpu/drm/v3d/v3d_gem.c