Skip to contentSkip to conversation

drm: document DRM_MODE_PAGE_FLIP_EVENT interactions with atomic

PATCH In review Simon Ser 2 participants 5 messages May 1, 2025 – Jul 17, 2025

Subsystems (2)
lore
Share & tools
lore

Simon Ser

author
#0 lore raw

PATCH v2 1/1 drm: document DRM_MODE_PAGE_FLIP_EVENT interactions with atomic

It's not obvious off-hand which CRTCs will get a page-flip event when using this flag in an atomic commit, because it's all implicitly implied based on the contents of the atomic commit. Document requirements for using this flag and how to request an event for a CRTC.

Note, because prepare_signaling() runs right after drm_atomic_set_property() calls, page-flip events are not delivered for CRTCs pulled in later by DRM core (e.g. on modeset by drm_atomic_helper_check_modeset()) or the driver (e.g. other CRTCs sharing a DP-MST connector).

v2: fix cut off sentence in commit message (Pekka)

Cc Simona Vetter <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc David Turner <[email protected]>
Cc Daniel Stone <[email protected]>
---
 include/uapi/drm/drm_mode.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/uapi/drm/drm_mode.h +8 -0
index c082810c08a8..a122bea25593 100644
@@ -962,6 +962,14 @@ struct hdr_output_metadata {
  * Request that the kernel sends back a vblank event (see
  * struct drm_event_vblank) with the &DRM_EVENT_FLIP_COMPLETE type when the
  * page-flip is done.
+ *
+ * When used with atomic uAPI, one event will be delivered per CRTC included in
+ * the atomic commit. A CRTC is included in an atomic commit if one of its
+ * properties is set, or if a property is set on a connector or plane linked
+ * via the CRTC_ID property to the CRTC. At least one CRTC must be included,
+ * and all pulled in CRTCs must be either previously or newly powered on (in
+ * other words, a powered off CRTC which stays off cannot be included in the
+ * atomic commit).
  */
 #define DRM_MODE_PAGE_FLIP_EVENT 0x01
 /**
Signature · 1 line
2.49.0
Reviewed-by
#3 lore raw
Quoted 1 line · Simon Ser

Bump: would anyone be willing to review this?

I did check the parenthesis about CRTC that are off and stay off just to make sure, that code is in drm_atomic_crtc_check() at the very bottom. -Sima

Signature · 3 lines
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch