aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_gtt.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-07-17 05:57:50 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2018-07-19 12:03:59 -0400
commit79556df293b2efbb3ccebb6db02120d62e348b44 (patch)
treed8e10e840dee6739469d82ad0b5416b87c721d1b /drivers/gpu/drm/i915/i915_gem_gtt.c
parentef821e3f14e868779505bf08f96afb4eade53652 (diff)
drm/i915/gtt: Enable full-ppgtt by default everywhere
We should we have all the kinks worked out and full-ppgtt now works reliably on gen7 (Ivybridge, Valleyview/Baytrail and Haswell). If we can let userspace have full control over their own ppgtt, it makes softpinning far more effective, in turn making GPU dispatch far more efficient by virtue of better mm segregation. On the other hand, switching over to a different GTT for every client does incur noticeable overhead, but only for very lightweight tasks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Cc: Matthew Auld <matthew.william.auld@gmail.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Jason Ekstrand <jason.ekstrand@intel.com> Cc: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180717095751.1034-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_gtt.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 3d75f2bb5623..dd09d4d8b0ed 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -179,13 +179,11 @@ int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv,
179 return 0; 179 return 0;
180 } 180 }
181 181
182 if (HAS_LOGICAL_RING_CONTEXTS(dev_priv)) { 182 if (has_full_48bit_ppgtt)
183 if (has_full_48bit_ppgtt) 183 return 3;
184 return 3;
185 184
186 if (has_full_ppgtt) 185 if (has_full_ppgtt)
187 return 2; 186 return 2;
188 }
189 187
190 return 1; 188 return 1;
191} 189}