]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use binary search when looking up forcewake domains
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 4 Oct 2016 08:29:21 +0000 (09:29 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 4 Oct 2016 10:09:59 +0000 (11:09 +0100)
commit88d62261cb19a5a17c67e73e8459e21d1db6cb03
tree74768d392f61452f913ca529bb4153f1d641bab7
parent7c2489a118e6006aa7f443d8c28dbfe2d7f09e79
drm/i915: Use binary search when looking up forcewake domains

Instead of the existing linear seach, now that we have sorted
range tables, we can do a binary search on them for some
potential miniscule performance gain, but more importantly
for elegance and code size. Hopefully the perfomance gain is
sufficient to offset the function calls which were not there
before.

v2: Removed const cast away.

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