Skip to content

drm/vkms: give every composer user its own switch

Oarora Etimis dri-devel linux-doc lkml 4 versions – New

Get series with b4
b4 am [email protected] change-id 20261111-composer-cc9620515bcd

Versions newest first

  1. v4 Latest2 patches 0 repliesNew
  2. v32 patches 0 repliesSuperseded
  3. v22 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch0 repliesSuperseded

Changes in v4 from the cover letter

- vkms_composer_get() returns the error from drm_crtc_vblank_get() instead of a bool, and vkms_set_crc_source() returns it, so a failed take no longer looks like a successful open followed by a put() with no matching get().
- vkms_crc_parse_source() failing now returns before the composer reference is touched, instead of falling through to vkms_composer_put().
- the kerneldoc of @composer_users no longer claims a READ_ONCE() that patch 2 removes.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/vkms: count the composer usersDocumentation/gpu/vkms.rst drivers/gpu/drm/vkms/vkms_composer.c drivers/gpu/drm/vkms/vkms_crtc.c +2 more+61 -220 replies
2/2drm/vkms: queue the composer work under the output lockdrivers/gpu/drm/vkms/vkms_crtc.c drivers/gpu/drm/vkms/vkms_drv.h+3 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

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

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 frame accounting and the queue, so the state the timer read is still the state it queues.

---
Changes in v4:
- vkms_composer_get() returns the error from drm_crtc_vblank_get() instead of a bool, and vkms_set_crc_source() returns it, so a failed take no longer looks like a successful open followed by a put() with no matching get().
- vkms_crc_parse_source() failing now returns before the composer reference is touched, instead of falling through to vkms_composer_put().
- the kerneldoc of @composer_users no longer claims a READ_ONCE() that patch 2 removes.

Link to v3: https://patch.msgid.link/[email protected]
Link to v2: https://patch.msgid.link/[email protected]
Link to v1: https://patch.msgid.link/[email protected]

---
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  | 39 +++++++++++++++++++++++++++--------
 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, 61 insertions(+), 24 deletions(-)

---
base-commit: 97429bac371273886238bfcf63d78e7405cacb46
change-id: 20261111-composer-cc9620515bcd

Best regards,

Signature · 1 line
Oarora Etimis <[email protected]>