+/*
+ * Some intel GPUs can't use those pages in the GTT, which results in
+ * graphics corruption. Sadly, it's impossible to prevent usage of those
+ * pages in the intel allocator.
+ *
+ * Instead, we test for those areas here and leak the corresponding pages.
+ *
+ * Some day, when the intel GPU memory is not backed by shmem any more,
+ * we'll be able to come up with a solution which is contained in i915.
+ */
+static bool i915_usable_page(struct page *page)
+{
+ dma_addr_t addr = page_to_phys(page);
+
+ if (unlikely((addr < 1 * 1024 * 1024) ||
+ (addr == 0x20050000) ||
+ (addr == 0x20110000) ||
+ (addr == 0x20130000) ||
+ (addr == 0x20138000) ||
+ (addr == 0x40004000)))
+ return false;
+
+ return true;
+}
+