[Intel-gfx] [RFC v3] drm/i915: Select engines via class and instance in execbuffer2

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Wed May 24 11:28:07 UTC 2017


On 18/05/2017 18:00, Chris Wilson wrote:
> On Thu, May 18, 2017 at 05:20:38PM +0100, Tvrtko Ursulin wrote:
>>
>> On 18/05/2017 14:37, Chris Wilson wrote:
>>> On Thu, May 18, 2017 at 02:06:35PM +0100, Tvrtko Ursulin wrote:
>>>>
>>>> But this problem in general can also be solved separately from
>>>> class-instance addressing via engine feature masking.
>>>
>>> But imo all members of a class should have the same features. That would
>>> be my definition of a class!
>>
>> That sounds very totalitarian! :)) To me a class is a group of some
>> entities which share some common characteristics - not necessarily
>> completely uniform.
>
> The problem otherwise is that we then have to define yet another
> interface based on features. To me that sounds like too much
> duplication, that we could avoid from the beginning. Curse the hw for
> being asymmetical!

Hm I don't see a problem with the feature base engine selection on top. 
You still do because of the desire classes were equal in features?

To sum up what I (and we) talked about in various parts of the thread(s):

Step 1a: New execbuf engine selection uAPI.

  - execbuf class=VCS instance=1

Step 1b: Engine discovery uAPI.

Same as above but userpace can figure out how many VCS engines there
are without PCI probing.

I didn't get much feedback on this one. :(

Step 2: Feature masks for execbuf.

  - execbuf class=VCS instance=0 features=HEVC = OK
  - execbuf class=VCS instance=1 features=HEVC = FAIL

But userspace can use engine discovery to figure out which are the valid 
combinations.

This could be a simpler, but less featureful and not very elegant 
alternative to step 2.

Otherwise just a prep step for the subsequent steps below.

Step 3a: (One day maybe) userspace selects a class, i915 picks the engine

  - execbuf class=VCS instance=any

Step 3b: userspace selected class and features

  - execbuf class=VCS instance=any features=HEVC

This RFC proposed steps 1a and 1b. The rest we leave for later.

How does that sound? Acceptable?

In case of engine discovery useful enough or what other features could 
we put it in to make it more useful for userspace? Potentially enable 
dropping PCI id probing altogether and enable libva/mesa/??? to probe 
everything using i915 ioctls.

Regards,

Tvrtko


More information about the Intel-gfx mailing list