All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 3/5] drm/i915/fbc: Split plane tiling checks per-platform
Date: Thu, 14 Sep 2023 14:38:52 +0300	[thread overview]
Message-ID: <20230914113854.10008-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20230914113854.10008-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Carve up tiling_is_valid() into per-platform variants to
make it easier to see what limits are actually being imposed.

TODO: maybe go for vfuncs later

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 4c4626c84666..052f9d8b53d4 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -984,16 +984,21 @@ static bool intel_fbc_hw_tracking_covers_screen(const struct intel_plane_state *
 	return effective_w <= max_w && effective_h <= max_h;
 }
 
-static bool tiling_is_valid(const struct intel_plane_state *plane_state)
+static bool i8xx_fbc_tiling_valid(const struct intel_plane_state *plane_state)
+{
+	const struct drm_framebuffer *fb = plane_state->hw.fb;
+
+	return fb->modifier == I915_FORMAT_MOD_X_TILED;
+}
+
+static bool skl_fbc_tiling_valid(const struct intel_plane_state *plane_state)
 {
-	struct drm_i915_private *i915 = to_i915(plane_state->uapi.plane->dev);
 	const struct drm_framebuffer *fb = plane_state->hw.fb;
 
 	switch (fb->modifier) {
 	case DRM_FORMAT_MOD_LINEAR:
 	case I915_FORMAT_MOD_Y_TILED:
 	case I915_FORMAT_MOD_Yf_TILED:
-		return DISPLAY_VER(i915) >= 9;
 	case I915_FORMAT_MOD_4_TILED:
 	case I915_FORMAT_MOD_X_TILED:
 		return true;
@@ -1002,6 +1007,16 @@ static bool tiling_is_valid(const struct intel_plane_state *plane_state)
 	}
 }
 
+static bool tiling_is_valid(const struct intel_plane_state *plane_state)
+{
+	struct drm_i915_private *i915 = to_i915(plane_state->uapi.plane->dev);
+
+	if (DISPLAY_VER(i915) >= 9)
+		return skl_fbc_tiling_valid(plane_state);
+	else
+		return i8xx_fbc_tiling_valid(plane_state);
+}
+
 static void intel_fbc_update_state(struct intel_atomic_state *state,
 				   struct intel_crtc *crtc,
 				   struct intel_plane *plane)
-- 
2.41.0


  parent reply	other threads:[~2023-09-14 11:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 11:38 [Intel-gfx] [PATCH 1/5] drm/i915/fbc: Remove ancient 16k plane stride limit Ville Syrjala
2023-09-14 11:38 ` [Intel-gfx] [PATCH 2/5] drm/i915/fbc: Split plane stride checks per-platform Ville Syrjala
2023-10-01 10:53   ` Govindapillai, Vinod
2023-10-02  7:02     ` Ville Syrjälä
2023-10-02  7:32       ` Govindapillai, Vinod
2023-09-14 11:38 ` Ville Syrjala [this message]
2023-10-01 11:00   ` [Intel-gfx] [PATCH 3/5] drm/i915/fbc: Split plane tiling " Govindapillai, Vinod
2023-10-02  6:55     ` Ville Syrjälä
2023-09-14 11:38 ` [Intel-gfx] [PATCH 4/5] drm/i915/fbc: Split plane rotation " Ville Syrjala
2023-10-01 11:03   ` Govindapillai, Vinod
2023-09-14 11:38 ` [Intel-gfx] [PATCH 5/5] drm/i915/fbc: Split plane pixel format " Ville Syrjala
2023-10-01 11:08   ` Govindapillai, Vinod
2023-09-14 20:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/5] drm/i915/fbc: Remove ancient 16k plane stride limit Patchwork
2023-09-15  5:15 ` [Intel-gfx] [PATCH 1/5] " Sharma, Swati2
2023-09-15 16:48 ` Matt Roper
2023-09-15 16:54   ` Ville Syrjälä
2023-09-29 13:08 ` Juha-Pekka Heikkila
2023-09-29 16:27 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/5] drm/i915/fbc: Remove ancient 16k plane stride limit (rev2) Patchwork
2023-09-29 23:41 ` [Intel-gfx] ✗ 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=20230914113854.10008-3-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.