]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/cmdparser: Improve hash function
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 18 Aug 2016 16:17:14 +0000 (17:17 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 18 Aug 2016 21:36:59 +0000 (22:36 +0100)
commiteaa76177de1a41da912ab5e778964a05041db3d8
tree08d6739686d1e032d8586ac081561df0cddf0cd7
parenta4a4b6fe7dac2a0fd1583ac8274812693dd2c15a
drm/i915/cmdparser: Improve hash function

The existing code's hashfunction is very suboptimal (most 3D commands
use the same bucket degrading the hash to a long list). The code even
acknowledge that the issue was known and the fix simple:

/*
 * If we attempt to generate a perfect hash, we should be able to look at bits
 * 31:29 of a command from a batch buffer and use the full mask for that
 * client. The existing INSTR_CLIENT_MASK/SHIFT defines can be used for this.
 */

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