From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 5/9] drm/i915: Reuse vlv_primary_min_alignment() for sprites as well
Date: Thu, 24 Oct 2024 10:47:21 +0000 [thread overview]
Message-ID: <cb5ca374ec3683191c7ea047a6fb8164a8205b6b.camel@intel.com> (raw)
In-Reply-To: <20241009182207.22900-6-ville.syrjala@linux.intel.com>
On Wed, 2024-10-09 at 21:22 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Rename vlv_primary_min_alignment() to vlv_plane_min_alignment()
> and use it to replace vlv_sprite_min_alignment() since the
> behaviour is now identical when the plane init doesn't set up
> any async flips stuff.
>
> Technically VLV/CHV sprites do support async flips, so this
> also makes us a bit more future proof if/when we extend async
> flip support to more than one plane.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
> ---
> drivers/gpu/drm/i915/display/i9xx_plane.c | 8 ++++----
> drivers/gpu/drm/i915/display/i9xx_plane.h | 4 ++++
> drivers/gpu/drm/i915/display/intel_sprite.c | 17 +----------------
> 3 files changed, 9 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/i9xx_plane.c
> b/drivers/gpu/drm/i915/display/i9xx_plane.c
> index 8d3346199645..943dcd3b7a0e 100644
> --- a/drivers/gpu/drm/i915/display/i9xx_plane.c
> +++ b/drivers/gpu/drm/i915/display/i9xx_plane.c
> @@ -775,9 +775,9 @@ i8xx_plane_max_stride(struct intel_plane *plane,
> return 8 * 1024;
> }
>
> -static unsigned int vlv_primary_min_alignment(struct intel_plane
> *plane,
> - const struct
> drm_framebuffer *fb,
> - int color_plane)
> +unsigned int vlv_plane_min_alignment(struct intel_plane *plane,
> + const struct drm_framebuffer
> *fb,
> + int color_plane)
> {
> if (intel_plane_can_async_flip(plane, fb->modifier))
> return 256 * 1024;
> @@ -938,7 +938,7 @@ intel_primary_plane_create(struct
> drm_i915_private *dev_priv, enum pipe pipe)
> }
>
> if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
> - plane->min_alignment = vlv_primary_min_alignment;
> + plane->min_alignment = vlv_plane_min_alignment;
> else if (DISPLAY_VER(dev_priv) >= 5 || IS_G4X(dev_priv))
> plane->min_alignment = g4x_primary_min_alignment;
> else if (DISPLAY_VER(dev_priv) == 4)
> diff --git a/drivers/gpu/drm/i915/display/i9xx_plane.h
> b/drivers/gpu/drm/i915/display/i9xx_plane.h
> index 0ca12d1e6839..457f4bccf106 100644
> --- a/drivers/gpu/drm/i915/display/i9xx_plane.h
> +++ b/drivers/gpu/drm/i915/display/i9xx_plane.h
> @@ -9,6 +9,7 @@
> #include <linux/types.h>
>
> enum pipe;
> +struct drm_framebuffer;
> struct drm_i915_private;
> struct intel_crtc;
> struct intel_initial_plane_config;
> @@ -19,6 +20,9 @@ struct intel_plane_state;
> unsigned int i965_plane_max_stride(struct intel_plane *plane,
> u32 pixel_format, u64 modifier,
> unsigned int rotation);
> +unsigned int vlv_plane_min_alignment(struct intel_plane *plane,
> + const struct drm_framebuffer
> *fb,
> + int colot_plane);
> int i9xx_check_plane_surface(struct intel_plane_state *plane_state);
>
> struct intel_plane *
> diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c
> b/drivers/gpu/drm/i915/display/intel_sprite.c
> index e6fadcef58e0..13996d7059ad 100644
> --- a/drivers/gpu/drm/i915/display/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/display/intel_sprite.c
> @@ -253,21 +253,6 @@ int vlv_plane_min_cdclk(const struct
> intel_crtc_state *crtc_state,
> return DIV_ROUND_UP(pixel_rate * num, den);
> }
>
> -static unsigned int vlv_sprite_min_alignment(struct intel_plane
> *plane,
> - const struct
> drm_framebuffer *fb,
> - int color_plane)
> -{
> - switch (fb->modifier) {
> - case I915_FORMAT_MOD_X_TILED:
> - return 4 * 1024;
> - case DRM_FORMAT_MOD_LINEAR:
> - return 128 * 1024;
> - default:
> - MISSING_CASE(fb->modifier);
> - return 0;
> - }
> -}
> -
> static u32 vlv_sprite_ctl_crtc(const struct intel_crtc_state
> *crtc_state)
> {
> u32 sprctl = 0;
> @@ -1616,7 +1601,7 @@ intel_sprite_plane_create(struct
> drm_i915_private *dev_priv,
> plane->get_hw_state = vlv_sprite_get_hw_state;
> plane->check_plane = vlv_sprite_check;
> plane->max_stride = i965_plane_max_stride;
> - plane->min_alignment = vlv_sprite_min_alignment;
> + plane->min_alignment = vlv_plane_min_alignment;
> plane->min_cdclk = vlv_plane_min_cdclk;
>
> if (IS_CHERRYVIEW(dev_priv) && pipe == PIPE_B) {
next prev parent reply other threads:[~2024-10-24 10:47 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 18:21 [PATCH 0/9] drm/i915: Async flip + compression, and some plane cleanups Ville Syrjala
2024-10-09 18:21 ` [PATCH 1/9] drm/i915: Allow async flips with render compression on TGL+ Ville Syrjala
2024-10-24 10:41 ` Hogander, Jouni
2024-10-28 15:12 ` Ville Syrjälä
2024-11-18 7:47 ` Hogander, Jouni
2024-10-09 18:22 ` [PATCH 2/9] drm/i915: Allow async flips with compression on ICL Ville Syrjala
2024-10-24 10:42 ` Hogander, Jouni
2024-10-09 18:22 ` [PATCH 3/9] drm/i915: Introduce plane->can_async_flip() Ville Syrjala
2024-10-24 10:43 ` Hogander, Jouni
2025-01-08 7:54 ` Borah, Chaitanya Kumar
2024-10-09 18:22 ` [PATCH 4/9] drm/i915: Use plane->can_async_flip() for alignment exceptions Ville Syrjala
2024-10-24 10:46 ` Hogander, Jouni
2024-10-28 15:02 ` Ville Syrjälä
2024-10-09 18:22 ` [PATCH 5/9] drm/i915: Reuse vlv_primary_min_alignment() for sprites as well Ville Syrjala
2024-10-24 10:47 ` Hogander, Jouni [this message]
2024-10-09 18:22 ` [PATCH 6/9] drm/i915: Disable scanout VT-d workaround for TGL+ Ville Syrjala
2024-10-24 10:50 ` Hogander, Jouni
2024-10-28 15:01 ` Ville Syrjälä
2024-11-18 7:48 ` Hogander, Jouni
2024-10-09 18:22 ` [PATCH 7/9] drm/i915: Nuke ADL pre-production Wa_22011186057 Ville Syrjala
2024-10-24 10:52 ` Hogander, Jouni
2024-10-28 15:04 ` Ville Syrjälä
2024-11-18 7:50 ` Hogander, Jouni
2024-10-09 18:22 ` [PATCH 8/9] drm/i915: Relocate xe AUX hack Ville Syrjala
2024-10-24 10:52 ` Hogander, Jouni
2024-10-09 18:22 ` [PATCH 9/9] drm/i915: Carve up skl_get_plane_caps() Ville Syrjala
2024-10-10 16:46 ` [PATCH v2 " Ville Syrjala
2024-10-24 10:53 ` Hogander, Jouni
2024-10-09 20:36 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Async flip + compression, and some plane cleanups Patchwork
2024-10-09 20:36 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-10-09 20:46 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-10-11 8:56 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Async flip + compression, and some plane cleanups (rev2) Patchwork
2024-10-11 8:56 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-10-11 9:00 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-10-11 16:50 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Async flip + compression, and some plane cleanups (rev3) Patchwork
2024-10-11 16:50 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-10-11 17:30 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-12 11:56 ` ✗ Fi.CI.IGT: failure " Patchwork
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=cb5ca374ec3683191c7ea047a6fb8164a8205b6b.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.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