Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915: Never read FORCEWAKE
Date: Fri, 24 Aug 2012 21:48:45 +0200	[thread overview]
Message-ID: <20120824194845.GJ5371@phenom.ffwll.local> (raw)
In-Reply-To: <1345836671-1180-4-git-send-email-ben@bwidawsk.net>

On Fri, Aug 24, 2012 at 12:31:11PM -0700, Ben Widawsky wrote:
> The same designer from the previous patch has told us to never read
> FORCEWAKE. We only do this for the POSTING_READ(), so simply change that
> to something within the same cacheline (for no reason in particular
> other than it sounds nice). In the _mt case we can leverage
> the gtfifodbg check for the POSTING_READ.
> 
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>

This partially reverts

commit 6af2d180f82151cf3d58952e35a4f96e45bc453a
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Jul 26 16:24:50 2012 +0200

    drm/i915: fix forcewake related hangs on snb

I guess the commit message should mention that. Also, please add a comment
it the _put functions that the check_fifodbg serves as a posting read (and
that we have experimental evidence suggesting that we should readback
something "nearby").

btw, can you please ask your nice designer whether he has any clue whether
that "nearby" posting_read has an effect?

Thanks, Daniel
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 2a8468d..83ec02c 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3975,7 +3975,7 @@ static void __gen6_gt_force_wake_get(struct drm_i915_private *dev_priv)
>  		DRM_ERROR("Force wake wait timed out\n");
>  
>  	I915_WRITE_NOTRACE(FORCEWAKE, 1);
> -	POSTING_READ(FORCEWAKE);
> +	POSTING_READ(ECOBUS); /* something from same cacheline, but !FORCEWAKE */
>  
>  	if (wait_for_atomic((I915_READ_NOTRACE(forcewake_ack) & 1),
>  			    FORCEWAKE_ACK_TIMEOUT_MS))
> @@ -3998,7 +3998,7 @@ static void __gen6_gt_force_wake_mt_get(struct drm_i915_private *dev_priv)
>  		DRM_ERROR("Force wake wait timed out\n");
>  
>  	I915_WRITE_NOTRACE(FORCEWAKE_MT, _MASKED_BIT_ENABLE(1));
> -	POSTING_READ(FORCEWAKE_MT);
> +	POSTING_READ(ECOBUS); /* something from same cacheline, but !FORCEWAKE */
>  
>  	if (wait_for_atomic((I915_READ_NOTRACE(forcewake_ack) & 1),
>  			    FORCEWAKE_ACK_TIMEOUT_MS))
> @@ -4035,14 +4035,12 @@ void gen6_gt_check_fifodbg(struct drm_i915_private *dev_priv)
>  static void __gen6_gt_force_wake_put(struct drm_i915_private *dev_priv)
>  {
>  	I915_WRITE_NOTRACE(FORCEWAKE, 0);
> -	POSTING_READ(FORCEWAKE);
>  	gen6_gt_check_fifodbg(dev_priv);
>  }
>  
>  static void __gen6_gt_force_wake_mt_put(struct drm_i915_private *dev_priv)
>  {
>  	I915_WRITE_NOTRACE(FORCEWAKE_MT, _MASKED_BIT_DISABLE(1));
> -	POSTING_READ(FORCEWAKE_MT);
>  	gen6_gt_check_fifodbg(dev_priv);
>  }
>  
> -- 
> 1.7.12
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

      reply	other threads:[~2012-08-24 19:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24 19:31 [PATCH 0/3] Some forcewake fixes Ben Widawsky
2012-08-24 19:31 ` [PATCH 1/3] drm/i915: Extract forcewake ack timeout Ben Widawsky
2012-08-24 19:31 ` [PATCH 2/3] drm/i915: Change forcewake timeout to 2ms Ben Widawsky
2012-08-27  6:59   ` Jani Nikula
2012-08-28 15:51     ` Ben Widawsky
2012-08-28 16:00       ` Daniel Vetter
2012-08-28 16:07         ` Ben Widawsky
2012-08-28 16:27           ` Daniel Vetter
2012-08-24 19:31 ` [PATCH 3/3] drm/i915: Never read FORCEWAKE Ben Widawsky
2012-08-24 19:48   ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120824194845.GJ5371@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox