All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/1] Test over 32k long stride length on icl+
@ 2020-03-19 18:06 Juha-Pekka Heikkila
  2020-03-19 18:06 ` [Intel-gfx] [PATCH 1/1] drm/i915: Allow gen11 to use over 32k long strides Juha-Pekka Heikkila
  0 siblings, 1 reply; 3+ messages in thread
From: Juha-Pekka Heikkila @ 2020-03-19 18:06 UTC (permalink / raw)
  To: intel-gfx

Testing part is left with TODO comment for anything older than gen5

Test-with: 20200319180322.5451-1-juhapekka.heikkila@gmail.com

Juha-Pekka Heikkila (1):
  drm/i915: Allow gen11 to use over 32k long strides

 drivers/gpu/drm/i915/display/intel_sprite.c | 30 ++++++++++++++++-----
 1 file changed, 24 insertions(+), 6 deletions(-)

-- 
2.17.1

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Intel-gfx] [PATCH 1/1] drm/i915: Allow gen11 to use over 32k long strides
  2020-03-19 18:06 [Intel-gfx] [PATCH 0/1] Test over 32k long stride length on icl+ Juha-Pekka Heikkila
@ 2020-03-19 18:06 ` Juha-Pekka Heikkila
  0 siblings, 0 replies; 3+ messages in thread
From: Juha-Pekka Heikkila @ 2020-03-19 18:06 UTC (permalink / raw)
  To: intel-gfx

The stride in bytes must not exceed the size of 8K pixels.
Linear 64 bpp pixel format maximum stride in tiles is 1024
which would mean gen11 support 64k long stride.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 drivers/gpu/drm/i915/display/intel_sprite.c | 30 ++++++++++++++++-----
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
index db80367c0dbc..d829c0be923e 100644
--- a/drivers/gpu/drm/i915/display/intel_sprite.c
+++ b/drivers/gpu/drm/i915/display/intel_sprite.c
@@ -383,16 +383,34 @@ skl_plane_max_stride(struct intel_plane *plane,
 		     unsigned int rotation)
 {
 	const struct drm_format_info *info = drm_format_info(pixel_format);
+	struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
 	int cpp = info->cpp[0];
+	int max_stride_bytes;
+
+	if (INTEL_GEN(dev_priv) >= 11) {
+		/*
+		 * The stride in bytes must not exceed the
+		 * size of 8K pixels. Linear 64 bpp pixel format
+		 * Maximum Stride in tiles = 1024
+		 * which would mean ICL support 64k long stride.
+		 * Linear modifier seems to not work with maximum length.
+		 */
+		if (modifier == DRM_FORMAT_MOD_LINEAR)
+			max_stride_bytes = 65536-64;
+		else
+			max_stride_bytes = 65536;
+	} else {
+		/*
+		 * "The stride in bytes must not exceed the
+		 * of the size of 8K pixels and 32K bytes."
+		 */
+		max_stride_bytes = 32768;
+	}
 
-	/*
-	 * "The stride in bytes must not exceed the
-	 * of the size of 8K pixels and 32K bytes."
-	 */
 	if (drm_rotation_90_or_270(rotation))
-		return min(8192, 32768 / cpp);
+		return min(8192, max_stride_bytes / cpp);
 	else
-		return min(8192 * cpp, 32768);
+		return min(8192 * cpp, max_stride_bytes);
 }
 
 static void
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Intel-gfx] [PATCH 0/1] Test over 32k long stride length on icl+
@ 2020-03-19 20:21 Juha-Pekka Heikkila
  0 siblings, 0 replies; 3+ messages in thread
From: Juha-Pekka Heikkila @ 2020-03-19 20:21 UTC (permalink / raw)
  To: intel-gfx

Testing part is left with TODO comment for anything older than gen5
Resend because IGT part failed.

Test-with: 20200319193644.7417-1-juhapekka.heikkila@gmail.com

Juha-Pekka Heikkila (1):
  drm/i915: Allow gen11 to use over 32k long strides

 drivers/gpu/drm/i915/display/intel_sprite.c | 30 ++++++++++++++++-----
 1 file changed, 24 insertions(+), 6 deletions(-)

-- 
2.17.1

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-19 20:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 18:06 [Intel-gfx] [PATCH 0/1] Test over 32k long stride length on icl+ Juha-Pekka Heikkila
2020-03-19 18:06 ` [Intel-gfx] [PATCH 1/1] drm/i915: Allow gen11 to use over 32k long strides Juha-Pekka Heikkila
2020-03-19 20:21 [Intel-gfx] [PATCH 0/1] Test over 32k long stride length on icl+ Juha-Pekka Heikkila

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.