From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: fix assert_cursor on BDW Date: Thu, 27 Feb 2014 21:47:18 +0200 Message-ID: <20140227194718.GM3852@intel.com> References: <1393529456-2036-1-git-send-email-przanoni@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id E9AA0F9F5A for ; Thu, 27 Feb 2014 11:47:54 -0800 (PST) Content-Disposition: inline In-Reply-To: <1393529456-2036-1-git-send-email-przanoni@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Paulo Zanoni Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Thu, Feb 27, 2014 at 04:30:56PM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > = > We need to read the correct register, not a register that doesn't exist > and will trigger "Unclaimed register" messages when we touch it. > = > Also rearrange the checks in an attempt to prevent this error from > happening again. > = > Signed-off-by: Paulo Zanoni Reviewed-by: Ville Syrj=E4l=E4 I was thinking you might want to rearrange intel_crtc_update_cursor() the same way, but maybe it's not worth the effort. We may soon have to take a look at using the pipe_offsets[] stuff for cursors anyway. > --- > drivers/gpu/drm/i915/intel_display.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > = > This patch is untested, but the "Uncalimed register" message is real, as = long as > we have the patch to print them. > = > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/= intel_display.c > index f19e6ea..2e05d1e 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -1095,12 +1095,13 @@ static void assert_cursor(struct drm_i915_private= *dev_priv, > struct drm_device *dev =3D dev_priv->dev; > bool cur_state; > = > - if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev)) > - cur_state =3D I915_READ(CURCNTR_IVB(pipe)) & CURSOR_MODE; > - else if (IS_845G(dev) || IS_I865G(dev)) > + > + if (IS_845G(dev) || IS_I865G(dev)) > cur_state =3D I915_READ(_CURACNTR) & CURSOR_ENABLE; > - else > + else if (INTEL_INFO(dev)->gen <=3D 6 || IS_VALLEYVIEW(dev)) > cur_state =3D I915_READ(CURCNTR(pipe)) & CURSOR_MODE; > + else > + cur_state =3D I915_READ(CURCNTR_IVB(pipe)) & CURSOR_MODE; > = > WARN(cur_state !=3D state, > "cursor on pipe %c assertion failure (expected %s, current %s)\n", > -- = > 1.8.5.3 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel OTC