]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/v3d: Use raw seqcount helpers instead of fighting with lockdep
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fri, 6 Mar 2026 11:30:34 +0000 (08:30 -0300)
committerMaíra Canal <mcanal@igalia.com>
Fri, 13 Mar 2026 21:02:32 +0000 (18:02 -0300)
commit0b2a4569cd9fe56683be1aab9864032a8d267caa
tree537c4e2b9affd0b4ceadcbe258e115f848b80a4e
parent8cf1bec37b27846ad3169744c9f1a89a06dcb3fa
drm/v3d: Use raw seqcount helpers instead of fighting with lockdep

The `v3d_stats` sequence counter uses regular seqcount helpers, which
carry lockdep annotations that expect a consistent IRQ context between
all writers. However, lockdep is unable to detect that v3d's readers
are never in IRQ or softirq context, and that for CPU job queues, even
the write side never is. This led to false positive that were previously
worked around by conditionally disabling local IRQs under
IS_ENABLED(CONFIG_LOCKDEP).

Switch to the raw seqcount helpers which skip lockdep tracking entirely.
This is safe because jobs are fully serialized per queue: the next job
can only be queued after the previous one has been signaled, so there is
no scope for the start and update paths to race on the same seqcount.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Link: https://patch.msgid.link/20260306-v3d-reset-locking-improv-v3-2-49864fe00692@igalia.com
Co-developed-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
drivers/gpu/drm/v3d/v3d_drv.c
drivers/gpu/drm/v3d/v3d_drv.h
drivers/gpu/drm/v3d/v3d_sched.c