From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 09/16] drm/i915: More checks for psr.enabled Date: Wed, 18 Jun 2014 14:41:34 +0200 Message-ID: <20140618124134.GE5821@phenom.ffwll.local> References: <1403092757-31421-1-git-send-email-daniel.vetter@ffwll.ch> <1403092757-31421-10-git-send-email-daniel.vetter@ffwll.ch> <20140618122706.GC31023@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BBD46E599 for ; Wed, 18 Jun 2014 05:41:42 -0700 (PDT) Received: by mail-we0-f178.google.com with SMTP id x48so772878wes.23 for ; Wed, 18 Jun 2014 05:41:41 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140618122706.GC31023@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Daniel Vetter , Intel Graphics Development , Rodrigo Vivi List-Id: intel-gfx@lists.freedesktop.org On Wed, Jun 18, 2014 at 01:27:06PM +0100, Chris Wilson wrote: > On Wed, Jun 18, 2014 at 01:59:10PM +0200, Daniel Vetter wrote: > > We need to make sure that no one else is using this in the > > enable function and also that the work item hasn't raced > > with the disabled function. > > > > v2: Improve bisectability by moving one hunk to an earlier patch. > > > > Cc: Rodrigo Vivi > > Signed-off-by: Daniel Vetter > > --- > > drivers/gpu/drm/i915/intel_dp.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > > index 910f73de3a92..870219ff1187 100644 > > --- a/drivers/gpu/drm/i915/intel_dp.c > > +++ b/drivers/gpu/drm/i915/intel_dp.c > > @@ -1844,6 +1844,11 @@ void intel_edp_psr_enable(struct intel_dp *intel_dp) > > return; > > } > > Is this the tail of a HAS_PSR() now made obsolete? Yeah, we have a bit of redundancy here now I think. Otoh once we have locking they make sense again since HAS_PSR can be checked without grabbing the psr lock, while psr.enabled can't. So I think it makes sense to keep them. -Daniel > > > + if (dev_priv->psr.enabled) { > > + DRM_DEBUG_KMS("PSR already in use\n"); > > + return; > > + } > -Chris > > -- > Chris Wilson, Intel Open Source Technology Centre -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch