From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: [PATCH] drm/i915: paper over a pipe-enable vs pageflip race Date: Mon, 08 Oct 2012 20:19:20 +0300 Message-ID: <1349716760.21394.1.camel@ideak-mobl> References: <1349371203-15130-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 750149EFDC for ; Mon, 8 Oct 2012 10:19:23 -0700 (PDT) In-Reply-To: <1349371203-15130-1-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org 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 I've seen the same issue on an ivb ultrabook machine and the patch gets rid of it, so: Tested-by: Imre Deak > --- > 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)