From: Damien Lespiau Subject: Re: [PATCH] drm/i915: Use hash tables for the command parser Date: Thu, 8 May 2014 14:05:07 +0100 Message-ID: <20140508130507.GB22477@strange.amr.corp.intel.com> References: <1398698528-25256-1-git-send-email-bradley.d.volkin@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id C46CF6EE1A for ; Thu, 8 May 2014 06:06:02 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1398698528-25256-1-git-send-email-bradley.d.volkin@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: bradley.d.volkin@intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Apr 28, 2014 at 08:22:08AM -0700, bradley.d.volkin@intel.com wrote: > From: Brad Volkin > +/* > + * 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