diff mbox series

drm/i915: Apply Wa_14011264657:gen11+

Message ID 20200812210702.7153-1-matthew.s.atwood@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Apply Wa_14011264657:gen11+ | expand

Commit Message

Matt Atwood Aug. 12, 2020, 9:07 p.m. UTC
Add minimum width to planes, variable with specific formats for gen11+
to reflect recent bspec changes.

Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 54 +++++++++++++++++---
 1 file changed, 46 insertions(+), 8 deletions(-)

Comments

Souza, Jose Aug. 19, 2020, 10:38 p.m. UTC | #1
On Wed, 2020-08-12 at 14:07 -0700, Matt Atwood wrote:
> Add minimum width to planes, variable with specific formats for gen11+
> to reflect recent bspec changes.
> 
> Signed-off-by: Matt Atwood <
> matthew.s.atwood@intel.com
> >
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 54 +++++++++++++++++---
>  1 file changed, 46 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 2ddabf92adde..b5ebcff8d56e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -3762,6 +3762,44 @@ static int glk_max_plane_width(const struct drm_framebuffer *fb,
>  	}
>  }
>  
> +static int icl_min_plane_width(const struct drm_framebuffer *fb)
> +{
> +	/* Wa_14011264657, Wa_14011050563: gen11+ */
> +	switch (fb->format->format) {
> +	case DRM_FORMAT_C8:
> +		return 18;
> +	case DRM_FORMAT_RGB565:
> +		return 10;
> +	case DRM_FORMAT_XRGB8888:
> +	case DRM_FORMAT_XBGR8888:
> +	case DRM_FORMAT_ARGB8888:
> +	case DRM_FORMAT_ABGR8888:
> +	case DRM_FORMAT_XRGB2101010:
> +	case DRM_FORMAT_XBGR2101010:
> +	case DRM_FORMAT_ARGB2101010:
> +	case DRM_FORMAT_ABGR2101010:
> +	case DRM_FORMAT_XVYU2101010:
> +	case DRM_FORMAT_Y212:
> +	case DRM_FORMAT_Y216:
> +		return 6;
> +	case DRM_FORMAT_NV12:
> +		return 20;
> +	case DRM_FORMAT_P010:
> +	case DRM_FORMAT_P012:
> +	case DRM_FORMAT_P016:
> +		return 12;
> +	case DRM_FORMAT_XRGB16161616F:
> +	case DRM_FORMAT_XBGR16161616F:
> +	case DRM_FORMAT_ARGB16161616F:
> +	case DRM_FORMAT_ABGR16161616F:
> +	case DRM_FORMAT_XVYU12_16161616:
> +	case DRM_FORMAT_XVYU16161616:
> +		return 4;
> +	default:
> +		return 1;
> +	}
> +}
> +
>  static int icl_max_plane_width(const struct drm_framebuffer *fb,
>  			       int color_plane,
>  			       unsigned int rotation)
> @@ -3844,15 +3882,15 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
>  	int y = plane_state->uapi.src.y1 >> 16;
>  	int w = drm_rect_width(&plane_state->uapi.src) >> 16;
>  	int h = drm_rect_height(&plane_state->uapi.src) >> 16;
> -	int max_width;
> -	int max_height;
> -	u32 alignment;
> -	u32 offset;
> +	int max_width, min_width = 1, max_height;
> +	u32 alignment, offset;
>  	int aux_plane = intel_main_to_aux_plane(fb, 0);
>  	u32 aux_offset = plane_state->color_plane[aux_plane].offset;
>  
> -	if (INTEL_GEN(dev_priv) >= 11)
> +	if (INTEL_GEN(dev_priv) >= 11) {
>  		max_width = icl_max_plane_width(fb, 0, rotation);
> +		min_width = icl_min_plane_width(fb);
> +	}

With the style fixed, LGTM.
It is small enough to be fixed while pushing it, will fix and push it for you.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

>  	else if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
>  		max_width = glk_max_plane_width(fb, 0, rotation);
>  	else
> @@ -3863,10 +3901,10 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
>  	else
>  		max_height = skl_max_plane_height();
>  
> -	if (w > max_width || h > max_height) {
> +	if (w > max_width || w < min_width || h > max_height) {
>  		drm_dbg_kms(&dev_priv->drm,
> -			    "requested Y/RGB source size %dx%d too big (limit %dx%d)\n",
> -			    w, h, max_width, max_height);
> +			    "requested Y/RGB source size %dx%d outside limits (min: %dx1 max: %dx%d)\n",
> +			    w, h, min_width, max_width, max_height);
>  		return -EINVAL;
>  	}
>  
>
Souza, Jose Aug. 19, 2020, 10:53 p.m. UTC | #2
On Thu, 2020-08-13 at 03:28 +0000, Patchwork wrote:
> Patch Details
> Series:	drm/i915: Apply Wa_14011264657:gen11+ (rev2)
> URL:	https://patchwork.freedesktop.org/series/78430/
> State:	success
> Details:	https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18349/index.html
> CI Bug Log - changes from CI_DRM_8879_full -> Patchwork_18349_full
> Summary
> SUCCESS
> 
> No regressions found.

Pushed to dinq with a minor checkstyle fix, thanks for the patch.

> 
> Known issues
> Here are the changes found in Patchwork_18349_full that come from known issues:
> 
> IGT changes
> Issues hit
> igt@kms_concurrent@pipe-c:
> 
> shard-skl: PASS -> DMESG-WARN (i915#1982) +11 similar issues
> igt@kms_cursor_crc@pipe-c-cursor-suspend:
> 
> shard-iclb: PASS -> INCOMPLETE (i915#1185)
> igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a1:
> 
> shard-glk: PASS -> FAIL (i915#79)
> igt@kms_flip@flip-vs-suspend@c-dp1:
> 
> shard-kbl: PASS -> DMESG-WARN (i915#180) +4 similar issues
> igt@kms_flip@plain-flip-ts-check-interruptible@b-edp1:
> 
> shard-skl: PASS -> FAIL (i915#2122)
> igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-mmap-cpu:
> 
> shard-kbl: PASS -> DMESG-WARN (i915#1982)
> igt@kms_frontbuffer_tracking@psr-shrfb-scaledprimary:
> 
> shard-iclb: PASS -> DMESG-WARN (i915#1982) +1 similar issue
> igt@kms_hdr@bpc-switch-dpms:
> 
> shard-skl: PASS -> FAIL (i915#1188)
> igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
> 
> shard-skl: PASS -> FAIL (fdo#108145 / i915#265) +1 similar issue
> igt@kms_plane_scaling@pipe-b-scaler-with-rotation:
> 
> shard-iclb: PASS -> FAIL (fdo#109052) +4 similar issues
> igt@kms_plane_scaling@pipe-d-scaler-with-pixel-format:
> 
> shard-tglb: PASS -> FAIL (i915#1214) +6 similar issues
> igt@kms_psr@psr2_cursor_plane_onoff:
> 
> shard-iclb: PASS -> SKIP (fdo#109441)
> Possible fixes
> igt@gem_exec_whisper@basic-contexts-forked:
> 
> shard-glk: DMESG-WARN (i915#118 / i915#95) -> PASS +1 similar issue
> igt@gem_pwrite@basic-random:
> 
> shard-snb: TIMEOUT (i915#1958) -> PASS +2 similar issues
> igt@i915_selftest@live@execlists:
> 
> shard-tglb: INCOMPLETE (i915#2268) -> PASS
> igt@i915_selftest@mock@contexts:
> 
> shard-skl: INCOMPLETE (i915#198 / i915#2278) -> PASS
> igt@kms_big_fb@linear-64bpp-rotate-0:
> 
> shard-glk: DMESG-FAIL (i915#118 / i915#95) -> PASS
> igt@kms_color@pipe-b-ctm-0-5:
> 
> shard-skl: FAIL (i915#182) -> PASS
> igt@kms_color@pipe-c-ctm-0-25:
> 
> shard-skl: DMESG-WARN (i915#1982) -> PASS +8 similar issues
> igt@kms_color@pipe-c-ctm-green-to-red:
> 
> shard-skl: FAIL (i915#129) -> PASS
> igt@kms_cursor_crc@pipe-a-cursor-64x64-offscreen:
> 
> shard-apl: FAIL (i915#1635 / i915#54) -> PASS
> igt@kms_cursor_crc@pipe-a-cursor-suspend:
> 
> shard-kbl: DMESG-WARN (i915#180) -> PASS +7 similar issues
> igt@kms_flip@flip-vs-expired-vblank-interruptible@a-edp1:
> 
> shard-skl: FAIL (i915#79) -> PASS +1 similar issue
> igt@kms_flip@flip-vs-suspend-interruptible@b-edp1:
> 
> shard-skl: INCOMPLETE (i915#198) -> PASS
> igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-mmap-cpu:
> 
> shard-tglb: DMESG-WARN (i915#1982) -> PASS +2 similar issues
> igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-render:
> 
> shard-iclb: DMESG-WARN (i915#1982) -> PASS +1 similar issue
> igt@kms_hdr@bpc-switch:
> 
> shard-skl: FAIL (i915#1188) -> PASS
> igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
> 
> shard-skl: FAIL (fdo#108145 / i915#265) -> PASS
> igt@kms_psr2_su@frontbuffer:
> 
> shard-iclb: SKIP (fdo#109642 / fdo#111068) -> PASS
> igt@kms_psr@psr2_sprite_plane_move:
> 
> shard-iclb: SKIP (fdo#109441) -> PASS
> igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
> 
> shard-skl: INCOMPLETE -> PASS
> igt@perf@blocking-parameterized:
> 
> shard-iclb: FAIL (i915#1542) -> PASS
> Warnings
> igt@gem_exec_reloc@basic-concurrent16:
> 
> shard-snb: TIMEOUT (i915#1958) -> FAIL (i915#1930)
> 
> shard-glk: TIMEOUT (i915#1958) -> INCOMPLETE (i915#1958)
> 
> igt@kms_color@pipe-a-ctm-max:
> 
> shard-snb: TIMEOUT (i915#1958) -> SKIP (fdo#109271) +1 similar issue
> igt@kms_color_chamelium@pipe-c-ctm-0-5:
> 
> shard-snb: TIMEOUT (i915#1958) -> SKIP (fdo#109271 / fdo#111827)
> igt@kms_content_protection@srm:
> 
> shard-kbl: TIMEOUT (i915#1319) -> TIMEOUT (i915#1319 / i915#1958)
> igt@kms_dp_dsc@basic-dsc-enable-edp:
> 
> shard-iclb: SKIP (fdo#109349) -> DMESG-WARN (i915#1226)
> igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
> 
> shard-skl: FAIL (fdo#108145 / i915#265) -> DMESG-FAIL (fdo#108145 / i915#1982)
> Participating hosts (11 -> 11)
> No changes in participating hosts
> 
> Build changes
> Linux: CI_DRM_8879 -> Patchwork_18349
> CI-20190529: 20190529
> CI_DRM_8879: 383f247a5884778b21e17dc9537e0bdeae503953 @ git://anongit.freedesktop.org/gfx-ci/linux
> IGT_5768: 4ce2f30715836214d7b4452ada8c63b23eba73b7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
> Patchwork_18349: 9ee56d53b00b040e07daff2d2b805c8d4992a091 @ git://anongit.freedesktop.org/gfx-ci/linux
> piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> 
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 2ddabf92adde..b5ebcff8d56e 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -3762,6 +3762,44 @@  static int glk_max_plane_width(const struct drm_framebuffer *fb,
 	}
 }
 
+static int icl_min_plane_width(const struct drm_framebuffer *fb)
+{
+	/* Wa_14011264657, Wa_14011050563: gen11+ */
+	switch (fb->format->format) {
+	case DRM_FORMAT_C8:
+		return 18;
+	case DRM_FORMAT_RGB565:
+		return 10;
+	case DRM_FORMAT_XRGB8888:
+	case DRM_FORMAT_XBGR8888:
+	case DRM_FORMAT_ARGB8888:
+	case DRM_FORMAT_ABGR8888:
+	case DRM_FORMAT_XRGB2101010:
+	case DRM_FORMAT_XBGR2101010:
+	case DRM_FORMAT_ARGB2101010:
+	case DRM_FORMAT_ABGR2101010:
+	case DRM_FORMAT_XVYU2101010:
+	case DRM_FORMAT_Y212:
+	case DRM_FORMAT_Y216:
+		return 6;
+	case DRM_FORMAT_NV12:
+		return 20;
+	case DRM_FORMAT_P010:
+	case DRM_FORMAT_P012:
+	case DRM_FORMAT_P016:
+		return 12;
+	case DRM_FORMAT_XRGB16161616F:
+	case DRM_FORMAT_XBGR16161616F:
+	case DRM_FORMAT_ARGB16161616F:
+	case DRM_FORMAT_ABGR16161616F:
+	case DRM_FORMAT_XVYU12_16161616:
+	case DRM_FORMAT_XVYU16161616:
+		return 4;
+	default:
+		return 1;
+	}
+}
+
 static int icl_max_plane_width(const struct drm_framebuffer *fb,
 			       int color_plane,
 			       unsigned int rotation)
@@ -3844,15 +3882,15 @@  static int skl_check_main_surface(struct intel_plane_state *plane_state)
 	int y = plane_state->uapi.src.y1 >> 16;
 	int w = drm_rect_width(&plane_state->uapi.src) >> 16;
 	int h = drm_rect_height(&plane_state->uapi.src) >> 16;
-	int max_width;
-	int max_height;
-	u32 alignment;
-	u32 offset;
+	int max_width, min_width = 1, max_height;
+	u32 alignment, offset;
 	int aux_plane = intel_main_to_aux_plane(fb, 0);
 	u32 aux_offset = plane_state->color_plane[aux_plane].offset;
 
-	if (INTEL_GEN(dev_priv) >= 11)
+	if (INTEL_GEN(dev_priv) >= 11) {
 		max_width = icl_max_plane_width(fb, 0, rotation);
+		min_width = icl_min_plane_width(fb);
+	}
 	else if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
 		max_width = glk_max_plane_width(fb, 0, rotation);
 	else
@@ -3863,10 +3901,10 @@  static int skl_check_main_surface(struct intel_plane_state *plane_state)
 	else
 		max_height = skl_max_plane_height();
 
-	if (w > max_width || h > max_height) {
+	if (w > max_width || w < min_width || h > max_height) {
 		drm_dbg_kms(&dev_priv->drm,
-			    "requested Y/RGB source size %dx%d too big (limit %dx%d)\n",
-			    w, h, max_width, max_height);
+			    "requested Y/RGB source size %dx%d outside limits (min: %dx1 max: %dx%d)\n",
+			    w, h, min_width, max_width, max_height);
 		return -EINVAL;
 	}