From: Arun R Murthy <arun.r.murthy@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
jani.nikula@intel.com, ville.syrjala@intel.com,
uma.shankar@intel.com, xaver.hugl@kde.org,
andrealmeid@igalia.com, naveen1.kumar@intel.com,
Dmitry Baryshkov <lumag@kernel.org>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
Arun R Murthy <arun.r.murthy@intel.com>
Subject: [PATCH RFC v2 1/2] drm/atomic/plane: Add plane property for async flip
Date: Fri, 10 Oct 2025 14:15:58 +0530 [thread overview]
Message-ID: <20251010-async-v2-1-50c6b7a9b654@intel.com> (raw)
In-Reply-To: <20251010-async-v2-0-50c6b7a9b654@intel.com>
Add a new property for enabling/disabling async flip on a plane for
atomic path. Certain vendors have support for async flip on more than
one plane and with the present implementation using the flag, async flip
can be enabled on only one plane.
Adding a plane property for async flip enables driver to allow async
flip on multiple planes in atomic path.
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
drivers/gpu/drm/drm_atomic_uapi.c | 4 ++++
drivers/gpu/drm/drm_plane.c | 31 +++++++++++++++++++++++++++++++
include/drm/drm_plane.h | 12 ++++++++++++
3 files changed, 47 insertions(+)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 85dbdaa4a2e25878c953b9b41539c8566d55c6d9..7773e0057302fccb57df8067f417b23a9cb9fcde 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -550,6 +550,8 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
return ret;
} else if (property == plane->scaling_filter_property) {
state->scaling_filter = val;
+ } else if (property == plane->async_flip_property) {
+ state->async_flip = val;
} else if (plane->funcs->atomic_set_property) {
return plane->funcs->atomic_set_property(plane, state,
property, val);
@@ -627,6 +629,8 @@ drm_atomic_plane_get_property(struct drm_plane *plane,
state->fb_damage_clips->base.id : 0;
} else if (property == plane->scaling_filter_property) {
*val = state->scaling_filter;
+ } else if (property == plane->async_flip_property) {
+ *val = state->async_flip;
} else if (plane->funcs->atomic_get_property) {
return plane->funcs->atomic_get_property(plane, state, property, val);
} else if (property == plane->hotspot_x_property) {
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 38f82391bfda578d532499585066dd85ff573910..da486defed87eeb01dd9ad5f3d791900286f9f34 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -1820,3 +1820,34 @@ int drm_plane_add_size_hints_property(struct drm_plane *plane,
return 0;
}
EXPORT_SYMBOL(drm_plane_add_size_hints_property);
+
+/**
+ * drm_plane_create_async_flip_property - create asynchronous flip property
+ *
+ * @plane: drm plane
+ *
+ * Create a property to enable/disable asynchronous flip on the plane.
+ *
+ * RETURNS:
+ * Zero for success or -errno
+ */
+int drm_plane_create_async_flip_property(struct drm_plane *plane)
+{
+ struct drm_property *prop;
+
+ prop = drm_property_create_bool(plane->dev, DRM_MODE_PROP_IMMUTABLE,
+ "async_flip");
+
+ if (!prop)
+ return -ENOMEM;
+
+ drm_object_attach_property(&plane->base, prop, false);
+
+ plane->async_flip_property = prop;
+
+ if (plane->state)
+ plane->state->async_flip = false;
+
+ return 0;
+}
+EXPORT_SYMBOL(drm_plane_create_async_flip_property);
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 01479dd94e76a8389a0c9e9d6744400aa2291064..b649c57437a8303be094e652ed5be7a735f6f5e0 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -260,6 +260,12 @@ struct drm_plane_state {
* flow.
*/
bool color_mgmt_changed : 1;
+
+ /**
+ * @async_flip: Indicate that the present plane is asynchronous flip
+ * mode.
+ */
+ bool async_flip;
};
static inline struct drm_rect
@@ -799,6 +805,11 @@ struct drm_plane {
*/
struct drm_property *hotspot_y_property;
+ /**
+ * @async_flip_property: property to set asynchronous flip on the plane
+ */
+ struct drm_property *async_flip_property;
+
/**
* @kmsg_panic: Used to register a panic notifier for this plane
*/
@@ -1005,5 +1016,6 @@ int drm_plane_create_scaling_filter_property(struct drm_plane *plane,
int drm_plane_add_size_hints_property(struct drm_plane *plane,
const struct drm_plane_size_hint *hints,
int num_hints);
+int drm_plane_create_async_flip_property(struct drm_plane *plane);
#endif
--
2.25.1
next prev parent reply other threads:[~2025-10-10 8:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 8:45 [PATCH RFC v2 0/2] Async Flip in Atomic ioctl corrections Arun R Murthy
2025-10-10 8:45 ` Arun R Murthy [this message]
2025-10-10 8:45 ` [PATCH RFC v2 2/2] drm/atomic: Use async_flip plane property for asynchronous flips Arun R Murthy
2025-10-10 12:36 ` ✓ i915.CI.BAT: success for Async Flip in Atomic ioctl corrections (rev2) Patchwork
2025-10-10 12:36 ` Patchwork
2025-10-10 12:36 ` Patchwork
2025-10-10 12:36 ` Patchwork
2025-10-10 12:36 ` Patchwork
2025-10-10 12:36 ` Patchwork
2025-10-10 12:36 ` Patchwork
2025-10-10 12:36 ` Patchwork
2025-10-10 12:36 ` Patchwork
2025-10-10 12:36 ` Patchwork
2025-10-10 12:36 ` Patchwork
2025-10-10 12:36 ` Patchwork
2025-10-10 13:32 ` [PATCH RFC v2 0/2] Async Flip in Atomic ioctl corrections Ville Syrjälä
2025-10-13 4:19 ` Murthy, Arun R
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251010-async-v2-1-50c6b7a9b654@intel.com \
--to=arun.r.murthy@intel.com \
--cc=airlied@gmail.com \
--cc=andrealmeid@igalia.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=naveen1.kumar@intel.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=uma.shankar@intel.com \
--cc=ville.syrjala@intel.com \
--cc=xaver.hugl@kde.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox