drm/i915: Use binary search when looking for shadowed registers
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 4 Oct 2016 08:29:28 +0000 (09:29 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 4 Oct 2016 10:09:59 +0000 (11:09 +0100)
commit5a659383816aa548e7a1049d3dd5dd552966acac
tree48f568dc316cf2aaad7bfcf79f3e5c6aa9cbf6cb
parent47188574a966b9b9ba0aa5a0fa88d934a331dc07
drm/i915: Use binary search when looking for shadowed registers

Simply replace the linear search with the kernel's binary
search implementation. There is only six registers currently
in that table so this may not be that interesting. It adds a
function call so hopefully remains performance neutral for now.

v2: No need for manual conversion to bool for return.
    (Joonas Lahtinen)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_uncore.c