From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915/vlv: Remove check for Old Ack during forcewake Date: Thu, 18 Sep 2014 13:53:13 +0200 Message-ID: <20140918115313.GO31703@phenom.ffwll.local> References: <1411046510-13216-1-git-send-email-deepak.s@linux.intel.com> <20140918083925.GP12416@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B14E6E0B6 for ; Thu, 18 Sep 2014 04:52:47 -0700 (PDT) Received: by mail-wg0-f47.google.com with SMTP id l18so746547wgh.6 for ; Thu, 18 Sep 2014 04:52:46 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140918083925.GP12416@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Sep 18, 2014 at 11:39:25AM +0300, Ville Syrj=E4l=E4 wrote: > On Thu, Sep 18, 2014 at 06:51:50PM +0530, deepak.s@linux.intel.com wrote: > > From: Deepak S > > = > > Based on the HW team inputs. We can should not wait for the old ack, > > Waiting for old ack might fail, when other forcewake came before the > > present one is desserted. > > = > > for example, if forcewake bit 0 was set and before it could get cleared > > forcewake bit 1 got set, HW eventually clear bit 0, when the bit 1 > > is cleared. i.e, bit 1 is still sent then forcewake bit 0 will still be > > set. > > = > > Signed-off-by: Deepak S > > --- > > drivers/gpu/drm/i915/intel_uncore.c | 10 ---------- > > 1 file changed, 10 deletions(-) > > = > > diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915= /intel_uncore.c > > index 918b761..bcb0806 100644 > > --- a/drivers/gpu/drm/i915/intel_uncore.c > > +++ b/drivers/gpu/drm/i915/intel_uncore.c > > @@ -196,11 +196,6 @@ static void __vlv_force_wake_get(struct drm_i915_p= rivate *dev_priv, > > { > > /* Check for Render Engine */ > > if (FORCEWAKE_RENDER & fw_engine) { > > - if (wait_for_atomic((__raw_i915_read32(dev_priv, > > - FORCEWAKE_ACK_VLV) & > > - FORCEWAKE_KERNEL) =3D=3D 0, > > - FORCEWAKE_ACK_TIMEOUT_MS)) > > - DRM_ERROR("Timed out: Render forcewake old ack to clear.\n"); > > = > = > Can we have a comment here? Something like this perhaps: > = > /* > * WaRsDontPollForAckOnClearingFWBits:vlv > * Hardware clears ack bits lazily (only when all ack > * bits become 0) so don't poll for individiual ack > * bits to be clear here. > */ > = > Apart from that: > Reviewed-by: Ville Syrj=E4l=E4 Shouldn't this be Cc: stable@vger.kernel.org? -Daniel > = > > __raw_i915_write32(dev_priv, FORCEWAKE_VLV, > > _MASKED_BIT_ENABLE(FORCEWAKE_KERNEL)); > > @@ -214,11 +209,6 @@ static void __vlv_force_wake_get(struct drm_i915_p= rivate *dev_priv, > > = > > /* Check for Media Engine */ > > if (FORCEWAKE_MEDIA & fw_engine) { > > - if (wait_for_atomic((__raw_i915_read32(dev_priv, > > - FORCEWAKE_ACK_MEDIA_VLV) & > > - FORCEWAKE_KERNEL) =3D=3D 0, > > - FORCEWAKE_ACK_TIMEOUT_MS)) > > - DRM_ERROR("Timed out: Media forcewake old ack to clear.\n"); > > = > > __raw_i915_write32(dev_priv, FORCEWAKE_MEDIA_VLV, > > _MASKED_BIT_ENABLE(FORCEWAKE_KERNEL)); > > -- = > > 1.9.1 > > = > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > = > -- = > Ville Syrj=E4l=E4 > Intel OTC -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch