From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Only wait one vblank when disabling crc if the pipe is on Date: Fri, 6 Jun 2014 11:36:37 +0200 Message-ID: <20140606093637.GD7416@phenom.ffwll.local> References: <1402035728-10127-1-git-send-email-daniel.vetter@ffwll.ch> <20140606085710.GG27580@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F4B66EA3A for ; Fri, 6 Jun 2014 02:36:43 -0700 (PDT) Received: by mail-wi0-f169.google.com with SMTP id ho1so564090wib.2 for ; Fri, 06 Jun 2014 02:36:42 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140606085710.GG27580@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Fri, Jun 06, 2014 at 11:57:10AM +0300, Ville Syrj=E4l=E4 wrote: > On Fri, Jun 06, 2014 at 08:22:08AM +0200, Daniel Vetter wrote: > > Otherwise we incur an unsightly WARNING. The mutex locking is a bit > > overkill, but it curbs races and eventially we might grow a locking > > check in the vblank wait code to make sure the right crtc lock is > > held. > > = > > This is fallout from > > = > > commit 9393707190194eb8b42e412b444a03331db6862f > > Author: Jesse Barnes > > AuthorDate: Fri Apr 4 16:12:09 2014 -0700 > > = > > drm/i915: warn when a vblank wait times out > > = > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3D79612 > > Tested-by: Guo Jinxian > > Signed-off-by: Daniel Vetter > = > = > > --- > > drivers/gpu/drm/i915/i915_debugfs.c | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > = > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915= /i915_debugfs.c > > index 601caa88c092..cf94e9640627 100644 > > --- a/drivers/gpu/drm/i915/i915_debugfs.c > > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > > @@ -2927,11 +2927,16 @@ static int pipe_crc_set_source(struct drm_devic= e *dev, enum pipe pipe, > > /* real source -> none transition */ > > if (source =3D=3D INTEL_PIPE_CRC_SOURCE_NONE) { > > struct intel_pipe_crc_entry *entries; > > + struct intel_crtc *crtc =3D > > + crtc =3D to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); > ^^^^^^ > = > What's that? Oops. Luckily patch still worked, C rules are bendy enough ;-) > = > Otherwise: > Reviewed-by: Ville Syrj=E4l=E4 Thanks, -Daniel > = > > = > > DRM_DEBUG_DRIVER("stopping CRCs for pipe %c\n", > > pipe_name(pipe)); > > = > > - intel_wait_for_vblank(dev, pipe); > > + mutex_lock(&crtc->base.mutex); > > + if (crtc->active) > > + intel_wait_for_vblank(dev, pipe); > > + mutex_unlock(&crtc->base.mutex); > > = > > spin_lock_irq(&pipe_crc->lock); > > entries =3D pipe_crc->entries; > > -- = > > 2.0.0 > > = > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > = > -- = > Ville Syrj=E4l=E4 > Intel OTC -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch