From: Ville Syrjälä <ville.syrj...@linux.intel.com>

We don't have proper support for local memory elsewhere in the code,
and seeing as no-one seems to have ever seen a system which has local
memory, just report stolen_size as 0 when local memory is detected.

Add a big WARN to alert us if someone were to stumble on one of these
imaginary beasts.

Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
---
 drivers/char/agp/intel-gtt.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 078968d..d7a1ed3 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -437,6 +437,13 @@ static unsigned int intel_gtt_stolen_size(void)
                stolen_size = 0;
        }
 
+       /*
+        * Assumption is that systems with local
+        * memory don't actually exist in the wild.
+        */
+       if (WARN(local, "Unicorn sighted! Stop the presses!\n"))
+               stolen_size = 0;
+
        return stolen_size;
 }
 
-- 
1.8.3.2

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

Reply via email to