Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3eb1c005 authored by Ben Widawsky's avatar Ben Widawsky Committed by Daniel Vetter
Browse files

drm/i915: Conditionally carve out GGTT PDE



It only works that way on GEN6 and GEN7. Let's not assume GENn will be
the same.

Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 1e7d12d4
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -623,9 +623,12 @@ void i915_gem_init_global_gtt(struct drm_device *dev)


	if (intel_enable_ppgtt(dev) && HAS_ALIASING_PPGTT(dev)) {
	if (intel_enable_ppgtt(dev) && HAS_ALIASING_PPGTT(dev)) {
		int ret;
		int ret;

		if (INTEL_INFO(dev)->gen <= 7) {
			/* PPGTT pdes are stolen from global gtt ptes, so shrink the
			/* PPGTT pdes are stolen from global gtt ptes, so shrink the
			 * aperture accordingly when using aliasing ppgtt. */
			 * aperture accordingly when using aliasing ppgtt. */
			gtt_size -= I915_PPGTT_PD_ENTRIES*PAGE_SIZE;
			gtt_size -= I915_PPGTT_PD_ENTRIES*PAGE_SIZE;
		}


		i915_gem_setup_global_gtt(dev, 0, mappable_size, gtt_size);
		i915_gem_setup_global_gtt(dev, 0, mappable_size, gtt_size);