All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Relocate SKL+ NV12 src width w/a
@ 2018-10-18 19:59 Ville Syrjala
  2018-10-18 19:59 ` [PATCH 2/2] drm/i915: Move the SKL+ zero constant alpha handling Ville Syrjala
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Ville Syrjala @ 2018-10-18 19:59 UTC (permalink / raw)
  To: intel-gfx

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

The SKL+ NV12 src width alignment w/a is still living in an odd place.
Everything else was already relocated closer to the main plane check
function. Move this workaround as well.

As a bonus we avoid the funky rotated vs. not mess with the src
coordinates as this now gets checked before we rotate the coordinates.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 25 -------------------------
 drivers/gpu/drm/i915/intel_sprite.c  | 21 +++++++++++++++++++++
 2 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index fc7e3b0bd95c..940d514cf9d7 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3049,28 +3049,6 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
 	return 0;
 }
 
-static int
-skl_check_nv12_surface(struct intel_plane_state *plane_state)
-{
-	/* Display WA #1106 */
-	if (plane_state->base.rotation !=
-	    (DRM_MODE_REFLECT_X | DRM_MODE_ROTATE_90) &&
-	    plane_state->base.rotation != DRM_MODE_ROTATE_270)
-		return 0;
-
-	/*
-	 * src coordinates are rotated here.
-	 * We check height but report it as width
-	 */
-	if (((drm_rect_height(&plane_state->base.src) >> 16) % 4) != 0) {
-		DRM_DEBUG_KMS("src width must be multiple "
-			      "of 4 for rotated NV12\n");
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
 static int skl_check_nv12_aux_surface(struct intel_plane_state *plane_state)
 {
 	const struct drm_framebuffer *fb = plane_state->base.fb;
@@ -3153,9 +3131,6 @@ int skl_check_plane_surface(struct intel_plane_state *plane_state)
 	 * the main surface setup depends on it.
 	 */
 	if (fb->format->format == DRM_FORMAT_NV12) {
-		ret = skl_check_nv12_surface(plane_state);
-		if (ret)
-			return ret;
 		ret = skl_check_nv12_aux_surface(plane_state);
 		if (ret)
 			return ret;
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 7cd59eee5cad..0fe6c664e83c 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -1342,6 +1342,23 @@ static int skl_plane_check_dst_coordinates(const struct intel_crtc_state *crtc_s
 	return 0;
 }
 
+static int skl_plane_check_nv12_rotation(const struct intel_plane_state *plane_state)
+{
+	const struct drm_framebuffer *fb = plane_state->base.fb;
+	unsigned int rotation = plane_state->base.rotation;
+	int src_w = drm_rect_width(&plane_state->base.src) >> 16;
+
+	/* Display WA #1106 */
+	if (fb->format->format == DRM_FORMAT_NV12 && src_w & 3 &&
+	    (rotation == DRM_MODE_ROTATE_270 ||
+	     rotation == (DRM_MODE_REFLECT_X | DRM_MODE_ROTATE_90))) {
+		DRM_DEBUG_KMS("src width must be multiple of 4 for rotated NV12\n");
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
 static int skl_plane_check(struct intel_crtc_state *crtc_state,
 			   struct intel_plane_state *plane_state)
 {
@@ -1380,6 +1397,10 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
 	if (ret)
 		return ret;
 
+	ret = skl_plane_check_nv12_rotation(plane_state);
+	if (ret)
+		return ret;
+
 	ret = skl_check_plane_surface(plane_state);
 	if (ret)
 		return ret;
-- 
2.18.1

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

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

* [PATCH 2/2] drm/i915: Move the SKL+ zero constant alpha handling
  2018-10-18 19:59 [PATCH 1/2] drm/i915: Relocate SKL+ NV12 src width w/a Ville Syrjala
@ 2018-10-18 19:59 ` Ville Syrjala
  2018-10-18 20:56 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Relocate SKL+ NV12 src width w/a Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Ville Syrjala @ 2018-10-18 19:59 UTC (permalink / raw)
  To: intel-gfx

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

Let's run through the entire plane check even when the plane
is invisible due to zero constant alpha. This makes for more
consistent behaviour since we check the src/dst coordinates,
stride etc. against the hardware limits.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 4 ----
 drivers/gpu/drm/i915/intel_sprite.c  | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 940d514cf9d7..43d8ce895736 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3113,10 +3113,6 @@ int skl_check_plane_surface(struct intel_plane_state *plane_state)
 	if (ret)
 		return ret;
 
-	/* HW only has 8 bits pixel precision, disable plane if invisible */
-	if (!(plane_state->base.alpha >> 8))
-		plane_state->base.visible = false;
-
 	if (!plane_state->base.visible)
 		return 0;
 
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 0fe6c664e83c..0b87e552a066 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -1405,6 +1405,10 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
 	if (ret)
 		return ret;
 
+	/* HW only has 8 bits pixel precision, disable plane if invisible */
+	if (!(plane_state->base.alpha >> 8))
+		plane_state->base.visible = false;
+
 	plane_state->ctl = skl_plane_ctl(crtc_state, plane_state);
 
 	if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
-- 
2.18.1

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

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

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Relocate SKL+ NV12 src width w/a
  2018-10-18 19:59 [PATCH 1/2] drm/i915: Relocate SKL+ NV12 src width w/a Ville Syrjala
  2018-10-18 19:59 ` [PATCH 2/2] drm/i915: Move the SKL+ zero constant alpha handling Ville Syrjala
@ 2018-10-18 20:56 ` Patchwork
  2018-10-19  0:13 ` ✗ Fi.CI.IGT: failure " Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-10-18 20:56 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Relocate SKL+ NV12 src width w/a
URL   : https://patchwork.freedesktop.org/series/51215/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5010 -> Patchwork_10508 =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_10508 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10508, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/51215/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10508:

  === IGT changes ===

    ==== Warnings ====

    igt@drv_selftest@live_guc:
      fi-apl-guc:         SKIP -> PASS

    
== Known issues ==

  Here are the changes found in Patchwork_10508 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-reload:
      fi-blb-e6850:       PASS -> INCOMPLETE (fdo#107718)

    igt@kms_flip@basic-flip-vs-dpms:
      fi-hsw-4770r:       PASS -> DMESG-WARN (fdo#105602)

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362, fdo#103191)

    igt@kms_setmode@basic-clone-single-crtc:
      fi-ilk-650:         PASS -> DMESG-WARN (fdo#106387)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_execlists:
      fi-apl-guc:         INCOMPLETE (fdo#106693) -> PASS

    igt@kms_flip@basic-plain-flip:
      fi-ilk-650:         DMESG-WARN (fdo#106387) -> PASS

    igt@kms_frontbuffer_tracking@basic:
      fi-icl-u2:          FAIL (fdo#103167) -> PASS
      fi-byt-clapper:     FAIL (fdo#103167) -> PASS

    igt@pm_rpm@module-reload:
      fi-glk-j4005:       DMESG-WARN (fdo#106000) -> PASS

    
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
  fdo#106387 https://bugs.freedesktop.org/show_bug.cgi?id=106387
  fdo#106693 https://bugs.freedesktop.org/show_bug.cgi?id=106693
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718


== Participating hosts (43 -> 38) ==

  Missing    (5): fi-ilk-m540 fi-skl-guc fi-byt-squawks fi-bsw-cyan fi-pnv-d510 


== Build changes ==

    * Linux: CI_DRM_5010 -> Patchwork_10508

  CI_DRM_5010: 27a4f334d3ec8882d50227c26ae4e393d7d1f4a1 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4683: 7766b1e2348b32cc8ed58a972c6fd53b20279549 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10508: 3d39906f9b8c3e070672de4d3bbaeda78e6eedf0 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

3d39906f9b8c drm/i915: Move the SKL+ zero constant alpha handling
b8ce7f55076b drm/i915: Relocate SKL+ NV12 src width w/a

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10508/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.IGT: failure for series starting with [1/2] drm/i915: Relocate SKL+ NV12 src width w/a
  2018-10-18 19:59 [PATCH 1/2] drm/i915: Relocate SKL+ NV12 src width w/a Ville Syrjala
  2018-10-18 19:59 ` [PATCH 2/2] drm/i915: Move the SKL+ zero constant alpha handling Ville Syrjala
  2018-10-18 20:56 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Relocate SKL+ NV12 src width w/a Patchwork
@ 2018-10-19  0:13 ` Patchwork
  2018-10-23 13:25 ` [PATCH 1/2] " Maarten Lankhorst
  2018-10-23 14:22 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] " Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-10-19  0:13 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Relocate SKL+ NV12 src width w/a
URL   : https://patchwork.freedesktop.org/series/51215/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_5010_full -> Patchwork_10508_full =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_10508_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10508_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10508_full:

  === IGT changes ===

    ==== Possible regressions ====

    igt@syncobj_wait@wait-for-submit-complex:
      shard-skl:          NOTRUN -> INCOMPLETE +1

    
== Known issues ==

  Here are the changes found in Patchwork_10508_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@shrink:
      shard-skl:          NOTRUN -> INCOMPLETE (fdo#106886)

    igt@gem_exec_schedule@independent-render:
      shard-snb:          NOTRUN -> INCOMPLETE (fdo#105411) +1

    igt@gem_exec_schedule@pi-ringfull-vebox:
      shard-skl:          NOTRUN -> FAIL (fdo#103158)

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
      shard-skl:          NOTRUN -> DMESG-WARN (fdo#107956)

    igt@kms_color@pipe-a-legacy-gamma:
      shard-apl:          PASS -> FAIL (fdo#108145, fdo#104782)

    igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
      shard-apl:          NOTRUN -> FAIL (fdo#108145)

    igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
      shard-skl:          NOTRUN -> FAIL (fdo#108146)

    igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
      shard-glk:          PASS -> FAIL (fdo#103166)

    igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
      shard-apl:          PASS -> FAIL (fdo#103166)

    igt@kms_setmode@basic:
      shard-apl:          NOTRUN -> FAIL (fdo#99912)

    igt@syncobj_wait@wait-all-for-submit-complex:
      shard-glk:          NOTRUN -> INCOMPLETE (fdo#103359, k.org#198133)

    
    ==== Possible fixes ====

    igt@gem_pwrite_pread@uncached-pwrite-blt-gtt_mmap-performance:
      shard-apl:          INCOMPLETE (fdo#103927) -> PASS

    igt@gem_softpin@noreloc-s3:
      shard-skl:          INCOMPLETE (fdo#104108, fdo#107773) -> PASS

    igt@kms_cursor_crc@cursor-128x128-suspend:
      shard-glk:          INCOMPLETE (fdo#103359, k.org#198133) -> PASS

    igt@kms_cursor_crc@cursor-256x85-sliding:
      shard-glk:          FAIL (fdo#103232) -> PASS

    igt@kms_flip@flip-vs-modeset-interruptible:
      shard-kbl:          DMESG-WARN (fdo#103558, fdo#105602) -> PASS +4

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
      shard-glk:          FAIL (fdo#103167) -> PASS +4

    igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-render:
      shard-glk:          DMESG-FAIL (fdo#106538) -> PASS

    igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-blt:
      shard-snb:          INCOMPLETE (fdo#105411) -> SKIP

    igt@kms_plane@plane-position-covered-pipe-a-planes:
      shard-glk:          FAIL (fdo#103166) -> PASS

    igt@kms_setmode@basic:
      shard-hsw:          FAIL (fdo#99912) -> PASS

    igt@kms_vblank@pipe-b-ts-continuation-idle-hang:
      shard-glk:          DMESG-WARN (fdo#106538, fdo#105763) -> PASS +1

    
  fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
  fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
  fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
  fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
  fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
  fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
  fdo#108146 https://bugs.freedesktop.org/show_bug.cgi?id=108146
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (6 -> 6) ==

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_5010 -> Patchwork_10508

  CI_DRM_5010: 27a4f334d3ec8882d50227c26ae4e393d7d1f4a1 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4683: 7766b1e2348b32cc8ed58a972c6fd53b20279549 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10508: 3d39906f9b8c3e070672de4d3bbaeda78e6eedf0 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10508/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/2] drm/i915: Relocate SKL+ NV12 src width w/a
  2018-10-18 19:59 [PATCH 1/2] drm/i915: Relocate SKL+ NV12 src width w/a Ville Syrjala
                   ` (2 preceding siblings ...)
  2018-10-19  0:13 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-10-23 13:25 ` Maarten Lankhorst
  2018-10-23 13:40   ` Ville Syrjälä
  2018-10-23 14:22 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] " Patchwork
  4 siblings, 1 reply; 8+ messages in thread
From: Maarten Lankhorst @ 2018-10-23 13:25 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx

Op 18-10-18 om 21:59 schreef Ville Syrjala:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The SKL+ NV12 src width alignment w/a is still living in an odd place.
> Everything else was already relocated closer to the main plane check
> function. Move this workaround as well.
>
> As a bonus we avoid the funky rotated vs. not mess with the src
> coordinates as this now gets checked before we rotate the coordinates.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 25 -------------------------
>  drivers/gpu/drm/i915/intel_sprite.c  | 21 +++++++++++++++++++++
>  2 files changed, 21 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index fc7e3b0bd95c..940d514cf9d7 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3049,28 +3049,6 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
>  	return 0;
>  }
>  
> -static int
> -skl_check_nv12_surface(struct intel_plane_state *plane_state)
> -{
> -	/* Display WA #1106 */
> -	if (plane_state->base.rotation !=
> -	    (DRM_MODE_REFLECT_X | DRM_MODE_ROTATE_90) &&
> -	    plane_state->base.rotation != DRM_MODE_ROTATE_270)
> -		return 0;
> -
> -	/*
> -	 * src coordinates are rotated here.
> -	 * We check height but report it as width
> -	 */
> -	if (((drm_rect_height(&plane_state->base.src) >> 16) % 4) != 0) {
> -		DRM_DEBUG_KMS("src width must be multiple "
> -			      "of 4 for rotated NV12\n");
> -		return -EINVAL;
> -	}
> -
> -	return 0;
> -}
> -
>  static int skl_check_nv12_aux_surface(struct intel_plane_state *plane_state)
>  {
>  	const struct drm_framebuffer *fb = plane_state->base.fb;
> @@ -3153,9 +3131,6 @@ int skl_check_plane_surface(struct intel_plane_state *plane_state)
>  	 * the main surface setup depends on it.
>  	 */
>  	if (fb->format->format == DRM_FORMAT_NV12) {
> -		ret = skl_check_nv12_surface(plane_state);
> -		if (ret)
> -			return ret;
>  		ret = skl_check_nv12_aux_surface(plane_state);
>  		if (ret)
>  			return ret;
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 7cd59eee5cad..0fe6c664e83c 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -1342,6 +1342,23 @@ static int skl_plane_check_dst_coordinates(const struct intel_crtc_state *crtc_s
>  	return 0;
>  }
>  
> +static int skl_plane_check_nv12_rotation(const struct intel_plane_state *plane_state)
> +{
> +	const struct drm_framebuffer *fb = plane_state->base.fb;
> +	unsigned int rotation = plane_state->base.rotation;
> +	int src_w = drm_rect_width(&plane_state->base.src) >> 16;
> +
> +	/* Display WA #1106 */
> +	if (fb->format->format == DRM_FORMAT_NV12 && src_w & 3 &&
Could we put more nv12 checks here? I want to pull the scaler SRC W/H checks in as well..

Probably stylize it a bit with an early return for !NV12, so all checks come after that. :)

~Maarten

Other than that patch 1-2 look good, so have a r-b with or without those suggested changes.
> +	    (rotation == DRM_MODE_ROTATE_270 ||
> +	     rotation == (DRM_MODE_REFLECT_X | DRM_MODE_ROTATE_90))) {
> +		DRM_DEBUG_KMS("src width must be multiple of 4 for rotated NV12\n");
> +		return -EINVAL;
> +	}
> +
> +	return 0;
> +}
> +
>  static int skl_plane_check(struct intel_crtc_state *crtc_state,
>  			   struct intel_plane_state *plane_state)
>  {
> @@ -1380,6 +1397,10 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
>  	if (ret)
>  		return ret;
>  
> +	ret = skl_plane_check_nv12_rotation(plane_state);
> +	if (ret)
> +		return ret;
> +
>  	ret = skl_check_plane_surface(plane_state);
>  	if (ret)
>  		return ret;


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

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

* Re: [PATCH 1/2] drm/i915: Relocate SKL+ NV12 src width w/a
  2018-10-23 13:25 ` [PATCH 1/2] " Maarten Lankhorst
@ 2018-10-23 13:40   ` Ville Syrjälä
  2018-10-23 13:49     ` Maarten Lankhorst
  0 siblings, 1 reply; 8+ messages in thread
From: Ville Syrjälä @ 2018-10-23 13:40 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: intel-gfx

On Tue, Oct 23, 2018 at 03:25:03PM +0200, Maarten Lankhorst wrote:
> Op 18-10-18 om 21:59 schreef Ville Syrjala:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > The SKL+ NV12 src width alignment w/a is still living in an odd place.
> > Everything else was already relocated closer to the main plane check
> > function. Move this workaround as well.
> >
> > As a bonus we avoid the funky rotated vs. not mess with the src
> > coordinates as this now gets checked before we rotate the coordinates.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 25 -------------------------
> >  drivers/gpu/drm/i915/intel_sprite.c  | 21 +++++++++++++++++++++
> >  2 files changed, 21 insertions(+), 25 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index fc7e3b0bd95c..940d514cf9d7 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -3049,28 +3049,6 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
> >  	return 0;
> >  }
> >  
> > -static int
> > -skl_check_nv12_surface(struct intel_plane_state *plane_state)
> > -{
> > -	/* Display WA #1106 */
> > -	if (plane_state->base.rotation !=
> > -	    (DRM_MODE_REFLECT_X | DRM_MODE_ROTATE_90) &&
> > -	    plane_state->base.rotation != DRM_MODE_ROTATE_270)
> > -		return 0;
> > -
> > -	/*
> > -	 * src coordinates are rotated here.
> > -	 * We check height but report it as width
> > -	 */
> > -	if (((drm_rect_height(&plane_state->base.src) >> 16) % 4) != 0) {
> > -		DRM_DEBUG_KMS("src width must be multiple "
> > -			      "of 4 for rotated NV12\n");
> > -		return -EINVAL;
> > -	}
> > -
> > -	return 0;
> > -}
> > -
> >  static int skl_check_nv12_aux_surface(struct intel_plane_state *plane_state)
> >  {
> >  	const struct drm_framebuffer *fb = plane_state->base.fb;
> > @@ -3153,9 +3131,6 @@ int skl_check_plane_surface(struct intel_plane_state *plane_state)
> >  	 * the main surface setup depends on it.
> >  	 */
> >  	if (fb->format->format == DRM_FORMAT_NV12) {
> > -		ret = skl_check_nv12_surface(plane_state);
> > -		if (ret)
> > -			return ret;
> >  		ret = skl_check_nv12_aux_surface(plane_state);
> >  		if (ret)
> >  			return ret;
> > diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> > index 7cd59eee5cad..0fe6c664e83c 100644
> > --- a/drivers/gpu/drm/i915/intel_sprite.c
> > +++ b/drivers/gpu/drm/i915/intel_sprite.c
> > @@ -1342,6 +1342,23 @@ static int skl_plane_check_dst_coordinates(const struct intel_crtc_state *crtc_s
> >  	return 0;
> >  }
> >  
> > +static int skl_plane_check_nv12_rotation(const struct intel_plane_state *plane_state)
> > +{
> > +	const struct drm_framebuffer *fb = plane_state->base.fb;
> > +	unsigned int rotation = plane_state->base.rotation;
> > +	int src_w = drm_rect_width(&plane_state->base.src) >> 16;
> > +
> > +	/* Display WA #1106 */
> > +	if (fb->format->format == DRM_FORMAT_NV12 && src_w & 3 &&
> Could we put more nv12 checks here? I want to pull the scaler SRC W/H checks in as well..

Hmm. The way those are done atm is a bit funky, but there isa the 
nv12 vs. not-nv12 limits to consider there as well. Not really sure
what the best approach is.

> 
> Probably stylize it a bit with an early return for !NV12, so all checks come after that. :)
> 
> ~Maarten
> 
> Other than that patch 1-2 look good, so have a r-b with or without those suggested changes.

Thanks. I think I'll smash these in as is for now and think a bit more
about the scaler stuff.

> > +	    (rotation == DRM_MODE_ROTATE_270 ||
> > +	     rotation == (DRM_MODE_REFLECT_X | DRM_MODE_ROTATE_90))) {
> > +		DRM_DEBUG_KMS("src width must be multiple of 4 for rotated NV12\n");
> > +		return -EINVAL;
> > +	}
> > +
> > +	return 0;
> > +}
> > +
> >  static int skl_plane_check(struct intel_crtc_state *crtc_state,
> >  			   struct intel_plane_state *plane_state)
> >  {
> > @@ -1380,6 +1397,10 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
> >  	if (ret)
> >  		return ret;
> >  
> > +	ret = skl_plane_check_nv12_rotation(plane_state);
> > +	if (ret)
> > +		return ret;
> > +
> >  	ret = skl_check_plane_surface(plane_state);
> >  	if (ret)
> >  		return ret;
> 

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

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

* Re: [PATCH 1/2] drm/i915: Relocate SKL+ NV12 src width w/a
  2018-10-23 13:40   ` Ville Syrjälä
@ 2018-10-23 13:49     ` Maarten Lankhorst
  0 siblings, 0 replies; 8+ messages in thread
From: Maarten Lankhorst @ 2018-10-23 13:49 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

Op 23-10-18 om 15:40 schreef Ville Syrjälä:
> On Tue, Oct 23, 2018 at 03:25:03PM +0200, Maarten Lankhorst wrote:
>> Op 18-10-18 om 21:59 schreef Ville Syrjala:
>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>
>>> The SKL+ NV12 src width alignment w/a is still living in an odd place.
>>> Everything else was already relocated closer to the main plane check
>>> function. Move this workaround as well.
>>>
>>> As a bonus we avoid the funky rotated vs. not mess with the src
>>> coordinates as this now gets checked before we rotate the coordinates.
>>>
>>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>> ---
>>>  drivers/gpu/drm/i915/intel_display.c | 25 -------------------------
>>>  drivers/gpu/drm/i915/intel_sprite.c  | 21 +++++++++++++++++++++
>>>  2 files changed, 21 insertions(+), 25 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>>> index fc7e3b0bd95c..940d514cf9d7 100644
>>> --- a/drivers/gpu/drm/i915/intel_display.c
>>> +++ b/drivers/gpu/drm/i915/intel_display.c
>>> @@ -3049,28 +3049,6 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
>>>  	return 0;
>>>  }
>>>  
>>> -static int
>>> -skl_check_nv12_surface(struct intel_plane_state *plane_state)
>>> -{
>>> -	/* Display WA #1106 */
>>> -	if (plane_state->base.rotation !=
>>> -	    (DRM_MODE_REFLECT_X | DRM_MODE_ROTATE_90) &&
>>> -	    plane_state->base.rotation != DRM_MODE_ROTATE_270)
>>> -		return 0;
>>> -
>>> -	/*
>>> -	 * src coordinates are rotated here.
>>> -	 * We check height but report it as width
>>> -	 */
>>> -	if (((drm_rect_height(&plane_state->base.src) >> 16) % 4) != 0) {
>>> -		DRM_DEBUG_KMS("src width must be multiple "
>>> -			      "of 4 for rotated NV12\n");
>>> -		return -EINVAL;
>>> -	}
>>> -
>>> -	return 0;
>>> -}
>>> -
>>>  static int skl_check_nv12_aux_surface(struct intel_plane_state *plane_state)
>>>  {
>>>  	const struct drm_framebuffer *fb = plane_state->base.fb;
>>> @@ -3153,9 +3131,6 @@ int skl_check_plane_surface(struct intel_plane_state *plane_state)
>>>  	 * the main surface setup depends on it.
>>>  	 */
>>>  	if (fb->format->format == DRM_FORMAT_NV12) {
>>> -		ret = skl_check_nv12_surface(plane_state);
>>> -		if (ret)
>>> -			return ret;
>>>  		ret = skl_check_nv12_aux_surface(plane_state);
>>>  		if (ret)
>>>  			return ret;
>>> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
>>> index 7cd59eee5cad..0fe6c664e83c 100644
>>> --- a/drivers/gpu/drm/i915/intel_sprite.c
>>> +++ b/drivers/gpu/drm/i915/intel_sprite.c
>>> @@ -1342,6 +1342,23 @@ static int skl_plane_check_dst_coordinates(const struct intel_crtc_state *crtc_s
>>>  	return 0;
>>>  }
>>>  
>>> +static int skl_plane_check_nv12_rotation(const struct intel_plane_state *plane_state)
>>> +{
>>> +	const struct drm_framebuffer *fb = plane_state->base.fb;
>>> +	unsigned int rotation = plane_state->base.rotation;
>>> +	int src_w = drm_rect_width(&plane_state->base.src) >> 16;
>>> +
>>> +	/* Display WA #1106 */
>>> +	if (fb->format->format == DRM_FORMAT_NV12 && src_w & 3 &&
>> Could we put more nv12 checks here? I want to pull the scaler SRC W/H checks in as well..
> Hmm. The way those are done atm is a bit funky, but there isa the 
> nv12 vs. not-nv12 limits to consider there as well. Not really sure
> what the best approach is.
>
>> Probably stylize it a bit with an early return for !NV12, so all checks come after that. :)
>>
>> ~Maarten
>>
>> Other than that patch 1-2 look good, so have a r-b with or without those suggested changes.
> Thanks. I think I'll smash these in as is for now and think a bit more
> about the scaler stuff.
Was thinking of keeping the generic scaler limits in there, and make them more strict in the above check..

That way we can run the checks for ICL nv12 as well..
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Relocate SKL+ NV12 src width w/a
  2018-10-18 19:59 [PATCH 1/2] drm/i915: Relocate SKL+ NV12 src width w/a Ville Syrjala
                   ` (3 preceding siblings ...)
  2018-10-23 13:25 ` [PATCH 1/2] " Maarten Lankhorst
@ 2018-10-23 14:22 ` Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-10-23 14:22 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Relocate SKL+ NV12 src width w/a
URL   : https://patchwork.freedesktop.org/series/51215/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_5020 -> Patchwork_10545 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_10545 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10545, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/51215/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10545:

  === IGT changes ===

    ==== Possible regressions ====

    igt@pm_rpm@module-reload:
      fi-apl-guc:         PASS -> DMESG-WARN +4

    
    ==== Warnings ====

    igt@pm_rpm@basic-pci-d3-state:
      fi-apl-guc:         PASS -> SKIP +3

    
== Known issues ==

  Here are the changes found in Patchwork_10545 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s3:
      fi-kbl-soraka:      NOTRUN -> INCOMPLETE (fdo#107774, fdo#107556, fdo#107859)

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     PASS -> FAIL (fdo#103167)

    
    ==== Possible fixes ====

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       DMESG-WARN (fdo#102614) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#107362, fdo#103191) -> PASS +1
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@prime_vgem@basic-fence-flip:
      fi-cfl-8700k:       FAIL (fdo#104008) -> PASS

    
  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
  fdo#107774 https://bugs.freedesktop.org/show_bug.cgi?id=107774
  fdo#107859 https://bugs.freedesktop.org/show_bug.cgi?id=107859


== Participating hosts (47 -> 44) ==

  Additional (2): fi-kbl-soraka fi-cfl-8109u 
  Missing    (5): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 


== Build changes ==

    * Linux: CI_DRM_5020 -> Patchwork_10545

  CI_DRM_5020: 95151c25e0433a2fe771b8bc272f3f8fb54a7e27 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4686: 741bf7064c467df725c14cc0b3b8b50436f9ee09 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10545: ec79d24b7a05a6fa8bf7cf63c0e8eea4c0fcde17 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

ec79d24b7a05 drm/i915: Move the SKL+ zero constant alpha handling
7f95652e632a drm/i915: Relocate SKL+ NV12 src width w/a

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10545/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-10-23 14:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-18 19:59 [PATCH 1/2] drm/i915: Relocate SKL+ NV12 src width w/a Ville Syrjala
2018-10-18 19:59 ` [PATCH 2/2] drm/i915: Move the SKL+ zero constant alpha handling Ville Syrjala
2018-10-18 20:56 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Relocate SKL+ NV12 src width w/a Patchwork
2018-10-19  0:13 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-10-23 13:25 ` [PATCH 1/2] " Maarten Lankhorst
2018-10-23 13:40   ` Ville Syrjälä
2018-10-23 13:49     ` Maarten Lankhorst
2018-10-23 14:22 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] " Patchwork

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.