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)
commit76ff480ec9633d689a14e15bc0e3d10a84e6853b
tree81d5fd10594dff058fa458744303e06368f7c22a
parentea884f09e59951af54976881337309e76b00ec20
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