[Intel-gfx] [PATCH 148/190] drm/i915: Stop marking the unaccessible scratch page as UC

Chris Wilson chris at chris-wilson.co.uk
Mon Jan 11 03:00:49 PST 2016


Since by design, if not entirely by practice, nothing is allowed to
access the scratch page we use to background fill the VM, then we do not
need to ensure that it is coherent between the CPU and GPU.
set_pages_uc() does a stop_machine() after changing the PAT, and that
significantly impacts upon context creation throughput.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 3db8cdf56dcc..caf573fd2dde 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -407,16 +407,12 @@ static struct i915_page_scratch *alloc_scratch_page(struct drm_device *dev)
 		return ERR_PTR(ret);
 	}
 
-	set_pages_uc(px_page(sp), 1);
-
 	return sp;
 }
 
 static void free_scratch_page(struct drm_device *dev,
 			      struct i915_page_scratch *sp)
 {
-	set_pages_wb(px_page(sp), 1);
-
 	cleanup_px(dev, sp);
 	kfree(sp);
 }
-- 
2.7.0.rc3



More information about the Intel-gfx mailing list