Skip to contentSkip to conversation

Async Flip in Atomic ioctl corrections

RFC Superseded Murthy, Arun R 2 participants 2 messages Jun 11, 2025

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

RFC 1/1 Async Flip in Atomic ioctl corrections

struct drm_crtc_state {
        /**
         * @async_flip:
         *
         * This is set when DRM_MODE_PAGE_FLIP_ASYNC is set in the legacy
         * PAGE_FLIP IOCTL. It's not wired up for the atomic IOCTL itself yet. */
        bool async_flip;

In the existing code the flag async_flip was intended for the legacy PAGE_FLIP IOCTL. But the same is being used for atomic IOCTL. As per the hardware feature is concerned, async flip is a plane feature and is to be treated per plane basis and not per pipe basis. For a given hardware pipe, among the multiple hardware planes, one can go with sync flip and other 2/3 can go with async flip. Tearing affect will be noticed with this and if any policy should be taken care by the user space. KMD not to include any policy as to allow async on only one plane for a given pipe as all policy done in user and KMD exposes what is supported by the hardware.

include/drm/drm_plane.h +0 -0
index 01479dd94e76..53447b4a5ba7 100644
@@ -260,6 +260,13 @@ struct drm_plane_state {

         * flow.
         */
        bool color_mgmt_changed : 1;
+       /**
+        * @async_flip:
+        *
+        * This is used for DRM_MODE_ATOMIC_IOCTL. async_flip in crtc_state is
+        * used for legacy PAGE_FLIP_IOCTL.
+        */
+       bool async_flip;
 };
Adding async_flip in plane_state will allow enabling async flip on plane basis for atomic IOCTL.

There would be a bunch of changes to correct this in the atomic path so as to remove the async_flip flag in crtc_state which was intended for legacy page_flip ioctl.
Changes include removal of the checks we have in atomic path so as to reject any changes(different plane, pipe, connector) along with async flip. This would be replaced with checks so as to reject any change in that particular plane where async is enabled(reject any change in pipe/connector as that would have impact on this plane) Please let us know your opinion on this.

Thanks and Regards,
Arun R Murthy
--------------------

#1 lore raw

✗ Fi.CI.BUILD: failure for Async Flip in Atomic ioctl corrections

== Series Details ==

== Series Details ==

Series: Async Flip in Atomic ioctl corrections
URL : https://patchwork.freedesktop.org/series/150080/
State : failure

== Summary ==

Error: patch https://patchwork.freedesktop.org/api/1.0/series/150080/revisions/1/mbox/ not applied
Applying: Async Flip in Atomic ioctl corrections
error: corrupt patch at line 13
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Async Flip in Atomic ioctl corrections
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Build failed, no error log produced