[PATCH v3 0/2] drm/vkms: give every composer user its own switch

From: Oarora Etimis

Date: Thu Nov 19 2026 - 08:36:42 EST


The composer has one switch, shared by the CRC reader and the writeback
jobs, so either of them turns it off for the other.

Split it: vkms_output keeps a count of holders, and a get() raises it while a
put() lowers it, so the vblank reference is taken by the first holder and
dropped by the last. The CRC source takes and drops one per open()/release(),
which the core always pairs; each writeback job keeps its own record.

Patch 2 keeps the lock over the count and the queue, so the state the timer
read is still the state it queues.

---
Changes in v3:
- the CRC source no longer keeps a flag of its own: it takes and drops one
reference per open()/release(). With a flag, a second reader skipped its
get() while the first one was still releasing, and that release then
dropped the reference for both.
- vkms_composer_get() returns whether it took a reference; a writeback job
keeps that value and only drops what it took.
- Link to v2: https://patch.msgid.link/20261119-composer-v2-0-a935e9bae6be@xxxxxxxxx

---
Oarora Etimis (2):
drm/vkms: count the composer users
drm/vkms: queue the composer work under the output lock

Documentation/gpu/vkms.rst | 5 -----
drivers/gpu/drm/vkms/vkms_composer.c | 33 +++++++++++++++++++++++++--------
drivers/gpu/drm/vkms/vkms_crtc.c | 5 ++---
drivers/gpu/drm/vkms/vkms_drv.h | 29 +++++++++++++++++++++++++----
drivers/gpu/drm/vkms/vkms_writeback.c | 7 ++++---
5 files changed, 56 insertions(+), 23 deletions(-)
---
base-commit: 97429bac371273886238bfcf63d78e7405cacb46
change-id: 20261111-composer-cc9620515bcd

Best regards,
--
Oarora Etimis <oaroraetimis@xxxxxxxxx>