]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit79cef04e4e254b06f9ccc334d8d013e857d32063
tree48f568dc316cf2aaad7bfcf79f3e5c6aa9cbf6cb
parent4db7851dad5cdac0beb1c22fce9d0c6fc7596e1b
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