[PATCH 4/6] intel-gtt: Report stolen_size as 0 when local memory is present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

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.syrjala@xxxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux