From: "Pottumuttu, Sai Teja" <sai.teja.pottumuttu@intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
<intel-xe@lists.freedesktop.org>,
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915/display: Don't allow tile4 framebuffer to do hflip on display20 or greater
Date: Tue, 8 Oct 2024 13:25:45 +0530 [thread overview]
Message-ID: <caeaa7e1-0872-4bf8-99ef-e54933c0715f@intel.com> (raw)
In-Reply-To: <20241007182841.2104740-1-juhapekka.heikkila@gmail.com>
On 07-10-2024 23:58, Juha-Pekka Heikkila wrote:
> On display ver 20 onwards tile4 is not supported with horizontal flip
>
> Bspec: 69853
Some nitpicks,
1. Probably, we can add Bspec 68904 as well, as it gives more clarity
about all the support and remove the extra line below the Bspec line.
2. In the commit subject, I think we would usually prefer display
version 20 instead of display20 directly, and maybe we can have the
commit message something like "With display version 20, horizontal flip
is not supported on tile4 surface formats" just to make it a bit more clear.
But other than that, patch looks good to me
Reviewed-by: Sai Teja Pottumuttu <sai.teja.pottumuttu@intel.com>
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
> drivers/gpu/drm/i915/display/intel_fb.c | 13 +++++++++++++
> drivers/gpu/drm/i915/display/intel_fb.h | 1 +
> drivers/gpu/drm/i915/display/skl_universal_plane.c | 11 +++++++++++
> 3 files changed, 25 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
> index 6c2679e6c980..735fba73c9ad 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb.c
> +++ b/drivers/gpu/drm/i915/display/intel_fb.c
> @@ -439,6 +439,19 @@ bool intel_fb_needs_64k_phys(u64 modifier)
> INTEL_PLANE_CAP_NEED64K_PHYS);
> }
>
> +/**
> + * intel_fb_is_tile4_modifier: Check if a modifier is a tile4 modifier type
> + * @modifier: Modifier to check
> + *
> + * Returns:
> + * Returns %true if @modifier is a tile4 modifier.
> + */
> +bool intel_fb_is_tile4_modifier(u64 modifier)
> +{
> + return plane_caps_contain_any(lookup_modifier(modifier)->plane_caps,
> + INTEL_PLANE_CAP_TILING_4);
> +}
> +
> static bool check_modifier_display_ver_range(const struct intel_modifier_desc *md,
> u8 display_ver_from, u8 display_ver_until)
> {
> diff --git a/drivers/gpu/drm/i915/display/intel_fb.h b/drivers/gpu/drm/i915/display/intel_fb.h
> index 8240febff84c..d78993e5eb62 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb.h
> +++ b/drivers/gpu/drm/i915/display/intel_fb.h
> @@ -36,6 +36,7 @@ bool intel_fb_is_ccs_modifier(u64 modifier);
> bool intel_fb_is_rc_ccs_cc_modifier(u64 modifier);
> bool intel_fb_is_mc_ccs_modifier(u64 modifier);
> bool intel_fb_needs_64k_phys(u64 modifier);
> +bool intel_fb_is_tile4_modifier(u64 modifier);
>
> bool intel_fb_is_ccs_aux_plane(const struct drm_framebuffer *fb, int color_plane);
> int intel_fb_rc_ccs_cc_plane(const struct drm_framebuffer *fb);
> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index 9207b7e96974..4755a0672739 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -1619,6 +1619,17 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
> return -EINVAL;
> }
>
> + /*
> + * Display20 onward tile4 hflip is not supported
> + */
> + if (rotation & DRM_MODE_REFLECT_X &&
> + intel_fb_is_tile4_modifier(fb->modifier) &&
> + DISPLAY_VER(dev_priv) >= 20) {
> + drm_dbg_kms(&dev_priv->drm,
> + "horizontal flip is not supported with tile4 surface formats\n");
> + return -EINVAL;
> + }
> +
> if (drm_rotation_90_or_270(rotation)) {
> if (!intel_fb_supports_90_270_rotation(to_intel_framebuffer(fb))) {
> drm_dbg_kms(&dev_priv->drm,
next prev parent reply other threads:[~2024-10-08 7:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 18:28 [PATCH] drm/i915/display: Don't allow tile4 framebuffer to do hflip on display20 or greater Juha-Pekka Heikkila
2024-10-07 21:29 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-07 21:29 ` ✓ CI.checkpatch: " Patchwork
2024-10-07 21:31 ` ✓ CI.KUnit: " Patchwork
2024-10-07 21:42 ` ✓ CI.Build: " Patchwork
2024-10-07 21:44 ` ✓ CI.Hooks: " Patchwork
2024-10-07 21:46 ` ✗ CI.checksparse: warning " Patchwork
2024-10-07 22:09 ` ✓ CI.BAT: success " Patchwork
2024-10-08 7:55 ` Pottumuttu, Sai Teja [this message]
2024-10-08 9:02 ` ✗ CI.FULL: failure " Patchwork
2024-10-09 18:08 ` ✓ CI.Patch_applied: success for drm/i915/display: Don't allow tile4 framebuffer to do hflip on display20 or greater (rev2) Patchwork
2024-10-09 18:08 ` ✓ CI.checkpatch: " Patchwork
2024-10-09 18:11 ` ✓ CI.KUnit: " Patchwork
2024-10-09 18:22 ` ✓ CI.Build: " Patchwork
2024-10-09 18:24 ` ✓ CI.Hooks: " Patchwork
2024-10-09 18:26 ` ✗ CI.checksparse: warning " Patchwork
2024-10-09 19:06 ` ✓ CI.BAT: success " Patchwork
2024-10-10 6:29 ` ✗ CI.FULL: failure " Patchwork
2024-10-14 13:17 ` Juha-Pekka Heikkila
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=caeaa7e1-0872-4bf8-99ef-e54933c0715f@intel.com \
--to=sai.teja.pottumuttu@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=juhapekka.heikkila@gmail.com \
/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