From: Arun R Murthy <arun.r.murthy@intel.com>
To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Cc: Arun R Murthy <arun.r.murthy@intel.com>
Subject: [PATCHv2 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC
Date: Mon, 18 Nov 2024 13:23:13 +0530 [thread overview]
Message-ID: <20241118075315.466009-2-arun.r.murthy@intel.com> (raw)
In-Reply-To: <20241118075315.466009-1-arun.r.murthy@intel.com>
There exists a property IN_FORMATS which exposes the plane supported
modifiers/formats to the user. In some platforms when asynchronous flips
are used all of modifiers/formats mentioned in IN_FORMATS are not
supported. This patch adds a new plane property IN_FORMATS_ASYNC to
expose the async flips supported modifiers/formats so that user can use
this information ahead and done flips with unsupported
formats/modifiers. This will save flips failures.
v2: Remove async variable from drm_plane (Ville)
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
drivers/gpu/drm/drm_mode_config.c | 7 +++++++
drivers/gpu/drm/drm_plane.c | 6 ++++++
include/drm/drm_mode_config.h | 6 ++++++
3 files changed, 19 insertions(+)
diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index 37d2e0a4ef4b..cff189a2e751 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -379,6 +379,13 @@ static int drm_mode_create_standard_properties(struct drm_device *dev)
return -ENOMEM;
dev->mode_config.size_hints_property = prop;
+ prop = drm_property_create(dev,
+ DRM_MODE_PROP_IMMUTABLE | DRM_MODE_PROP_BLOB,
+ "IN_FORMATS_ASYNC", 0);
+ if (!prop)
+ return -ENOMEM;
+ dev->mode_config.async_modifiers_property = prop;
+
return 0;
}
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index a28b22fdd7a4..416818e54ccf 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -141,6 +141,12 @@
* various bugs in this area with inconsistencies between the capability
* flag and per-plane properties.
*
+ * IN_FORMATS_ASYNC:
+ * Blob property which contains the set of buffer format and modifier
+ * pairs supported by this plane for asynchronous flips. The blob is a struct
+ * drm_format_modifier_blob. Without this property the plane doesn't
+ * support buffers with modifiers. Userspace cannot change this property.
+ *
* SIZE_HINTS:
* Blob property which contains the set of recommended plane size
* which can used for simple "cursor like" use cases (eg. no scaling).
diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
index 271765e2e9f2..0c116d6dfd27 100644
--- a/include/drm/drm_mode_config.h
+++ b/include/drm/drm_mode_config.h
@@ -936,6 +936,12 @@ struct drm_mode_config {
*/
struct drm_property *modifiers_property;
+ /**
+ * @async_modifiers_property: Plane property to list support modifier/format
+ * combination for asynchronous flips.
+ */
+ struct drm_property *async_modifiers_property;
+
/**
* @size_hints_property: Plane SIZE_HINTS property.
*/
--
2.25.1
next prev parent reply other threads:[~2024-11-18 8:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 7:53 [PATCHv2/3] Expose modifiers/formats supported by async flips Arun R Murthy
2024-11-18 7:53 ` Arun R Murthy [this message]
2024-11-18 7:53 ` [PATCHv2 2/3] drm/plane: Expose function to create format/modifier blob Arun R Murthy
2024-11-22 20:06 ` Ville Syrjälä
2024-11-25 8:45 ` Murthy, Arun R
2024-12-13 9:02 ` Murthy, Arun R
2024-11-18 7:53 ` [PATCHv2 3/3] drm/i915/display: Populate list of async supported formats/modifiers Arun R Murthy
2024-11-22 4:02 ` kernel test robot
2024-11-25 13:05 ` kernel test robot
2024-11-28 23:21 ` kernel test robot
2024-11-18 14:26 ` ✗ Fi.CI.SPARSE: warning for series starting with [PATCHv2,1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC Patchwork
2024-12-13 9:32 ` ✗ Fi.CI.BUILD: failure for series starting with [PATCHv2,1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC (rev2) Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-11-05 10:26 [PATCH 0/4] Expose modifiers/formats supported by async flips Arun R Murthy
2024-11-18 7:48 ` [PATCHv2/3] " Arun R Murthy
2024-11-18 7:48 ` [PATCHv2 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC Arun R Murthy
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=20241118075315.466009-2-arun.r.murthy@intel.com \
--to=arun.r.murthy@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.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