drm/i915: Convert clflushed pagetables over to WC maps
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Feb 2017 08:43:40 +0000 (08:43 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Feb 2017 10:07:18 +0000 (10:07 +0000)
commit8448661d65f6f5dbcdb9c5cba185b284f2464b65
tree9f9d49a7e58323b08f26d2633fb0c3b2a83c682b
parentcbc4e9e6a6d31fcc44921d2be41104425be8ab01
drm/i915: Convert clflushed pagetables over to WC maps

We flush the entire page every time we update a few bytes, making the
update of a page table many, many times slower than is required. If we
create a WC map of the page for our updates, we can avoid the clflush
but incur additional cost for creating the pagetable. We amoritize that
cost by reusing page vmappings, and only changing the page protection in
batches.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.h
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c