From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH] drm/i915: Hold CRTC lock whilst freezing the planes Date: Thu, 22 May 2014 08:47:39 -0700 Message-ID: <20140522084739.6b6828df@jbarnes-desktop> References: <1400748280-26449-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from gproxy4-pub.mail.unifiedlayer.com (gproxy4-pub.mail.unifiedlayer.com [69.89.23.142]) by gabe.freedesktop.org (Postfix) with SMTP id DF3F16EC5F for ; Thu, 22 May 2014 08:47:40 -0700 (PDT) In-Reply-To: <1400748280-26449-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, 22 May 2014 09:44:40 +0100 Chris Wilson wrote: > Daniel keeps on ramping up the warning level of the DRM and our display > core to make it complain whenever the locking rules are not followed. > This caught > > commit 24576d23976746cb52e7700c4cadbf4bc1bc3472 > Author: Jesse Barnes > Date: Tue Mar 26 09:25:45 2013 -0700 > > drm/i915: enable VT switchless resume v3 > > introducing an unlocked access to the CRTC whilst disabling it for > suspend. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78114 > Signed-off-by: Chris Wilson > Cc: Jesse Barnes > Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/i915/i915_drv.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > index 591762c26af4..8450569ff42c 100644 > --- a/drivers/gpu/drm/i915/i915_drv.c > +++ b/drivers/gpu/drm/i915/i915_drv.c > @@ -532,8 +532,11 @@ static int i915_drm_freeze(struct drm_device *dev) > * for _thaw. > */ > mutex_lock(&dev->mode_config.mutex); > - for_each_crtc(dev, crtc) > + for_each_crtc(dev, crtc) { > + mutex_lock(&crtc->mutex); > dev_priv->display.crtc_disable(crtc); > + mutex_unlock(&crtc->mutex); > + } > mutex_unlock(&dev->mode_config.mutex); > > intel_modeset_suspend_hw(dev); Reviewed-by: Jesse Barnes -- Jesse Barnes, Intel Open Source Technology Center