drm/i915: Optimise VMA lookup slightly
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 13 Dec 2016 14:37:27 +0000 (14:37 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 15 Dec 2016 13:31:26 +0000 (13:31 +0000)
commit2bf0d26706f899e124a2b340dc0529386bb2b235
tree825d46bd0cee90097a0ed29964ebc99c624aeedf
parent2ee7dc497e348eecbb82adbb1ea9e9a7e29fe921
drm/i915: Optimise VMA lookup slightly

Cast VM pointers before substraction to save the compiler
doing a smart one which includes multiplication.

v2: Only keep the first optimisation and prettify it. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1481639847-9214-1-git-send-email-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_vma.h