[Intel-gfx] [PATCH] drm/i915: Don't use enums for hardware engine id

Michal Wajdeczko michal.wajdeczko at intel.com
Tue Feb 28 18:07:38 UTC 2017


On Tue, Feb 28, 2017 at 04:52:34PM +0000, Chris Wilson wrote:
> On Tue, Feb 28, 2017 at 04:43:02PM +0000, Chris Wilson wrote:
> > On Tue, Feb 28, 2017 at 02:12:09PM +0000, Michal Wajdeczko wrote:
> > > +/* Hardware Engine ID definitions */
> > > +#define RCS_HW		0
> > > +#define VCS_HW		1
> > > +#define BCS_HW		2
> > > +#define VECS_HW		3
> > > +#define VCS2_HW		4
> > 
> > So don't put them in the header if they may have inconsistent meanings.
> 
> Or if you do want to keep them in a header, either i915_reg.h or
> intel_engine_reg.h as somewhere out of the way, and clear that they are
> not meant for the rest of the bookkeeping in intel_ringbuffer.h.

I can't find nice spot for these engine IDs in the i915_reg.h

Can I just move these definitions to the top of this header?

There are already some comments/defs that refer to the Bspec,
so it should be clear that they are not the same as enums from
intel_engine_id.

-Michal



More information about the Intel-gfx mailing list