Skip to content

Commit 6d50b06

Browse files
vsyrjaladanvet
authored andcommitted
drm/i915: Enable GTT caching on gen8
GTT caching was disabled by default on gen8 due to not working with big pages. Some information suggests that it got fixed, but still GTT caching has been left disabled by default. Or could be it just meant that the default was changed to off, and hence the problem got solved. Enable GTT caching in the hopes of some performance increase. Whether or not the big pages issue has been fixed is irrelevant at this stage since we don't use big pages. This gives me a 1-2% improvement in xonotic on my BSW. Haven't tried BDW, but supposedly it has larger TLBs so might not benefit as much. On HSW GTT caching is enabled by default. Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Jesse Barnes <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
1 parent 4d487cf commit 6d50b06

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,8 @@ enum skl_disp_power_wells {
14611461
#define RING_HWS_PGA(base) ((base)+0x80)
14621462
#define RING_HWS_PGA_GEN6(base) ((base)+0x2080)
14631463

1464+
#define HSW_GTT_CACHE_EN 0x4024
1465+
#define GTT_CACHE_EN_ALL 0xF0007FFF
14641466
#define GEN7_WR_WATERMARK 0x4028
14651467
#define GEN7_GFX_PRIO_CTRL 0x402C
14661468
#define ARB_MODE 0x4030

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6214,6 +6214,13 @@ static void broadwell_init_clock_gating(struct drm_device *dev)
62146214
I915_WRITE(GEN8_L3SQCREG1, BDW_WA_L3SQCREG1_DEFAULT);
62156215
I915_WRITE(GEN7_MISCCPCTL, misccpctl);
62166216

6217+
/*
6218+
* WaGttCachingOffByDefault:bdw
6219+
* GTT cache may not work with big pages, so if those
6220+
* are ever enabled GTT cache may need to be disabled.
6221+
*/
6222+
I915_WRITE(HSW_GTT_CACHE_EN, GTT_CACHE_EN_ALL);
6223+
62176224
lpt_init_clock_gating(dev);
62186225
}
62196226

@@ -6489,6 +6496,12 @@ static void cherryview_init_clock_gating(struct drm_device *dev)
64896496
/* WaDisableSDEUnitClockGating:chv */
64906497
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
64916498
GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
6499+
6500+
/*
6501+
* GTT cache may not work with big pages, so if those
6502+
* are ever enabled GTT cache may need to be disabled.
6503+
*/
6504+
I915_WRITE(HSW_GTT_CACHE_EN, GTT_CACHE_EN_ALL);
64926505
}
64936506

64946507
static void g4x_init_clock_gating(struct drm_device *dev)

0 commit comments

Comments
 (0)