public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable
@ 2015-01-07 13:38 Daniel Vetter
  2015-01-07 14:19 ` Jani Nikula
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Daniel Vetter @ 2015-01-07 13:38 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

It is platform/output depenedent when exactly the pipe will start
running. Sometimes we just need the (cpu) pipe enabled, in other cases
the pch transcoder is enough and in yet other cases the (DP) port is
sending the frame start signal.

In a perfect world we'd put the drm_crtc_vblank_on call exactly where
the pipe starts running, but due to cloning and similar things this
will get messy. And the current approach of picking the most
conservative place for all combinations also doesn't work since that
results in legit vblank waits (in encoder->enable hooks, e.g. the 2
vblank waits for sdvo) failing.

Completely going back to the old world before

commit 51e31d49c89055299e34b8f44d13f70e19aaaad1
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Sep 15 12:36:02 2014 +0200

    drm/i915: Use generic vblank wait# Please enter the commit message for your changes. Lines starting

isn't great either since screaming when the vblank wait work because
the pipe is off is kinda nice.

Pick a compromise and move the drm_crtc_vblank_on right before the
encoder->enable call. This is a lie on some outputs/platforms, but
after the ->enable callback the pipe is guaranteed to run everywhere.
So not that bad really. Suggested by Ville.

v2: Same treatment for drm_crtc_vblank_off and encoder->disable: I've
missed the ibx pipe B select w/a, which also has a vblank wait in the
disable function (while the pipe is obviously still running).

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 42 ++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a1dbe747a372..e224820ea5a4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4301,15 +4301,15 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
 	if (intel_crtc->config.has_pch_encoder)
 		ironlake_pch_enable(crtc);
 
+	assert_vblank_disabled(crtc);
+	drm_crtc_vblank_on(crtc);
+
 	for_each_encoder_on_crtc(dev, crtc, encoder)
 		encoder->enable(encoder);
 
 	if (HAS_PCH_CPT(dev))
 		cpt_verify_modeset(dev, intel_crtc->pipe);
 
-	assert_vblank_disabled(crtc);
-	drm_crtc_vblank_on(crtc);
-
 	intel_crtc_enable_planes(crtc);
 }
 
@@ -4421,14 +4421,14 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
 	if (intel_crtc->config.dp_encoder_is_mst)
 		intel_ddi_set_vc_payload_alloc(crtc, true);
 
+	assert_vblank_disabled(crtc);
+	drm_crtc_vblank_on(crtc);
+
 	for_each_encoder_on_crtc(dev, crtc, encoder) {
 		encoder->enable(encoder);
 		intel_opregion_notify_encoder(encoder, true);
 	}
 
-	assert_vblank_disabled(crtc);
-	drm_crtc_vblank_on(crtc);
-
 	/* If we change the relative order between pipe/planes enabling, we need
 	 * to change the workaround. */
 	haswell_mode_set_planes_workaround(intel_crtc);
@@ -4479,12 +4479,12 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)
 
 	intel_crtc_disable_planes(crtc);
 
-	drm_crtc_vblank_off(crtc);
-	assert_vblank_disabled(crtc);
-
 	for_each_encoder_on_crtc(dev, crtc, encoder)
 		encoder->disable(encoder);
 
+	drm_crtc_vblank_off(crtc);
+	assert_vblank_disabled(crtc);
+
 	if (intel_crtc->config.has_pch_encoder)
 		intel_set_pch_fifo_underrun_reporting(dev_priv, pipe, false);
 
@@ -4544,14 +4544,14 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)
 
 	intel_crtc_disable_planes(crtc);
 
-	drm_crtc_vblank_off(crtc);
-	assert_vblank_disabled(crtc);
-
 	for_each_encoder_on_crtc(dev, crtc, encoder) {
 		intel_opregion_notify_encoder(encoder, false);
 		encoder->disable(encoder);
 	}
 
+	drm_crtc_vblank_off(crtc);
+	assert_vblank_disabled(crtc);
+
 	if (intel_crtc->config.has_pch_encoder)
 		intel_set_pch_fifo_underrun_reporting(dev_priv, TRANSCODER_A,
 						      false);
@@ -5021,12 +5021,12 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)
 	intel_update_watermarks(crtc);
 	intel_enable_pipe(intel_crtc);
 
-	for_each_encoder_on_crtc(dev, crtc, encoder)
-		encoder->enable(encoder);
-
 	assert_vblank_disabled(crtc);
 	drm_crtc_vblank_on(crtc);
 
+	for_each_encoder_on_crtc(dev, crtc, encoder)
+		encoder->enable(encoder);
+
 	intel_crtc_enable_planes(crtc);
 
 	/* Underruns don't raise interrupts, so check manually. */
@@ -5082,12 +5082,12 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)
 	intel_update_watermarks(crtc);
 	intel_enable_pipe(intel_crtc);
 
-	for_each_encoder_on_crtc(dev, crtc, encoder)
-		encoder->enable(encoder);
-
 	assert_vblank_disabled(crtc);
 	drm_crtc_vblank_on(crtc);
 
+	for_each_encoder_on_crtc(dev, crtc, encoder)
+		encoder->enable(encoder);
+
 	intel_crtc_enable_planes(crtc);
 
 	/*
@@ -5159,12 +5159,12 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
 	 */
 	intel_wait_for_vblank(dev, pipe);
 
-	drm_crtc_vblank_off(crtc);
-	assert_vblank_disabled(crtc);
-
 	for_each_encoder_on_crtc(dev, crtc, encoder)
 		encoder->disable(encoder);
 
+	drm_crtc_vblank_off(crtc);
+	assert_vblank_disabled(crtc);
+
 	intel_disable_pipe(intel_crtc);
 
 	i9xx_pfit_disable(intel_crtc);
-- 
2.1.3

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

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

* Re: [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable
  2015-01-07 13:38 [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable Daniel Vetter
@ 2015-01-07 14:19 ` Jani Nikula
  2015-01-07 17:37 ` shuang.he
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2015-01-07 14:19 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

On Wed, 07 Jan 2015, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> commit 51e31d49c89055299e34b8f44d13f70e19aaaad1
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Mon Sep 15 12:36:02 2014 +0200
>
>     drm/i915: Use generic vblank wait# Please enter the commit message for your changes. Lines starting

Leftover git commit template cruft, please remove before pushing.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable
  2015-01-07 13:38 [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable Daniel Vetter
  2015-01-07 14:19 ` Jani Nikula
@ 2015-01-07 17:37 ` shuang.he
  2015-01-07 21:40 ` Chris Wilson
  2015-02-16  8:24 ` Jani Nikula
  3 siblings, 0 replies; 10+ messages in thread
From: shuang.he @ 2015-01-07 17:37 UTC (permalink / raw)
  To: shuang.he, intel-gfx, daniel.vetter

Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                 -23              363/364              340/364
ILK                 -12              364/366              352/366
SNB              +4-35              443/450              412/450
IVB                 -36              496/498              460/498
BYT                                  288/289              288/289
HSW              +19-57              542/564              504/564
BDW                 -25              415/417              390/417
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 PNV  igt_gem_concurrent_blit_gpu-bcs-early-read-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpu-bcs-overwrite-source      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpu-bcs-overwrite-source-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpu-rcs-early-read      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpu-rcs-early-read-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpu-rcs-overwrite-source      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpu-rcs-overwrite-source-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-bcs-early-read      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-bcs-early-read-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-rcs-early-read      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-rcs-early-read-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 PNV  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source-interruptible      NSPT(1, M23)PASS(1, M25)      NSPT(1, M23)
 ILK  igt_gem_concurrent_blit_gpu-bcs-early-read      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 ILK  igt_gem_concurrent_blit_gpu-bcs-early-read-interruptible      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 ILK  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 ILK  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write-interruptible      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 ILK  igt_gem_concurrent_blit_gpu-bcs-overwrite-source      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 ILK  igt_gem_concurrent_blit_gpu-bcs-overwrite-source-interruptible      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 ILK  igt_gem_concurrent_blit_gpuX-bcs-early-read      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 ILK  igt_gem_concurrent_blit_gpuX-bcs-early-read-interruptible      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 ILK  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 ILK  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write-interruptible      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 ILK  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 ILK  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source-interruptible      NSPT(1, M26)PASS(1, M37)      NSPT(1, M26)
 SNB  igt_gem_concurrent_blit_gpu-bcs-early-read      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-bcs-early-read-forked      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-bcs-early-read-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write-forked      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-bcs-overwrite-source      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-bcs-overwrite-source-forked      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-bcs-overwrite-source-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-rcs-early-read      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-rcs-early-read-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write-forked      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-rcs-overwrite-source      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-rcs-overwrite-source-forked      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpu-rcs-overwrite-source-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-bcs-early-read      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-bcs-early-read-forked      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-bcs-early-read-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source-forked      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-rcs-early-read      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-rcs-early-read-forked      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-rcs-early-read-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write-forked      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source-forked      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
 SNB  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source-interruptible      NSPT(1, M22)PASS(1, M35)      NSPT(1, M22)
*SNB  igt_kms_flip_dpms-vs-vblank-race      DMESG_WARN(3, M35M22)PASS(1, M35)      PASS(1, M22)
 SNB  igt_kms_flip_dpms-vs-vblank-race-interruptible      DMESG_WARN(2, M35M22)PASS(2, M35M22)      PASS(1, M22)
*SNB  igt_kms_flip_modeset-vs-vblank-race      DMESG_WARN(4, M35M22)PASS(1, M35)      PASS(1, M22)
 SNB  igt_kms_flip_modeset-vs-vblank-race-interruptible      DMESG_WARN(3, M35M22)PASS(1, M35)      DMESG_WARN(1, M22)
 SNB  igt_kms_plane_plane-position-hole-pipe-B-plane-1      DMESG_WARN(1, M35)PASS(5, M35M22)      PASS(1, M22)
 IVB  igt_gem_concurrent_blit_gpu-bcs-early-read      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-bcs-early-read-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-bcs-early-read-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-bcs-overwrite-source      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-bcs-overwrite-source-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-bcs-overwrite-source-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-rcs-early-read      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-rcs-early-read-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-rcs-early-read-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-rcs-overwrite-source      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-rcs-overwrite-source-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpu-rcs-overwrite-source-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-bcs-early-read      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-bcs-early-read-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-bcs-early-read-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-rcs-early-read      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-rcs-early-read-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-rcs-early-read-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source-forked      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 IVB  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source-interruptible      NSPT(1, M21)PASS(1, M34)      NSPT(1, M21)
 HSW  igt_gem_concurrent_blit_gpu-bcs-early-read      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-bcs-early-read-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-bcs-early-read-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-bcs-overwrite-source      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-bcs-overwrite-source-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-bcs-overwrite-source-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-rcs-early-read      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-rcs-early-read-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-rcs-early-read-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-rcs-overwrite-source      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-rcs-overwrite-source-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpu-rcs-overwrite-source-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-bcs-early-read      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-bcs-early-read-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-bcs-early-read-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-rcs-early-read      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-rcs-early-read-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-rcs-early-read-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source-forked      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source-interruptible      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_kms_cursor_crc_cursor-size-change      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_kms_fence_pin_leak      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_kms_flip_dpms-vs-vblank-race      DMESG_WARN(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_flip_dpms-vs-vblank-race-interruptible      DMESG_WARN(2, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_flip_event_leak      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_kms_flip_flip-vs-dpms-off-vs-modeset      DMESG_WARN(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_flip_flip-vs-dpms-off-vs-modeset-interruptible      DMESG_WARN(2, M40M19)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_flip_modeset-vs-vblank-race      DMESG_WARN(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_flip_modeset-vs-vblank-race-interruptible      DMESG_WARN(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_flip_single-buffer-flip-vs-dpms-off-vs-modeset-interruptible      DMESG_WARN(2, M40)PASS(2, M19)      PASS(1, M19)
 HSW  igt_kms_mmio_vs_cs_flip_setcrtc_vs_cs_flip      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_kms_mmio_vs_cs_flip_setplane_vs_cs_flip      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_kms_pipe_crc_basic_read-crc-pipe-B      TIMEOUT(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_pipe_crc_basic_read-crc-pipe-B-frame-sequence      TIMEOUT(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_pipe_crc_basic_read-crc-pipe-C      TIMEOUT(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_pipe_crc_basic_read-crc-pipe-C-frame-sequence      TIMEOUT(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_plane_plane-panning-bottom-right-pipe-A-plane-1      TIMEOUT(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_plane_plane-panning-bottom-right-pipe-A-plane-2      TIMEOUT(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_plane_plane-panning-bottom-right-pipe-B-plane-1      TIMEOUT(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_plane_plane-panning-bottom-right-pipe-B-plane-2      TIMEOUT(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_kms_plane_plane-panning-bottom-right-pipe-C-plane-1      TIMEOUT(3, M40)PASS(3, M19M40)      PASS(1, M19)
 HSW  igt_kms_setmode_invalid-clone-exclusive-crtc      DMESG_WARN(1, M40)PASS(1, M19)      PASS(1, M19)
 HSW  igt_pm_lpsp_non-edp      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_cursor      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_cursor-dpms      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_dpms-mode-unset-non-lpsp      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_dpms-non-lpsp      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_drm-resources-equal      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_fences      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_fences-dpms      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_gem-execbuf      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_gem-mmap-cpu      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_gem-mmap-gtt      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_gem-pread      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_i2c      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_modeset-non-lpsp      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_modeset-non-lpsp-stress-no-wait      NSPT(2, M19)DMESG_WARN(1, M40)PASS(3, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_pci-d3-state      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_pm_rpm_rte      NSPT(1, M19)PASS(1, M40)      NSPT(1, M19)
 HSW  igt_kms_flip_flip-vs-rmfb      DMESG_WARN(1, M40)PASS(2, M19)      PASS(1, M19)
 HSW  igt_kms_flip_flip-vs-rmfb-interruptible      DMESG_WARN(1, M40)PASS(1, M19)      PASS(1, M19)
 BDW  igt_gem_concurrent_blit_gpu-bcs-early-read      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpu-bcs-early-read-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpu-bcs-overwrite-source      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpu-bcs-overwrite-source-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpu-rcs-early-read      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpu-rcs-early-read-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpu-rcs-gpu-read-after-write-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpu-rcs-overwrite-source      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpu-rcs-overwrite-source-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-bcs-early-read      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-bcs-early-read-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-bcs-gpu-read-after-write-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-bcs-overwrite-source-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-rcs-early-read      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-rcs-early-read-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-rcs-gpu-read-after-write-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
 BDW  igt_gem_concurrent_blit_gpuX-rcs-overwrite-source-interruptible      NSPT(1, M28)PASS(1, M30)      NSPT(1, M28)
*BDW  igt_gem_multi_bsd_sync_loop      PASS(2, M30M28)      DMESG_WARN(1, M28)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable
  2015-01-07 13:38 [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable Daniel Vetter
  2015-01-07 14:19 ` Jani Nikula
  2015-01-07 17:37 ` shuang.he
@ 2015-01-07 21:40 ` Chris Wilson
  2015-02-23 16:05   ` Daniel Vetter
  2015-02-23 23:19   ` Daniel Vetter
  2015-02-16  8:24 ` Jani Nikula
  3 siblings, 2 replies; 10+ messages in thread
From: Chris Wilson @ 2015-01-07 21:40 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development

On Wed, Jan 07, 2015 at 02:38:46PM +0100, Daniel Vetter wrote:
> It is platform/output depenedent when exactly the pipe will start
> running. Sometimes we just need the (cpu) pipe enabled, in other cases
> the pch transcoder is enough and in yet other cases the (DP) port is
> sending the frame start signal.
> 
> In a perfect world we'd put the drm_crtc_vblank_on call exactly where
> the pipe starts running, but due to cloning and similar things this
> will get messy. And the current approach of picking the most
> conservative place for all combinations also doesn't work since that
> results in legit vblank waits (in encoder->enable hooks, e.g. the 2
> vblank waits for sdvo) failing.
> 
> Completely going back to the old world before
> 
> commit 51e31d49c89055299e34b8f44d13f70e19aaaad1
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Mon Sep 15 12:36:02 2014 +0200
> 
>     drm/i915: Use generic vblank wait# Please enter the commit message for your changes. Lines starting
> 
> isn't great either since screaming when the vblank wait work because
> the pipe is off is kinda nice.
> 
> Pick a compromise and move the drm_crtc_vblank_on right before the
> encoder->enable call. This is a lie on some outputs/platforms, but
> after the ->enable callback the pipe is guaranteed to run everywhere.
> So not that bad really. Suggested by Ville.
> 
> v2: Same treatment for drm_crtc_vblank_off and encoder->disable: I've
> missed the ibx pipe B select w/a, which also has a vblank wait in the
> disable function (while the pipe is obviously still running).
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Rather than decreasing the number of WARNs on my pnv during boot, this
doubled them.

The original was:

[   34.136161] WARNING: CPU: 3 PID: 206 at drivers/gpu/drm/drm_irq.c:1130 drm_wait_one_vblank+0x15a/0x160()
[   34.136166] vblank wait timed out on crtc 1
[   34.136402]  [<c13f664a>] drm_wait_one_vblank+0x15a/0x160
[   34.136415]  [<c107d7d0>] ? prepare_to_wait_event+0xd0/0xd0
[   34.136433]  [<c146a459>] i9xx_crtc_disable+0x59/0x400

and the interloper:

[   47.012212] WARNING: CPU: 2 PID: 1423 at drivers/gpu/drm/drm_irq.c:1130 drm_wait_one_vblank+0x15a/0x160()
[   47.012217] vblank wait timed out on crtc 1
[   47.012400]  [<c13f664a>] drm_wait_one_vblank+0x15a/0x160
[   47.012409]  [<c107d7d0>] ? prepare_to_wait_event+0xd0/0xd0
[   47.012420]  [<c146762e>] intel_pipe_set_base+0x11e/0x1f0

-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable
  2015-01-07 13:38 [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable Daniel Vetter
                   ` (2 preceding siblings ...)
  2015-01-07 21:40 ` Chris Wilson
@ 2015-02-16  8:24 ` Jani Nikula
  2015-02-23 12:57   ` Jani Nikula
  3 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2015-02-16  8:24 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

On Wed, 07 Jan 2015, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> It is platform/output depenedent when exactly the pipe will start
> running. Sometimes we just need the (cpu) pipe enabled, in other cases
> the pch transcoder is enough and in yet other cases the (DP) port is
> sending the frame start signal.
>
> In a perfect world we'd put the drm_crtc_vblank_on call exactly where
> the pipe starts running, but due to cloning and similar things this
> will get messy. And the current approach of picking the most
> conservative place for all combinations also doesn't work since that
> results in legit vblank waits (in encoder->enable hooks, e.g. the 2
> vblank waits for sdvo) failing.
>
> Completely going back to the old world before
>
> commit 51e31d49c89055299e34b8f44d13f70e19aaaad1
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Mon Sep 15 12:36:02 2014 +0200
>
>     drm/i915: Use generic vblank wait# Please enter the commit message for your changes. Lines starting
>
> isn't great either since screaming when the vblank wait work because
> the pipe is off is kinda nice.
>
> Pick a compromise and move the drm_crtc_vblank_on right before the
> encoder->enable call. This is a lie on some outputs/platforms, but
> after the ->enable callback the pipe is guaranteed to run everywhere.
> So not that bad really. Suggested by Ville.
>
> v2: Same treatment for drm_crtc_vblank_off and encoder->disable: I've
> missed the ibx pipe B select w/a, which also has a vblank wait in the
> disable function (while the pipe is obviously still running).
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Should this be forwarded to stable 3.19?

BR,
Jani.


> ---
>  drivers/gpu/drm/i915/intel_display.c | 42 ++++++++++++++++++------------------
>  1 file changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index a1dbe747a372..e224820ea5a4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -4301,15 +4301,15 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
>  	if (intel_crtc->config.has_pch_encoder)
>  		ironlake_pch_enable(crtc);
>  
> +	assert_vblank_disabled(crtc);
> +	drm_crtc_vblank_on(crtc);
> +
>  	for_each_encoder_on_crtc(dev, crtc, encoder)
>  		encoder->enable(encoder);
>  
>  	if (HAS_PCH_CPT(dev))
>  		cpt_verify_modeset(dev, intel_crtc->pipe);
>  
> -	assert_vblank_disabled(crtc);
> -	drm_crtc_vblank_on(crtc);
> -
>  	intel_crtc_enable_planes(crtc);
>  }
>  
> @@ -4421,14 +4421,14 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
>  	if (intel_crtc->config.dp_encoder_is_mst)
>  		intel_ddi_set_vc_payload_alloc(crtc, true);
>  
> +	assert_vblank_disabled(crtc);
> +	drm_crtc_vblank_on(crtc);
> +
>  	for_each_encoder_on_crtc(dev, crtc, encoder) {
>  		encoder->enable(encoder);
>  		intel_opregion_notify_encoder(encoder, true);
>  	}
>  
> -	assert_vblank_disabled(crtc);
> -	drm_crtc_vblank_on(crtc);
> -
>  	/* If we change the relative order between pipe/planes enabling, we need
>  	 * to change the workaround. */
>  	haswell_mode_set_planes_workaround(intel_crtc);
> @@ -4479,12 +4479,12 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)
>  
>  	intel_crtc_disable_planes(crtc);
>  
> -	drm_crtc_vblank_off(crtc);
> -	assert_vblank_disabled(crtc);
> -
>  	for_each_encoder_on_crtc(dev, crtc, encoder)
>  		encoder->disable(encoder);
>  
> +	drm_crtc_vblank_off(crtc);
> +	assert_vblank_disabled(crtc);
> +
>  	if (intel_crtc->config.has_pch_encoder)
>  		intel_set_pch_fifo_underrun_reporting(dev_priv, pipe, false);
>  
> @@ -4544,14 +4544,14 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)
>  
>  	intel_crtc_disable_planes(crtc);
>  
> -	drm_crtc_vblank_off(crtc);
> -	assert_vblank_disabled(crtc);
> -
>  	for_each_encoder_on_crtc(dev, crtc, encoder) {
>  		intel_opregion_notify_encoder(encoder, false);
>  		encoder->disable(encoder);
>  	}
>  
> +	drm_crtc_vblank_off(crtc);
> +	assert_vblank_disabled(crtc);
> +
>  	if (intel_crtc->config.has_pch_encoder)
>  		intel_set_pch_fifo_underrun_reporting(dev_priv, TRANSCODER_A,
>  						      false);
> @@ -5021,12 +5021,12 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)
>  	intel_update_watermarks(crtc);
>  	intel_enable_pipe(intel_crtc);
>  
> -	for_each_encoder_on_crtc(dev, crtc, encoder)
> -		encoder->enable(encoder);
> -
>  	assert_vblank_disabled(crtc);
>  	drm_crtc_vblank_on(crtc);
>  
> +	for_each_encoder_on_crtc(dev, crtc, encoder)
> +		encoder->enable(encoder);
> +
>  	intel_crtc_enable_planes(crtc);
>  
>  	/* Underruns don't raise interrupts, so check manually. */
> @@ -5082,12 +5082,12 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)
>  	intel_update_watermarks(crtc);
>  	intel_enable_pipe(intel_crtc);
>  
> -	for_each_encoder_on_crtc(dev, crtc, encoder)
> -		encoder->enable(encoder);
> -
>  	assert_vblank_disabled(crtc);
>  	drm_crtc_vblank_on(crtc);
>  
> +	for_each_encoder_on_crtc(dev, crtc, encoder)
> +		encoder->enable(encoder);
> +
>  	intel_crtc_enable_planes(crtc);
>  
>  	/*
> @@ -5159,12 +5159,12 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
>  	 */
>  	intel_wait_for_vblank(dev, pipe);
>  
> -	drm_crtc_vblank_off(crtc);
> -	assert_vblank_disabled(crtc);
> -
>  	for_each_encoder_on_crtc(dev, crtc, encoder)
>  		encoder->disable(encoder);
>  
> +	drm_crtc_vblank_off(crtc);
> +	assert_vblank_disabled(crtc);
> +
>  	intel_disable_pipe(intel_crtc);
>  
>  	i9xx_pfit_disable(intel_crtc);
> -- 
> 2.1.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable
  2015-02-16  8:24 ` Jani Nikula
@ 2015-02-23 12:57   ` Jani Nikula
  0 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2015-02-23 12:57 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

On Mon, 16 Feb 2015, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Wed, 07 Jan 2015, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>> It is platform/output depenedent when exactly the pipe will start
>> running. Sometimes we just need the (cpu) pipe enabled, in other cases
>> the pch transcoder is enough and in yet other cases the (DP) port is
>> sending the frame start signal.
>>
>> In a perfect world we'd put the drm_crtc_vblank_on call exactly where
>> the pipe starts running, but due to cloning and similar things this
>> will get messy. And the current approach of picking the most
>> conservative place for all combinations also doesn't work since that
>> results in legit vblank waits (in encoder->enable hooks, e.g. the 2
>> vblank waits for sdvo) failing.
>>
>> Completely going back to the old world before
>>
>> commit 51e31d49c89055299e34b8f44d13f70e19aaaad1
>> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Date:   Mon Sep 15 12:36:02 2014 +0200
>>
>>     drm/i915: Use generic vblank wait# Please enter the commit message for your changes. Lines starting
>>
>> isn't great either since screaming when the vblank wait work because
>> the pipe is off is kinda nice.
>>
>> Pick a compromise and move the drm_crtc_vblank_on right before the
>> encoder->enable call. This is a lie on some outputs/platforms, but
>> after the ->enable callback the pipe is guaranteed to run everywhere.
>> So not that bad really. Suggested by Ville.
>>
>> v2: Same treatment for drm_crtc_vblank_off and encoder->disable: I've
>> missed the ibx pipe B select w/a, which also has a vblank wait in the
>> disable function (while the pipe is obviously still running).
>>
>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>
> Should this be forwarded to stable 3.19?

https://bugs.freedesktop.org/show_bug.cgi?id=89108

and probably

http://mid.gmane.org/20150131211609.GA3710@yulia-desktop


BR,
Jani.


>
> BR,
> Jani.
>
>
>> ---
>>  drivers/gpu/drm/i915/intel_display.c | 42 ++++++++++++++++++------------------
>>  1 file changed, 21 insertions(+), 21 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index a1dbe747a372..e224820ea5a4 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -4301,15 +4301,15 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
>>  	if (intel_crtc->config.has_pch_encoder)
>>  		ironlake_pch_enable(crtc);
>>  
>> +	assert_vblank_disabled(crtc);
>> +	drm_crtc_vblank_on(crtc);
>> +
>>  	for_each_encoder_on_crtc(dev, crtc, encoder)
>>  		encoder->enable(encoder);
>>  
>>  	if (HAS_PCH_CPT(dev))
>>  		cpt_verify_modeset(dev, intel_crtc->pipe);
>>  
>> -	assert_vblank_disabled(crtc);
>> -	drm_crtc_vblank_on(crtc);
>> -
>>  	intel_crtc_enable_planes(crtc);
>>  }
>>  
>> @@ -4421,14 +4421,14 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
>>  	if (intel_crtc->config.dp_encoder_is_mst)
>>  		intel_ddi_set_vc_payload_alloc(crtc, true);
>>  
>> +	assert_vblank_disabled(crtc);
>> +	drm_crtc_vblank_on(crtc);
>> +
>>  	for_each_encoder_on_crtc(dev, crtc, encoder) {
>>  		encoder->enable(encoder);
>>  		intel_opregion_notify_encoder(encoder, true);
>>  	}
>>  
>> -	assert_vblank_disabled(crtc);
>> -	drm_crtc_vblank_on(crtc);
>> -
>>  	/* If we change the relative order between pipe/planes enabling, we need
>>  	 * to change the workaround. */
>>  	haswell_mode_set_planes_workaround(intel_crtc);
>> @@ -4479,12 +4479,12 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)
>>  
>>  	intel_crtc_disable_planes(crtc);
>>  
>> -	drm_crtc_vblank_off(crtc);
>> -	assert_vblank_disabled(crtc);
>> -
>>  	for_each_encoder_on_crtc(dev, crtc, encoder)
>>  		encoder->disable(encoder);
>>  
>> +	drm_crtc_vblank_off(crtc);
>> +	assert_vblank_disabled(crtc);
>> +
>>  	if (intel_crtc->config.has_pch_encoder)
>>  		intel_set_pch_fifo_underrun_reporting(dev_priv, pipe, false);
>>  
>> @@ -4544,14 +4544,14 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)
>>  
>>  	intel_crtc_disable_planes(crtc);
>>  
>> -	drm_crtc_vblank_off(crtc);
>> -	assert_vblank_disabled(crtc);
>> -
>>  	for_each_encoder_on_crtc(dev, crtc, encoder) {
>>  		intel_opregion_notify_encoder(encoder, false);
>>  		encoder->disable(encoder);
>>  	}
>>  
>> +	drm_crtc_vblank_off(crtc);
>> +	assert_vblank_disabled(crtc);
>> +
>>  	if (intel_crtc->config.has_pch_encoder)
>>  		intel_set_pch_fifo_underrun_reporting(dev_priv, TRANSCODER_A,
>>  						      false);
>> @@ -5021,12 +5021,12 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)
>>  	intel_update_watermarks(crtc);
>>  	intel_enable_pipe(intel_crtc);
>>  
>> -	for_each_encoder_on_crtc(dev, crtc, encoder)
>> -		encoder->enable(encoder);
>> -
>>  	assert_vblank_disabled(crtc);
>>  	drm_crtc_vblank_on(crtc);
>>  
>> +	for_each_encoder_on_crtc(dev, crtc, encoder)
>> +		encoder->enable(encoder);
>> +
>>  	intel_crtc_enable_planes(crtc);
>>  
>>  	/* Underruns don't raise interrupts, so check manually. */
>> @@ -5082,12 +5082,12 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)
>>  	intel_update_watermarks(crtc);
>>  	intel_enable_pipe(intel_crtc);
>>  
>> -	for_each_encoder_on_crtc(dev, crtc, encoder)
>> -		encoder->enable(encoder);
>> -
>>  	assert_vblank_disabled(crtc);
>>  	drm_crtc_vblank_on(crtc);
>>  
>> +	for_each_encoder_on_crtc(dev, crtc, encoder)
>> +		encoder->enable(encoder);
>> +
>>  	intel_crtc_enable_planes(crtc);
>>  
>>  	/*
>> @@ -5159,12 +5159,12 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
>>  	 */
>>  	intel_wait_for_vblank(dev, pipe);
>>  
>> -	drm_crtc_vblank_off(crtc);
>> -	assert_vblank_disabled(crtc);
>> -
>>  	for_each_encoder_on_crtc(dev, crtc, encoder)
>>  		encoder->disable(encoder);
>>  
>> +	drm_crtc_vblank_off(crtc);
>> +	assert_vblank_disabled(crtc);
>> +
>>  	intel_disable_pipe(intel_crtc);
>>  
>>  	i9xx_pfit_disable(intel_crtc);
>> -- 
>> 2.1.3
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> -- 
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable
  2015-01-07 21:40 ` Chris Wilson
@ 2015-02-23 16:05   ` Daniel Vetter
  2015-02-23 16:54     ` Chris Wilson
  2015-02-23 23:19   ` Daniel Vetter
  1 sibling, 1 reply; 10+ messages in thread
From: Daniel Vetter @ 2015-02-23 16:05 UTC (permalink / raw)
  To: Chris Wilson, Daniel Vetter, Intel Graphics Development,
	Ville Syrjälä, Daniel Vetter

On Wed, Jan 07, 2015 at 09:40:50PM +0000, Chris Wilson wrote:
> On Wed, Jan 07, 2015 at 02:38:46PM +0100, Daniel Vetter wrote:
> > It is platform/output depenedent when exactly the pipe will start
> > running. Sometimes we just need the (cpu) pipe enabled, in other cases
> > the pch transcoder is enough and in yet other cases the (DP) port is
> > sending the frame start signal.
> > 
> > In a perfect world we'd put the drm_crtc_vblank_on call exactly where
> > the pipe starts running, but due to cloning and similar things this
> > will get messy. And the current approach of picking the most
> > conservative place for all combinations also doesn't work since that
> > results in legit vblank waits (in encoder->enable hooks, e.g. the 2
> > vblank waits for sdvo) failing.
> > 
> > Completely going back to the old world before
> > 
> > commit 51e31d49c89055299e34b8f44d13f70e19aaaad1
> > Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Date:   Mon Sep 15 12:36:02 2014 +0200
> > 
> >     drm/i915: Use generic vblank wait# Please enter the commit message for your changes. Lines starting
> > 
> > isn't great either since screaming when the vblank wait work because
> > the pipe is off is kinda nice.
> > 
> > Pick a compromise and move the drm_crtc_vblank_on right before the
> > encoder->enable call. This is a lie on some outputs/platforms, but
> > after the ->enable callback the pipe is guaranteed to run everywhere.
> > So not that bad really. Suggested by Ville.
> > 
> > v2: Same treatment for drm_crtc_vblank_off and encoder->disable: I've
> > missed the ibx pipe B select w/a, which also has a vblank wait in the
> > disable function (while the pipe is obviously still running).
> > 
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> 
> Rather than decreasing the number of WARNs on my pnv during boot, this
> doubled them.
> 
> The original was:
> 
> [   34.136161] WARNING: CPU: 3 PID: 206 at drivers/gpu/drm/drm_irq.c:1130 drm_wait_one_vblank+0x15a/0x160()
> [   34.136166] vblank wait timed out on crtc 1
> [   34.136402]  [<c13f664a>] drm_wait_one_vblank+0x15a/0x160
> [   34.136415]  [<c107d7d0>] ? prepare_to_wait_event+0xd0/0xd0
> [   34.136433]  [<c146a459>] i9xx_crtc_disable+0x59/0x400
> 
> and the interloper:
> 
> [   47.012212] WARNING: CPU: 2 PID: 1423 at drivers/gpu/drm/drm_irq.c:1130 drm_wait_one_vblank+0x15a/0x160()
> [   47.012217] vblank wait timed out on crtc 1
> [   47.012400]  [<c13f664a>] drm_wait_one_vblank+0x15a/0x160
> [   47.012409]  [<c107d7d0>] ? prepare_to_wait_event+0xd0/0xd0
> [   47.012420]  [<c146762e>] intel_pipe_set_base+0x11e/0x1f0

Are you sure? The patch strictly increase the coverage for when vblanks
works, so more sounds really funky ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable
  2015-02-23 16:05   ` Daniel Vetter
@ 2015-02-23 16:54     ` Chris Wilson
  2015-02-24 12:58       ` Ville Syrjälä
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2015-02-23 16:54 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

On Mon, Feb 23, 2015 at 05:05:16PM +0100, Daniel Vetter wrote:
> On Wed, Jan 07, 2015 at 09:40:50PM +0000, Chris Wilson wrote:
> > On Wed, Jan 07, 2015 at 02:38:46PM +0100, Daniel Vetter wrote:
> > > It is platform/output depenedent when exactly the pipe will start
> > > running. Sometimes we just need the (cpu) pipe enabled, in other cases
> > > the pch transcoder is enough and in yet other cases the (DP) port is
> > > sending the frame start signal.
> > > 
> > > In a perfect world we'd put the drm_crtc_vblank_on call exactly where
> > > the pipe starts running, but due to cloning and similar things this
> > > will get messy. And the current approach of picking the most
> > > conservative place for all combinations also doesn't work since that
> > > results in legit vblank waits (in encoder->enable hooks, e.g. the 2
> > > vblank waits for sdvo) failing.
> > > 
> > > Completely going back to the old world before
> > > 
> > > commit 51e31d49c89055299e34b8f44d13f70e19aaaad1
> > > Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> > > Date:   Mon Sep 15 12:36:02 2014 +0200
> > > 
> > >     drm/i915: Use generic vblank wait# Please enter the commit message for your changes. Lines starting
> > > 
> > > isn't great either since screaming when the vblank wait work because
> > > the pipe is off is kinda nice.
> > > 
> > > Pick a compromise and move the drm_crtc_vblank_on right before the
> > > encoder->enable call. This is a lie on some outputs/platforms, but
> > > after the ->enable callback the pipe is guaranteed to run everywhere.
> > > So not that bad really. Suggested by Ville.
> > > 
> > > v2: Same treatment for drm_crtc_vblank_off and encoder->disable: I've
> > > missed the ibx pipe B select w/a, which also has a vblank wait in the
> > > disable function (while the pipe is obviously still running).
> > > 
> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > 
> > Rather than decreasing the number of WARNs on my pnv during boot, this
> > doubled them.
> > 
> > The original was:
> > 
> > [   34.136161] WARNING: CPU: 3 PID: 206 at drivers/gpu/drm/drm_irq.c:1130 drm_wait_one_vblank+0x15a/0x160()
> > [   34.136166] vblank wait timed out on crtc 1
> > [   34.136402]  [<c13f664a>] drm_wait_one_vblank+0x15a/0x160
> > [   34.136415]  [<c107d7d0>] ? prepare_to_wait_event+0xd0/0xd0
> > [   34.136433]  [<c146a459>] i9xx_crtc_disable+0x59/0x400
> > 
> > and the interloper:
> > 
> > [   47.012212] WARNING: CPU: 2 PID: 1423 at drivers/gpu/drm/drm_irq.c:1130 drm_wait_one_vblank+0x15a/0x160()
> > [   47.012217] vblank wait timed out on crtc 1
> > [   47.012400]  [<c13f664a>] drm_wait_one_vblank+0x15a/0x160
> > [   47.012409]  [<c107d7d0>] ? prepare_to_wait_event+0xd0/0xd0
> > [   47.012420]  [<c146762e>] intel_pipe_set_base+0x11e/0x1f0
> 
> Are you sure? The patch strictly increase the coverage for when vblanks
> works, so more sounds really funky ...

Coincidental maybe? But it only has appeared with that patch...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable
  2015-01-07 21:40 ` Chris Wilson
  2015-02-23 16:05   ` Daniel Vetter
@ 2015-02-23 23:19   ` Daniel Vetter
  1 sibling, 0 replies; 10+ messages in thread
From: Daniel Vetter @ 2015-02-23 23:19 UTC (permalink / raw)
  To: Chris Wilson, Daniel Vetter, Intel Graphics Development,
	Ville Syrjälä, Daniel Vetter

On Wed, Jan 07, 2015 at 09:40:50PM +0000, Chris Wilson wrote:
> On Wed, Jan 07, 2015 at 02:38:46PM +0100, Daniel Vetter wrote:
> > It is platform/output depenedent when exactly the pipe will start
> > running. Sometimes we just need the (cpu) pipe enabled, in other cases
> > the pch transcoder is enough and in yet other cases the (DP) port is
> > sending the frame start signal.
> > 
> > In a perfect world we'd put the drm_crtc_vblank_on call exactly where
> > the pipe starts running, but due to cloning and similar things this
> > will get messy. And the current approach of picking the most
> > conservative place for all combinations also doesn't work since that
> > results in legit vblank waits (in encoder->enable hooks, e.g. the 2
> > vblank waits for sdvo) failing.
> > 
> > Completely going back to the old world before
> > 
> > commit 51e31d49c89055299e34b8f44d13f70e19aaaad1
> > Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Date:   Mon Sep 15 12:36:02 2014 +0200
> > 
> >     drm/i915: Use generic vblank wait# Please enter the commit message for your changes. Lines starting
> > 
> > isn't great either since screaming when the vblank wait work because
> > the pipe is off is kinda nice.
> > 
> > Pick a compromise and move the drm_crtc_vblank_on right before the
> > encoder->enable call. This is a lie on some outputs/platforms, but
> > after the ->enable callback the pipe is guaranteed to run everywhere.
> > So not that bad really. Suggested by Ville.
> > 
> > v2: Same treatment for drm_crtc_vblank_off and encoder->disable: I've
> > missed the ibx pipe B select w/a, which also has a vblank wait in the
> > disable function (while the pipe is obviously still running).
> > 
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> 
> Rather than decreasing the number of WARNs on my pnv during boot, this
> doubled them.
> 
> The original was:
> 
> [   34.136161] WARNING: CPU: 3 PID: 206 at drivers/gpu/drm/drm_irq.c:1130 drm_wait_one_vblank+0x15a/0x160()
> [   34.136166] vblank wait timed out on crtc 1
> [   34.136402]  [<c13f664a>] drm_wait_one_vblank+0x15a/0x160
> [   34.136415]  [<c107d7d0>] ? prepare_to_wait_event+0xd0/0xd0
> [   34.136433]  [<c146a459>] i9xx_crtc_disable+0x59/0x400
> 
> and the interloper:
> 
> [   47.012212] WARNING: CPU: 2 PID: 1423 at drivers/gpu/drm/drm_irq.c:1130 drm_wait_one_vblank+0x15a/0x160()
> [   47.012217] vblank wait timed out on crtc 1
> [   47.012400]  [<c13f664a>] drm_wait_one_vblank+0x15a/0x160
> [   47.012409]  [<c107d7d0>] ? prepare_to_wait_event+0xd0/0xd0
> [   47.012420]  [<c146762e>] intel_pipe_set_base+0x11e/0x1f0

Are you sure? The patch strictly increase the coverage for when vblanks
works, so more backtraces sounds really funky ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable
  2015-02-23 16:54     ` Chris Wilson
@ 2015-02-24 12:58       ` Ville Syrjälä
  0 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2015-02-24 12:58 UTC (permalink / raw)
  To: Chris Wilson, Daniel Vetter, Daniel Vetter,
	Intel Graphics Development, Daniel Vetter

On Mon, Feb 23, 2015 at 04:54:32PM +0000, Chris Wilson wrote:
> On Mon, Feb 23, 2015 at 05:05:16PM +0100, Daniel Vetter wrote:
> > On Wed, Jan 07, 2015 at 09:40:50PM +0000, Chris Wilson wrote:
> > > On Wed, Jan 07, 2015 at 02:38:46PM +0100, Daniel Vetter wrote:
> > > > It is platform/output depenedent when exactly the pipe will start
> > > > running. Sometimes we just need the (cpu) pipe enabled, in other cases
> > > > the pch transcoder is enough and in yet other cases the (DP) port is
> > > > sending the frame start signal.
> > > > 
> > > > In a perfect world we'd put the drm_crtc_vblank_on call exactly where
> > > > the pipe starts running, but due to cloning and similar things this
> > > > will get messy. And the current approach of picking the most
> > > > conservative place for all combinations also doesn't work since that
> > > > results in legit vblank waits (in encoder->enable hooks, e.g. the 2
> > > > vblank waits for sdvo) failing.
> > > > 
> > > > Completely going back to the old world before
> > > > 
> > > > commit 51e31d49c89055299e34b8f44d13f70e19aaaad1
> > > > Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> > > > Date:   Mon Sep 15 12:36:02 2014 +0200
> > > > 
> > > >     drm/i915: Use generic vblank wait# Please enter the commit message for your changes. Lines starting
> > > > 
> > > > isn't great either since screaming when the vblank wait work because
> > > > the pipe is off is kinda nice.
> > > > 
> > > > Pick a compromise and move the drm_crtc_vblank_on right before the
> > > > encoder->enable call. This is a lie on some outputs/platforms, but
> > > > after the ->enable callback the pipe is guaranteed to run everywhere.
> > > > So not that bad really. Suggested by Ville.
> > > > 
> > > > v2: Same treatment for drm_crtc_vblank_off and encoder->disable: I've
> > > > missed the ibx pipe B select w/a, which also has a vblank wait in the
> > > > disable function (while the pipe is obviously still running).
> > > > 
> > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > > Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > > 
> > > Rather than decreasing the number of WARNs on my pnv during boot, this
> > > doubled them.
> > > 
> > > The original was:
> > > 
> > > [   34.136161] WARNING: CPU: 3 PID: 206 at drivers/gpu/drm/drm_irq.c:1130 drm_wait_one_vblank+0x15a/0x160()
> > > [   34.136166] vblank wait timed out on crtc 1
> > > [   34.136402]  [<c13f664a>] drm_wait_one_vblank+0x15a/0x160
> > > [   34.136415]  [<c107d7d0>] ? prepare_to_wait_event+0xd0/0xd0
> > > [   34.136433]  [<c146a459>] i9xx_crtc_disable+0x59/0x400
> > > 
> > > and the interloper:
> > > 
> > > [   47.012212] WARNING: CPU: 2 PID: 1423 at drivers/gpu/drm/drm_irq.c:1130 drm_wait_one_vblank+0x15a/0x160()
> > > [   47.012217] vblank wait timed out on crtc 1
> > > [   47.012400]  [<c13f664a>] drm_wait_one_vblank+0x15a/0x160
> > > [   47.012409]  [<c107d7d0>] ? prepare_to_wait_event+0xd0/0xd0
> > > [   47.012420]  [<c146762e>] intel_pipe_set_base+0x11e/0x1f0
> > 
> > Are you sure? The patch strictly increase the coverage for when vblanks
> > works, so more sounds really funky ...
> 
> Coincidental maybe? But it only has appeared with that patch...

intel_pipe_set_base() isn't a thing anymore, so I take it this is some
slightly older kernel?

Looking at the code, the wait in intel_pipe_set_base() was protected
by crtc->active, and intel_pipe_set_base() wasn't actually called for
the full modeset path. So, if we're getting a timeout outside the full
modeset path we've either messed up in the irq code, or we somehow
end up think a pipe is active when it's not.

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

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

end of thread, other threads:[~2015-02-24 12:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07 13:38 [PATCH] drm/i915: Push vblank enable/disable past encoder->enable/disable Daniel Vetter
2015-01-07 14:19 ` Jani Nikula
2015-01-07 17:37 ` shuang.he
2015-01-07 21:40 ` Chris Wilson
2015-02-23 16:05   ` Daniel Vetter
2015-02-23 16:54     ` Chris Wilson
2015-02-24 12:58       ` Ville Syrjälä
2015-02-23 23:19   ` Daniel Vetter
2015-02-16  8:24 ` Jani Nikula
2015-02-23 12:57   ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox