Re: [PATCH v5 2/9] drm/i915: Define an engine class enum for the uABI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Lionel Landwerlin (2017-11-09 09:13:03)
> On 08/11/17 19:14, Chris Wilson wrote:
> >   
> > +/*
> > + * Different engines serve different roles, and there may be more than one
> > + * engine serving each role. enum drm_i915_gem_engine_class provides a
> > + * classification of the role of the engine, which may be used when requesting
> > + * operations to be performed on a certain subset of engines, or for providing
> > + * information about that group.
> > + */
> > +enum drm_i915_gem_engine_class {
> > +     I915_ENGINE_CLASS_OTHER = 0,
> > +     I915_ENGINE_CLASS_RENDER = 1,
> > +     I915_ENGINE_CLASS_COPY = 2,
> > +     I915_ENGINE_CLASS_VIDEO = 3,
> > +     I915_ENGINE_CLASS_VIDEO_ENHANCE = 4,
> > +};
> > +
> I've tried to build a bit UI in GPUTop to show this.
> I'm a bit skeptical about the OTHER type because if this enum is meant 
> to be extended, then why do we need an OTHER class? We should create new 
> classes instead.

Whilst OTHER is certainly a question of "why not add a define for the
new class", my 2c is that we do want an explicit INVALID enum. It
doesn't have to 0, -1 will work just fine as well, but there will be a
time either in userspace or in reporting from the kernel where we will
need to store an invalid value that is guaranteed not to map onto a real
class.

So I915_ENGINE_CLASS_INVALID = -1 ?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux