diff options
| author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-11 14:42:40 -0400 |
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-17 05:19:59 -0400 |
| commit | 48ecfa1090b65390b1cfa4c693ece6b171a407e4 (patch) | |
| tree | f3e701f4ebd0a12bad2ad5943f9e28d30e0b0812 | |
| parent | be901a5a1bdb13c3390110d4b9780c03018d96a0 (diff) | |
drm/i915: properly set ppgtt cacheability on snb
For some reason snb has 2 fields to set ppgtt cacheability. This one
here does not exist on gen7.
This might explain why ppgtt wasn't a win on snb like on ivb - not
enough pte caching.
v2: Fixup rebase fail.
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| -rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 5 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 92acc5f8e334..aa44ff240147 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
| @@ -3669,7 +3669,10 @@ void i915_gem_init_ppgtt(struct drm_device *dev) | |||
| 3669 | pd_offset <<= 16; | 3669 | pd_offset <<= 16; |
| 3670 | 3670 | ||
| 3671 | if (INTEL_INFO(dev)->gen == 6) { | 3671 | if (INTEL_INFO(dev)->gen == 6) { |
| 3672 | uint32_t ecochk, gab_ctl; | 3672 | uint32_t ecochk, gab_ctl, ecobits; |
| 3673 | |||
| 3674 | ecobits = I915_READ(GAC_ECO_BITS); | ||
| 3675 | I915_WRITE(GAC_ECO_BITS, ecobits | ECOBITS_PPGTT_CACHE64B); | ||
| 3673 | 3676 | ||
| 3674 | gab_ctl = I915_READ(GAB_CTL); | 3677 | gab_ctl = I915_READ(GAB_CTL); |
| 3675 | I915_WRITE(GAB_CTL, gab_ctl | GAB_CTL_CONT_AFTER_PAGEFAULT); | 3678 | I915_WRITE(GAB_CTL, gab_ctl | GAB_CTL_CONT_AFTER_PAGEFAULT); |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index d875fb19f62d..a9030f852cf9 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
| @@ -127,6 +127,10 @@ | |||
| 127 | #define ECOCHK_PPGTT_CACHE64B (0x3<<3) | 127 | #define ECOCHK_PPGTT_CACHE64B (0x3<<3) |
| 128 | #define ECOCHK_PPGTT_CACHE4B (0x0<<3) | 128 | #define ECOCHK_PPGTT_CACHE4B (0x0<<3) |
| 129 | 129 | ||
| 130 | #define GAC_ECO_BITS 0x14090 | ||
| 131 | #define ECOBITS_PPGTT_CACHE64B (3<<8) | ||
| 132 | #define ECOBITS_PPGTT_CACHE4B (0<<8) | ||
| 133 | |||
| 130 | #define GAB_CTL 0x24000 | 134 | #define GAB_CTL 0x24000 |
| 131 | #define GAB_CTL_CONT_AFTER_PAGEFAULT (1<<8) | 135 | #define GAB_CTL_CONT_AFTER_PAGEFAULT (1<<8) |
| 132 | 136 | ||
