[Intel-gfx] [PATCH] drm/i915: Use hash tables for the command parser

Damien Lespiau damien.lespiau at intel.com
Thu May 8 15:05:07 CEST 2014


On Mon, Apr 28, 2014 at 08:22:08AM -0700, bradley.d.volkin at intel.com wrote:
> From: Brad Volkin <bradley.d.volkin at intel.com>
> +/*
> + * Different command ranges have different numbers of bits for the opcode.
> + * In order to use the opcode bits, and only the opcode bits, for the hash key
> + * we should use the MI_* command opcode mask (since those commands use the
> + * fewest bits for the opcode.)
> + */
> +#define CMD_HASH_MASK STD_MI_OPCODE_MASK

This is not very convicing (but could well be correct).

#define STD_MI_OPCODE_MASK  0xFF800000
#define STD_3D_OPCODE_MASK  0xFFFF0000

So it only works if the 3D opcodes have the top 9 bits all distinct?

-- 
Damien



More information about the Intel-gfx mailing list