public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Francisco Jerez <currojerez@riseup.net>
Cc: intel-gfx@lists.freedesktop.org, Ben Widawsky <ben@bwidawsk.net>,
	Daniel Vetter <daniel@ffwll.ch>,
	stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915/hsw: Disable L3 caching of atomic memory operations.
Date: Thu, 3 Oct 2013 09:35:12 +0200	[thread overview]
Message-ID: <20131003073512.GD31334@phenom.ffwll.local> (raw)
In-Reply-To: <1380754396-15034-1-git-send-email-currojerez@riseup.net>

On Wed, Oct 02, 2013 at 03:53:16PM -0700, Francisco Jerez wrote:
> Otherwise using any atomic memory operation will lock up the GPU due
> to a Haswell hardware bug.
> 
> v2: Use the _MASKED_BIT_ENABLE macro.  Drop drm parameter definition.
> 
> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: <stable@vger.kernel.org>

Picked up for -fixes, thanks for the patch. Checkpatch was a bit unhappy
about the whitespace, so I've rectified that while applying.
-Daniel
> ---
>  drivers/gpu/drm/i915/i915_reg.h | 6 ++++++
>  drivers/gpu/drm/i915/intel_pm.c | 5 +++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index c159e1a..38f96f6 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -3881,6 +3881,9 @@
>  #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
>  #define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
>  
> +#define HSW_SCRATCH1				0xb038
> +#define  HSW_SCRATCH1_L3_DATA_ATOMICS_DISABLE	(1<<27)
> +
>  #define HSW_FUSE_STRAP		0x42014
>  #define  HSW_CDCLK_LIMIT	(1 << 24)
>  
> @@ -4728,6 +4731,9 @@
>  #define GEN7_ROW_CHICKEN2_GT2		0xf4f4
>  #define   DOP_CLOCK_GATING_DISABLE	(1<<0)
>  
> +#define HSW_ROW_CHICKEN3		0xe49c
> +#define  HSW_ROW_CHICKEN3_L3_GLOBAL_ATOMICS_DISABLE    (1 << 6)
> +
>  #define G4X_AUD_VID_DID			(dev_priv->info->display_mmio_offset + 0x62020)
>  #define INTEL_AUDIO_DEVCL		0x808629FB
>  #define INTEL_AUDIO_DEVBLC		0x80862801
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index dd176b7..556abc6 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4955,6 +4955,11 @@ static void haswell_init_clock_gating(struct drm_device *dev)
>  	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
>  			GEN7_WA_L3_CHICKEN_MODE);
>  
> +	/* L3 caching of data atomics doesn't work -- disable it. */
> +	I915_WRITE(HSW_SCRATCH1, HSW_SCRATCH1_L3_DATA_ATOMICS_DISABLE);
> +	I915_WRITE(HSW_ROW_CHICKEN3,
> +                _MASKED_BIT_ENABLE(HSW_ROW_CHICKEN3_L3_GLOBAL_ATOMICS_DISABLE));
> +
>  	/* This is required by WaCatErrorRejectionIssue:hsw */
>  	I915_WRITE(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG,
>  			I915_READ(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG) |
> -- 
> 1.8.3.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2013-10-03  7:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02 22:03 [PATCH] drm/i915/hsw: Disable L3 caching of atomic memory operations Francisco Jerez
2013-10-02 22:16 ` Ben Widawsky
2013-10-02 22:20 ` Daniel Vetter
2013-10-02 22:31   ` Francisco Jerez
2013-10-02 22:31   ` Ben Widawsky
2013-10-02 22:53   ` Francisco Jerez
2013-10-03  7:35     ` Daniel Vetter [this message]
2013-10-03  1:36   ` Eric Anholt

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=20131003073512.GD31334@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=ben@bwidawsk.net \
    --cc=currojerez@riseup.net \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.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