drm/i915/gtt: Use optimised memset32/64 for clearing PTE
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 4 Mar 2019 23:06:46 +0000 (23:06 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Mar 2019 08:51:30 +0000 (08:51 +0000)
commit4f1836453e42edcc7bb3c53c6c38534697ca77b0
tree292ca26577f403e56919a13bde1cbcd4c6c1cfb1
parentf139da1390577eb349e762f2f5794a1ff33497f7
drm/i915/gtt: Use optimised memset32/64 for clearing PTE

Replace the open-coded memset loops with the memset32/64 routines that
reduce to a single instruction or two:

add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-83 (-83)
Function                                     old     new   delta
gen6_ppgtt_clear_range                       371     344     -27
gen8_ppgtt_clear_pd                          575     519     -56

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190304230646.23714-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c