Re: [PATCH] drm/i915: Engine discovery query

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

 




On 01/10/2018 20:39, Chris Wilson wrote:
Quoting Tvrtko Ursulin (2018-10-01 17:41:00)

On 01/10/2018 17:24, Chris Wilson wrote:
Quoting Tvrtko Ursulin (2018-10-01 17:15:24)
+       len = sizeof(struct drm_i915_query_engine_info) +
+             I915_NUM_ENGINES * sizeof(struct drm_i915_engine_info);

Since I915_NUM_ENGINES is not ABI, and this will be using a 2-step
query (1st to find length, 2nd to grab details), it should work with
info->num_rings. If not, we have problems later ;)

I don't follow, what do you plan to enumerate that would cause a problem?

All I'm suggesting is to avoid any notion that this length is fixed
indefinitely :)

You mean extra paranoid step of making sure reported len exactly matches the number of reported engines * sizeof(engine_info)? uAPI is defined to query required memory block size and then read the reported num_engines so I think that's fine, but sure, I can make it match exactly.

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux