summaryrefslogtreecommitdiff
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
authorMaíra Canal <mcanal@igalia.com>2026-07-07 17:05:48 -0300
committerMaíra Canal <mcanal@igalia.com>2026-11-02 09:47:16 -0300
commit994ba6e5c87d6a3d471ea987fe8622168f092334 (patch)
tree1b7c89d0196081e8f4b296e5ed540fd941ecd30f /include/linux/workqueue.h
parent0afdbdd5b1af729108de8f893d179c3b99eac29d (diff)
drm/v3d: Widen cache_clean_lock over the whole L2TCACTL sequence
v3d_clean_caches() and v3d_flush_l2t() both write the single L2TCACTL register and poll its status bits. The mutex cache_clean_lock exists to serialize them, but v3d_clean_caches() only took the lock around its final FLM_CLEAN write. These functions run concurrently: v3d_flush_l2t() is issued from the BIN/RENDER/CSD invalidate path while v3d_clean_caches() runs from the CACHE_CLEAN queue, and each queue's scheduler uses its own ordered workqueue, so their run_job callbacks execute in parallel. Because clean locked only its final write, a concurrent flush can write L2TCACTL during clean's unlocked phase. Both use non read-modify-write writes to the one register, so whichever lands last wins: clean's TMUWCF write can land on the flush's in-flight L2TFLS invalidate, triggering the GFXH-1897 hazard of writing L2TCACTL while a flush is pending. Hold cache_clean_lock across the entire L2TCACTL access sequence so it is fully mutually exclusive with v3d_flush_l2t(), which already takes the lock around its own write. Cc: stable@vger.kernel.org Fixes: abf888b03a98 ("drm/v3d: Wait for pending L2T flush before cleaning caches") Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Link: https://patch.msgid.link/20260707200738.659002-2-mcanal@igalia.com Signed-off-by: Maíra Canal <mcanal@igalia.com>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions