]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/cmdparser: Compare against the previous command descriptor
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 18 Aug 2016 16:17:15 +0000 (17:17 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 18 Aug 2016 21:37:00 +0000 (22:37 +0100)
commit9d278c1dc24e2cf8193d15b18ff4e8cf45243f42
tree8544bd0aab615c71850514d0d61d59a229b8fd4c
parenteaa76177de1a41da912ab5e778964a05041db3d8
drm/i915/cmdparser: Compare against the previous command descriptor

On the blitter (and in test code), we see long sequences of repeated
commands, e.g. XY_PIXEL_BLT, XY_SCANLINE_BLT, or XY_SRC_COPY. For these,
we can skip the hashtable lookup by remembering the previous command
descriptor and doing a straightforward compare of the command header.
The corollary is that we need to do one extra comparison before lookup
up new commands.

v2: Less magic mask (ok, it is still magic, but now you cannot see!)

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-36-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_cmd_parser.c