All of lore.kernel.org
 help / color / mirror / Atom feed
* Correct sequencing of usage of DRM writeback connector
@ 2024-06-17 13:41 Hoosier, Matt
  2024-06-17 15:16 ` Daniel Vetter
  0 siblings, 1 reply; 14+ messages in thread
From: Hoosier, Matt @ 2024-06-17 13:41 UTC (permalink / raw)
  To: dri-devel@lists.freedesktop.org, brian.starkey@arm.com; +Cc: Pekka Paalanen

Hi,

There is a discussion ongoing over in the compositor world about the implication of this cautionary wording found in the documentation for the DRM_MODE_CONNECTOR_WRITEBACK connectors:

>  *  "WRITEBACK_OUT_FENCE_PTR":
>  *	Userspace can use this property to provide a pointer for the kernel to
>  *	fill with a sync_file file descriptor, which will signal once the
>  *	writeback is finished. The value should be the address of a 32-bit
>  *	signed integer, cast to a u64.
>  *	Userspace should wait for this fence to signal before making another
>  *	commit affecting any of the same CRTCs, Planes or Connectors.
>  *	**Failure to do so will result in undefined behaviour.**
>  *	For this reason it is strongly recommended that all userspace
>  *	applications making use of writeback connectors *always* retrieve an
>  *	out-fence for the commit and use it appropriately.
>  *	From userspace, this property will always read as zero.

The question is whether it's realistic to hope that a DRM writeback connector can produce results on every frame, and do so without dragging down the frame-rate for the connector.

The wording in the documentation above suggests that it is very likely the fence fd won't signal userspace until after the vblank following the scanout during which the writeback was applied (call that frame N). This would mean that the compositor driving the connector would typically be unable to legally queue a page flip for frame N+1.

Is this the right interpretation? Is the writeback hardware typically even designed with a streaming use-case in mind? Maybe it's just intended for occasional static screenshots.

Matt Hoosier


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

end of thread, other threads:[~2024-06-21 17:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 13:41 Correct sequencing of usage of DRM writeback connector Hoosier, Matt
2024-06-17 15:16 ` Daniel Vetter
2024-06-17 16:54   ` Brian Starkey
2024-06-17 17:36     ` Hoosier, Matt
2024-06-17 19:48       ` Dmitry Baryshkov
2024-06-18  9:10         ` Brian Starkey
2024-06-18 13:57           ` Hoosier, Matt
2024-06-17 18:28     ` Abhinav Kumar
2024-06-17 19:52       ` Dmitry Baryshkov
2024-06-18  9:33         ` Daniel Vetter
2024-06-18  9:48           ` Dmitry Baryshkov
2024-06-21 17:18             ` Daniel Vetter
2024-06-19  2:10           ` Abhinav Kumar
2024-06-21 16:23             ` Daniel Vetter

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.