]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/cmdparser: Use binary search for faster register lookup
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 18 Aug 2016 16:17:17 +0000 (17:17 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 18 Aug 2016 21:37:01 +0000 (22:37 +0100)
commit7b699f1e7116066bd2eb31b2f639fb9073577cc7
tree81d5fd10594dff058fa458744303e06368f7c22a
parent04e0d72eddbcd76f797e1b9fed1b85c9ccd4043d
drm/i915/cmdparser: Use binary search for faster register lookup

A significant proportion of the cmdparsing time for some batches is the
cost to find the register in the mmiotable. We ensure that those tables
are in ascending order such that we could do a binary search if it was
ever merited. It is.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-38-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_cmd_parser.c