aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_gtt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_gtt.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index de12017c809b..c1cf3329108c 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -1920,6 +1920,22 @@ static void bdw_setup_private_ppat(struct drm_i915_private *dev_priv)
1920 GEN8_PPAT(6, GEN8_PPAT_WB | GEN8_PPAT_LLCELLC | GEN8_PPAT_AGE(2)) | 1920 GEN8_PPAT(6, GEN8_PPAT_WB | GEN8_PPAT_LLCELLC | GEN8_PPAT_AGE(2)) |
1921 GEN8_PPAT(7, GEN8_PPAT_WB | GEN8_PPAT_LLCELLC | GEN8_PPAT_AGE(3)); 1921 GEN8_PPAT(7, GEN8_PPAT_WB | GEN8_PPAT_LLCELLC | GEN8_PPAT_AGE(3));
1922 1922
1923 if (!USES_PPGTT(dev_priv->dev))
1924 /* Spec: "For GGTT, there is NO pat_sel[2:0] from the entry,
1925 * so RTL will always use the value corresponding to
1926 * pat_sel = 000".
1927 * So let's disable cache for GGTT to avoid screen corruptions.
1928 * MOCS still can be used though.
1929 * - System agent ggtt writes (i.e. cpu gtt mmaps) already work
1930 * before this patch, i.e. the same uncached + snooping access
1931 * like on gen6/7 seems to be in effect.
1932 * - So this just fixes blitter/render access. Again it looks
1933 * like it's not just uncached access, but uncached + snooping.
1934 * So we can still hold onto all our assumptions wrt cpu
1935 * clflushing on LLC machines.
1936 */
1937 pat = GEN8_PPAT(0, GEN8_PPAT_UC);
1938
1923 /* XXX: spec defines this as 2 distinct registers. It's unclear if a 64b 1939 /* XXX: spec defines this as 2 distinct registers. It's unclear if a 64b
1924 * write would work. */ 1940 * write would work. */
1925 I915_WRITE(GEN8_PRIVATE_PAT, pat); 1941 I915_WRITE(GEN8_PRIVATE_PAT, pat);