All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] drm/virtio: avoid full uploads for rotating dumb buffers
@ 2026-12-05  6:33 Aditya Tipre
  2026-12-05  6:33 ` [RFC PATCH 1/2] drm/virtio: accumulate confirmed dumb-buffer damage Aditya Tipre
  2026-12-05  6:33 ` [RFC PATCH 2/2] drm/virtio: test transfer and damage history Aditya Tipre
  0 siblings, 2 replies; 5+ messages in thread
From: Aditya Tipre @ 2026-12-05  6:33 UTC (permalink / raw)
  To: dri-devel
  Cc: virtualization, airlied, kraxel, dmitry.osipenko, gurchetansingh,
	olvaffe, tipreaditya

virtio-gpu uploads dumb buffers per resource. When the framebuffer
changes, the damage helper falls back to a full-plane upload because the
host resource for the newly selected buffer may contain an older frame.

This series keeps bounded frame damage history per output and tracks the
confirmed contents of each host resource. A new upload updates the
tracked contents only after a matching successful transfer response.
When the driver cannot determine the damage needed to catch up, it
uploads the full buffer.

The prototype is off by default. Use virtio_gpu.buffer_age=1 on the
kernel command line to enable it for native linear XRGB8888 shmem dumb
buffers covering a single unscaled scanout with virgl disabled. This
addresses one virtio-gpu case in the DRM damage accumulation TODO.

Feedback is welcome on whether the eligibility rules are appropriate
and whether the transfer ownership and teardown rules should be split
into their own prerequisite series.

The series is based on drm-misc-next and requires Nguyen Ngoc Thang's
vbuf cleanup v2, posted by Fei Yu at the link below.
https://lore.kernel.org/dri-devel/20261103085314.3102802-1-fei.yu@intel.com/

The KUnit tests cover the transfer ownership and damage history rules.
The separate IGT draft exercises two and three rotating framebuffers
and compares the QEMU host scanout against a reference scene. All 40
captures matched with the optimization enabled and disabled. Over ten
640x480 frames per subtest, enabling buffer age reduced total QEMU flush
rectangle area by 79.47% with two buffers and 69.30% with three.

KCSAN stress completed 2,000 atomic commits and 200 concurrent writes
per run. The unpatched drm-misc-next base reproduced the DRM timestamp
and vblank-timer reports. The latest run with buffer age enabled had no
KCSAN reports. With buffer age disabled, KCSAN reported the DRM
timestamp race and a workqueue read with an unknown competing access.

OpenAI Codex assisted with driver design, implementation, and validation.

base-commit: b5a1ab58fb6535064d79c26f3d53936e88769339
prerequisite-patch-id: dc35fdf21304890860494eca3f2710e345445342

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-05  6:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05  6:33 [RFC PATCH 0/2] drm/virtio: avoid full uploads for rotating dumb buffers Aditya Tipre
2026-12-05  6:33 ` [RFC PATCH 1/2] drm/virtio: accumulate confirmed dumb-buffer damage Aditya Tipre
2026-12-05  6:59   ` sashiko-bot
2026-12-05  6:33 ` [RFC PATCH 2/2] drm/virtio: test transfer and damage history Aditya Tipre
2026-12-05  6:58   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.