From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 3/7] drm/i915: don't read pp_ctrl_reg if we're suspended Date: Tue, 1 Apr 2014 22:37:50 +0200 Message-ID: <20140401203749.GB7225@phenom.ffwll.local> References: <1396374913-2030-1-git-send-email-przanoni@gmail.com> <1396374913-2030-4-git-send-email-przanoni@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C3BE6E4B4 for ; Tue, 1 Apr 2014 13:37:54 -0700 (PDT) Received: by mail-wg0-f45.google.com with SMTP id l18so7892070wgh.28 for ; Tue, 01 Apr 2014 13:37:53 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1396374913-2030-4-git-send-email-przanoni@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Paulo Zanoni Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Tue, Apr 01, 2014 at 02:55:09PM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > ... at edp_have_panel_vdd. Just return false, saying we don't have the > panel VDD since the device is suspended. > > We started getting WARNs about this problem since the patch that > started checking if we're suspended while reading registers. > > Testcase: igt/pm_pc8 > Signed-off-by: Paulo Zanoni Hm, where's an example backtrace for this? I wonder whether we simply need to extend the range where we hold the runtime pm ref a bit ... Whatever, merged (I can rebase afterwards if you supply the backtrace for the commit message, there we should at least have it). -Daniel > --- > drivers/gpu/drm/i915/intel_dp.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > index 6f767e5..44471cc 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -314,7 +314,8 @@ static bool edp_have_panel_vdd(struct intel_dp *intel_dp) > struct drm_device *dev = intel_dp_to_dev(intel_dp); > struct drm_i915_private *dev_priv = dev->dev_private; > > - return (I915_READ(_pp_ctrl_reg(intel_dp)) & EDP_FORCE_VDD) != 0; > + return !dev_priv->pm.suspended && > + (I915_READ(_pp_ctrl_reg(intel_dp)) & EDP_FORCE_VDD) != 0; > } > > static void > -- > 1.8.5.3 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch