]> git.karo-electronics.de Git - linux-beck.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)
commit91e630b9e636954708e933015e7f02f8bcd8b320
tree74768d392f61452f913ca529bb4153f1d641bab7
parentb008123966a45bfda9ef71d35a0b76957d639291
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