public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: limit PPGTT size to 2GB in 32-bit platforms
@ 2015-05-28 15:24 Michel Thierry
  2015-05-28 15:39 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Michel Thierry @ 2015-05-28 15:24 UTC (permalink / raw)
  To: intel-gfx; +Cc: daniel.vetter, Mika Kuoppala

We already set this limit for the GGTT.

This is a temporary patch until a full replacement of size_t variables
(inadequate in 32-bit kernel) is in place.

Regression from:
	commit a4e0bedca678c81eea4cd79a4bd502335639f73a
	Author: Michel Thierry <michel.thierry@intel.com>
	Date:   Wed Apr 8 12:13:35 2015 +0100

		drm/i915: Use complete address space in true PPGTT

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 17b7df0..ffecb87 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -951,7 +951,15 @@ static int gen8_ppgtt_init(struct i915_hw_ppgtt *ppgtt)
 	gen8_initialize_pd(&ppgtt->base, ppgtt->scratch_pd);
 
 	ppgtt->base.start = 0;
+
+#ifdef CONFIG_X86_32
+	/* Limit 32b platforms to GGTT size (2GB) */
+	struct drm_i915_private *dev_priv = ppgtt->base.dev->dev_private;
+
+	ppgtt->base.total = dev_priv->gtt.base.total;
+#else
 	ppgtt->base.total = 1ULL << 32;
+#endif
 	ppgtt->base.cleanup = gen8_ppgtt_cleanup;
 	ppgtt->base.allocate_va_range = gen8_alloc_va_range;
 	ppgtt->base.insert_entries = gen8_ppgtt_insert_entries;
-- 
2.4.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-05-29 17:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28 15:24 [PATCH] drm/i915: limit PPGTT size to 2GB in 32-bit platforms Michel Thierry
2015-05-28 15:39 ` Chris Wilson
2015-05-28 15:59   ` Michel Thierry
2015-05-28 17:09 ` [PATCH v2] " Michel Thierry
2015-05-28 17:47   ` Damien Lespiau
2015-05-28 21:14   ` Chris Wilson
2015-05-29  8:58     ` Michel Thierry
2015-05-29 12:41       ` Chris Wilson
2015-05-29 13:15 ` [PATCH v3] " Michel Thierry
2015-05-29 17:08   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox