From: Eric Anholt <eric@anholt.net>
To: intel-gfx <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 9/9] drm/i915: swizzling support for snb/ivb
Date: Fri, 11 Nov 2011 08:50:30 -0800 [thread overview]
Message-ID: <87sjluob6x.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <1320931087-1557-10-git-send-email-daniel.vetter@ffwll.ch>
[-- Attachment #1.1: Type: text/plain, Size: 2251 bytes --]
On Thu, 10 Nov 2011 14:18:07 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> We have to do this manually. Somebody had a Great Idea.
>
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
People playing with this when not strictly required is scary to me.
Manually swizzling was a world of hurt. I got to play with things like
"when the management engine is enabled, it carves out the top N MB of
one of the dimms, and the corresponding N MB of the other dimm doesn't
get swizzled, and you lose".
> diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
> index 861223b..af0a2fc 100644
> --- a/drivers/gpu/drm/i915/i915_gem_tiling.c
> +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
> @@ -93,8 +93,20 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
> uint32_t swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
>
> if (INTEL_INFO(dev)->gen >= 6) {
> - swizzle_x = I915_BIT_6_SWIZZLE_NONE;
> - swizzle_y = I915_BIT_6_SWIZZLE_NONE;
> + uint32_t dimm_c0, dimm_c1;
> + dimm_c0 = I915_READ(MAD_DIMM_C0);
> + dimm_c1 = I915_READ(MAD_DIMM_C1);
> + dimm_c0 &= MAD_DIMM_A_SIZE_MASK | MAD_DIMM_A_SIZE_MASK;
> + dimm_c1 &= MAD_DIMM_A_SIZE_MASK | MAD_DIMM_A_SIZE_MASK;
> + /* Enable swizzling when the channels are populated with
> + * identically sized dimms. */
> + if (dimm_c0 == dimm_c1) {
> + swizzle_x = I915_BIT_6_SWIZZLE_9_10;
> + swizzle_y = I915_BIT_6_SWIZZLE_9;
> + } else {
> + swizzle_x = I915_BIT_6_SWIZZLE_NONE;
> + swizzle_y = I915_BIT_6_SWIZZLE_NONE;
> + }
> } else if (IS_GEN5(dev)) {
> /* On Ironlake whatever DRAM config, GPU always do
> * same swizzling setup.
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 0a0b6b1..a62fa95 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -327,6 +327,8 @@
> #define ARB_MODE 0x04030
> #define ARB_MODE_SWIZZLE_SNB (1<<4)
> #define ARB_MODE_SWIZZLE_IVB (1<<5)
> +#define ARB_MODE_ENABLE(x) GFX_MODE_ENABLE(x)
> +#define ARB_MODE_DISABLE(x) GFX_MODE_DISABLE(x)
> #define RENDER_HWS_PGA_GEN7 (0x04080)
> #define BSD_HWS_PGA_GEN7 (0x04180)
> #define BLT_HWS_PGA_GEN7 (0x04280)
[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2011-11-11 16:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 13:17 [PATCH 0/9] gpu hang and swizzle patches Daniel Vetter
2011-11-10 13:17 ` [PATCH 1/9] drm/i915: refactor debugfs open function Daniel Vetter
2011-11-10 19:25 ` Ben Widawsky
2011-11-10 13:18 ` [PATCH 2/9] drm/i915: refactor debugfs create functions Daniel Vetter
2011-11-10 19:26 ` Ben Widawsky
2011-11-10 13:18 ` [PATCH 3/9] drm/i915: add interface to simulate gpu hangs Daniel Vetter
2011-11-10 16:34 ` [PATCH] " Daniel Vetter
2011-12-02 22:21 ` Daniel Vetter
2011-12-03 1:33 ` Chris Wilson
2011-12-05 23:20 ` Ben Widawsky
2011-11-10 13:18 ` [PATCH 4/9] drm/i915: rework dev->first_error locking Daniel Vetter
2011-11-27 19:31 ` [PATCH] " Daniel Vetter
2011-11-10 13:18 ` [PATCH 5/9] drm/i915: destroy existing error_state when simulating a gpu hang Daniel Vetter
2011-11-10 13:18 ` [PATCH 6/9] drm/i915: fix swizzle detection for gen3 Daniel Vetter
2011-11-10 16:36 ` [PATCH] " Daniel Vetter
2011-11-10 13:18 ` [PATCH 7/9] drm/i915: add debugfs file for swizzling information Daniel Vetter
2011-11-10 16:39 ` [PATCH] " Daniel Vetter
2011-11-10 13:18 ` [PATCH 8/9] drm/i915: add gen6+ registers to i915_swizzle_info Daniel Vetter
2011-11-10 13:18 ` [PATCH 9/9] drm/i915: swizzling support for snb/ivb Daniel Vetter
2011-11-11 16:50 ` Eric Anholt [this message]
2011-11-11 17:22 ` Daniel Vetter
2011-11-11 19:37 ` Eric Anholt
2011-11-11 19:51 ` Daniel Vetter
2011-11-11 19:58 ` Eric Anholt
2011-11-11 20:18 ` Daniel Vetter
2011-11-14 16:19 ` Eric Anholt
2011-11-11 0:15 ` [PATCH 0/9] gpu hang and swizzle patches Chris Wilson
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=87sjluob6x.fsf@eliezer.anholt.net \
--to=eric@anholt.net \
--cc=daniel.vetter@ffwll.ch \
--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