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 3/3] drm/i915/display: Populate list of async supported formats/modifiers
Date: Mon, 18 Nov 2024 13:19:00 +0530 [thread overview]
Message-ID: <20241118074900.465910-4-arun.r.murthy@intel.com> (raw)
In-Reply-To: <20241118074900.465910-1-arun.r.murthy@intel.com>
Populate the list of formats/modifiers supported by async flip. Register
a async property and expose the same to user through blob.
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
.../drm/i915/display/skl_universal_plane.c | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index 038ca2ec5d7a..a6e84ac56277 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -170,6 +170,44 @@ static const u32 icl_hdr_plane_formats[] = {
DRM_FORMAT_XVYU16161616,
};
+static u64 tgl_asyn_modifiers[] = {
+ DRM_FORMAT_MOD_LINEAR,
+ I915_FORMAT_MOD_X_TILED,
+ I915_FORMAT_MOD_Y_TILED,
+ I915_FORMAT_MOD_4_TILED,
+ I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS,
+ I915_FORMAT_MOD_4_TILED_MTL_RC_CCS,
+ I915_FORMAT_MOD_4_TILED_DG2_RC_CCS,
+ I915_FORMAT_MOD_4_TILED_BMG_CCS,
+ I915_FORMAT_MOD_4_TILED_LNL_CCS,
+};
+
+static u64 icl_async_modifiers[] = {
+ I915_FORMAT_MOD_X_TILED,
+ I915_FORMAT_MOD_Y_TILED,
+ I915_FORMAT_MOD_Yf_TILED,
+ I915_FORMAT_MOD_Y_TILED_CCS,
+ I915_FORMAT_MOD_Yf_TILED_CCS,
+};
+
+static u64 skl_async_modifiers[] = {
+ I915_FORMAT_MOD_X_TILED,
+ I915_FORMAT_MOD_Y_TILED,
+ I915_FORMAT_MOD_Yf_TILED,
+};
+
+static u32 intel_async_formats[] = {
+ DRM_FORMAT_RGB565,
+ DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_XBGR8888,
+ DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_ABGR8888,
+ DRM_FORMAT_XRGB2101010,
+ DRM_FORMAT_XBGR2101010,
+ DRM_FORMAT_XRGB16161616F,
+ DRM_FORMAT_XBGR16161616F,
+};
+
int skl_format_to_fourcc(int format, bool rgb_order, bool alpha)
{
switch (format) {
@@ -2585,6 +2623,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
unsigned int supported_rotations;
unsigned int supported_csc;
const u64 *modifiers;
+ u64 *async_modifiers;
const u32 *formats;
int num_formats;
int ret;
@@ -2687,6 +2726,18 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
if (ret)
goto fail;
+ if (DISPLAY_VER(dev_priv) >= 12)
+ async_modifiers = tgl_asyn_modifiers;
+ else if (DISPLAY_VER(dev_priv) == 11)
+ async_modifiers = icl_async_modifiers;
+ else
+ async_modifiers = skl_async_modifiers;
+
+ drm_plane_create_format_blob(&dev_priv->drm, &plane->base,
+ async_modifiers, sizeof(async_modifiers),
+ intel_async_formats,
+ sizeof(intel_async_formats), true);
+
if (DISPLAY_VER(dev_priv) >= 13)
supported_rotations = DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180;
else
--
2.25.1
next prev parent reply other threads:[~2024-11-18 7:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 10:26 [PATCH 0/4] Expose modifiers/formats supported by async flips Arun R Murthy
2024-11-05 10:26 ` [PATCH 1/4] drm/plane: Add new plane property IN_FORMATS_ASYNC Arun R Murthy
2024-11-06 14:00 ` Ville Syrjälä
2024-11-06 14:32 ` Murthy, Arun R
2024-11-06 14:47 ` Ville Syrjälä
2024-11-05 10:26 ` [PATCH 2/4] drm/i915/fb: Add async field to the modifiers description Arun R Murthy
2024-11-05 10:26 ` [PATCH 3/4] drm/i915/display: Add async_flip flag in get_modifiers Arun R Murthy
2024-11-05 10:26 ` [PATCH 4/4] drm/i915/display: Add async supported formats/modifiers Arun R Murthy
2024-11-05 12:10 ` ✗ Fi.CI.CHECKPATCH: warning for Expose modifiers/formats supported by async flips Patchwork
2024-11-05 12:10 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-11-05 13:21 ` ✗ Fi.CI.BAT: failure " Patchwork
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
2024-11-18 7:48 ` [PATCHv2 2/3] drm/plane: Expose function to create format/modifier blob Arun R Murthy
2024-11-18 7:49 ` Arun R Murthy [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-18 7:53 [PATCHv2/3] Expose modifiers/formats supported by async flips Arun R Murthy
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
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=20241118074900.465910-4-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