* [PATCH] drm/i915: paper over a pipe-enable vs pageflip race
@ 2012-10-04 17:20 Daniel Vetter
2012-10-08 17:19 ` Imre Deak
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2012-10-04 17:20 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
I've discovered this on my ivb machine while stress-testing the new
flip_tests. Only harmful effect observed is that the timestamp is a
bit bogus.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/intel_display.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 67912fe..9cecfd7 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3253,6 +3253,16 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
if (HAS_PCH_CPT(dev))
intel_cpt_verify_modeset(dev, intel_crtc->pipe);
+
+ /*
+ * There seems to be a race in PCH platform hw (at least on some
+ * outputs) where an enabled pipe still completes any pageflip right
+ * away (as if the pipe is off) instead of waiting for vblank. As soon
+ * as the first vblank happend, everything works as expected. Hence just
+ * wait for one vblank before returning to avoid strange things
+ * happening.
+ */
+ intel_wait_for_vblank(dev, intel_crtc->pipe);
}
static void ironlake_crtc_disable(struct drm_crtc *crtc)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: paper over a pipe-enable vs pageflip race
2012-10-04 17:20 [PATCH] drm/i915: paper over a pipe-enable vs pageflip race Daniel Vetter
@ 2012-10-08 17:19 ` Imre Deak
2012-10-08 17:32 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Imre Deak @ 2012-10-08 17:19 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel Graphics Development
On Thu, 2012-10-04 at 19:20 +0200, Daniel Vetter wrote:
> I've discovered this on my ivb machine while stress-testing the new
> flip_tests. Only harmful effect observed is that the timestamp is a
> bit bogus.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
I've seen the same issue on an ivb ultrabook machine and the patch gets
rid of it, so:
Tested-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 67912fe..9cecfd7 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3253,6 +3253,16 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
>
> if (HAS_PCH_CPT(dev))
> intel_cpt_verify_modeset(dev, intel_crtc->pipe);
> +
> + /*
> + * There seems to be a race in PCH platform hw (at least on some
> + * outputs) where an enabled pipe still completes any pageflip right
> + * away (as if the pipe is off) instead of waiting for vblank. As soon
> + * as the first vblank happend, everything works as expected. Hence just
> + * wait for one vblank before returning to avoid strange things
> + * happening.
> + */
> + intel_wait_for_vblank(dev, intel_crtc->pipe);
> }
>
> static void ironlake_crtc_disable(struct drm_crtc *crtc)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: paper over a pipe-enable vs pageflip race
2012-10-08 17:19 ` Imre Deak
@ 2012-10-08 17:32 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-10-08 17:32 UTC (permalink / raw)
To: Imre Deak; +Cc: Daniel Vetter, Intel Graphics Development
On Mon, Oct 08, 2012 at 08:19:20PM +0300, Imre Deak wrote:
> On Thu, 2012-10-04 at 19:20 +0200, Daniel Vetter wrote:
> > I've discovered this on my ivb machine while stress-testing the new
> > flip_tests. Only harmful effect observed is that the timestamp is a
> > bit bogus.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> I've seen the same issue on an ivb ultrabook machine and the patch gets
> rid of it, so:
>
> Tested-by: Imre Deak <imre.deak@intel.com>
Applied with the commit message extended as per our irc discussion, and
with your irc r-b applied. Thanks for testing&review.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-08 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-04 17:20 [PATCH] drm/i915: paper over a pipe-enable vs pageflip race Daniel Vetter
2012-10-08 17:19 ` Imre Deak
2012-10-08 17:32 ` Daniel Vetter
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.