From: Daniel Vetter Subject: Re: [PATCH] drm/helper: lock all around force mode restore Date: Fri, 21 Mar 2014 08:07:21 +0100 Message-ID: <20140321070721.GW30571@phenom.ffwll.local> References: <1395362819-2877-1-git-send-email-airlied@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f46.google.com (mail-ee0-f46.google.com [74.125.83.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 74FE76E25A for ; Fri, 21 Mar 2014 00:07:27 -0700 (PDT) Received: by mail-ee0-f46.google.com with SMTP id t10so1435059eei.33 for ; Fri, 21 Mar 2014 00:07:25 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1395362819-2877-1-git-send-email-airlied@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Dave Airlie Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Fri, Mar 21, 2014 at 10:46:59AM +1000, Dave Airlie wrote: > From: Dave Airlie > > Since Daniel documented things with a sledge hammer, we got lots of > nice backtraces in suspend/resume operations, I've check the callers > of this and they all seems safe to me, > > This fixes one set of warns I reported. > > Signed-off-by: Dave Airlie Some drivers have some other modeset gunk around the call to this helper (like cursor frobbing or dpms frobbing) which probably should be moved either to their crtc enable hook or into the core crtc helpers. So I don't think pushing the locking out intro drivers is that useful Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/drm_crtc_helper.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c > index 5d2b7a5..c0f2d62 100644 > --- a/drivers/gpu/drm/drm_crtc_helper.c > +++ b/drivers/gpu/drm/drm_crtc_helper.c > @@ -983,6 +983,7 @@ void drm_helper_resume_force_mode(struct drm_device *dev) > int encoder_dpms; > bool ret; > > + drm_modeset_lock_all(dev); > list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { > > if (!crtc->enabled) > @@ -1017,6 +1018,7 @@ void drm_helper_resume_force_mode(struct drm_device *dev) > > /* disable the unused connectors while restoring the modesetting */ > __drm_helper_disable_unused_functions(dev); > + drm_modeset_unlock_all(dev); > } > EXPORT_SYMBOL(drm_helper_resume_force_mode); > > -- > 1.8.3.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch