All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 06/11] drm/i915/xelpd: Fallback to plane stride limitations when using DPT
Date: Wed, 14 Apr 2021 18:52:03 +0300	[thread overview]
Message-ID: <20210414155208.3161335-7-imre.deak@intel.com> (raw)
In-Reply-To: <20210414155208.3161335-1-imre.deak@intel.com>

From: José Roberto de Souza <jose.souza@intel.com>

GTT remapping allow us to have planes with strides larger than HW
supports but DPT + GTT remapping is still not properly handled so
falling back to plane HW limitations for now.

This patch can be dropped when DPT + GTT remapping is correctly
handled but until then we need this limitation for all display13
platforms to avoid pipe faults.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Clint Taylor <Clinton.A.Taylor@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c      | 15 +++++++--------
 .../gpu/drm/i915/display/intel_display_types.h    |  8 ++++++--
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 00621ccea2c40..ce685a7ba6a1d 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1588,14 +1588,13 @@ u32 intel_fb_max_stride(struct drm_i915_private *dev_priv,
 	 *
 	 * The new CCS hash mode makes remapping impossible
 	 */
-	if (!is_ccs_modifier(modifier)) {
-		if (DISPLAY_VER(dev_priv) >= 7)
-			return 256*1024;
-		else if (DISPLAY_VER(dev_priv) >= 4)
-			return 128*1024;
-	}
-
-	return intel_plane_fb_max_stride(dev_priv, pixel_format, modifier);
+	if (DISPLAY_VER(dev_priv) < 4 || is_ccs_modifier(modifier) ||
+	    intel_modifier_uses_dpt(dev_priv, modifier))
+		return intel_plane_fb_max_stride(dev_priv, pixel_format, modifier);
+	else if (DISPLAY_VER(dev_priv) >= 7)
+		return 256 * 1024;
+	else
+		return 128 * 1024;
 }
 
 static u32
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 3c73737f88da4..cdc8fcb8c2aa7 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1976,10 +1976,14 @@ intel_wait_for_vblank_if_active(struct drm_i915_private *dev_priv, enum pipe pip
 		intel_wait_for_vblank(dev_priv, pipe);
 }
 
+static inline bool intel_modifier_uses_dpt(struct drm_i915_private *i915, u64 modifier)
+{
+	return DISPLAY_VER(i915) >= 13 && modifier != DRM_FORMAT_MOD_LINEAR;
+}
+
 static inline bool intel_fb_uses_dpt(const struct drm_framebuffer *fb)
 {
-	return fb && DISPLAY_VER(to_i915(fb->dev)) >= 13 &&
-		fb->modifier != DRM_FORMAT_MOD_LINEAR;
+	return fb && intel_modifier_uses_dpt(to_i915(fb->dev), fb->modifier);
 }
 
 static inline u32 intel_plane_ggtt_offset(const struct intel_plane_state *plane_state)
-- 
2.27.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2021-04-14 15:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 15:51 [Intel-gfx] [PATCH 00/11] drm/i915/adl_p: Add support for Display Page Tables Imre Deak
2021-04-14 15:51 ` [Intel-gfx] [PATCH 01/11] drm/i915: Pass intel_framebuffer instad of drm_framebuffer to intel_fill_fb_info() Imre Deak
2021-04-14 15:51 ` [Intel-gfx] [PATCH 02/11] drm/i915/xelpd: add XE_LPD display characteristics Imre Deak
2021-05-05 23:55   ` Souza, Jose
2021-04-14 15:52 ` [Intel-gfx] [PATCH 03/11] drm/i915/adl_p: Add PCI Devices IDs Imre Deak
2021-04-14 15:52 ` [Intel-gfx] [PATCH 04/11] drm/i915/adl_p: ADL_P device info enabling Imre Deak
2021-05-05 23:54   ` Souza, Jose
2021-04-14 15:52 ` [Intel-gfx] [PATCH 05/11] drm/i915/xelpd: First stab at DPT support Imre Deak
2021-04-14 15:52 ` Imre Deak [this message]
2021-04-14 15:52 ` [Intel-gfx] [PATCH 07/11] drm/i915/xelpd: Support 128k plane stride Imre Deak
2021-04-14 15:52 ` [Intel-gfx] [PATCH 08/11] drm/i915/adl_p: Add stride restriction when using DPT Imre Deak
2021-04-14 15:52 ` [Intel-gfx] [PATCH 09/11] drm/i915/adl_p: Disable support for 90/270 FB rotation Imre Deak
2021-04-14 15:52 ` [Intel-gfx] [PATCH 10/11] drm/i915/adl_p: Require a minimum of 8 tiles stride for DPT FBs Imre Deak
2021-04-15 22:12   ` Imre Deak
2021-05-06 11:11     ` Kahola, Mika
2021-04-14 15:52 ` [Intel-gfx] [PATCH 11/11] drm/i915/adl_p: Enable remapping to pad DPT FB strides to POT Imre Deak
2021-04-14 17:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/adl_p: Add support for Display Page Tables Patchwork
2021-04-14 17:50 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-04-14 20:32 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-04-15 11:29 ` [Intel-gfx] [PATCH 00/11] " Jani Nikula
2021-04-21 11:03   ` Jani Nikula
2021-04-21 11:24     ` Imre Deak
2021-04-21 12:12       ` Jani Nikula
2021-04-21 19:21         ` Imre Deak

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=20210414155208.3161335-7-imre.deak@intel.com \
    --to=imre.deak@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.