drm/i915: Micro-optimise gen6_ppgtt_insert_entries()
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Feb 2017 08:43:36 +0000 (08:43 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Feb 2017 10:05:52 +0000 (10:05 +0000)
commitb31144c0daa8c570d3fb60ddbd0e26ba1ea62485
tree5eae0f927ac3fb0c0f1d7c93caa037547268af61
parentba7a5741b9ee6e9f682f949c8db6a96201ab4ca1
drm/i915: Micro-optimise gen6_ppgtt_insert_entries()

Inline the address computation to avoid the vfunc call for every page.
We still have to pay the high overhead of sg_page_iter_next(), but now
at least GCC can optimise the inner most loop, giving a significant
boost to some thrashing Unreal Engine workloads.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c