[Intel-gfx] [PATCH v8 6/6] drm/i915: expose rcs topology through query uAPI

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Thu Jan 18 13:27:55 UTC 2018


On 18/01/2018 13:04, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-01-18 12:46:55)
>>
>> On 17/01/2018 15:39, Lionel Landwerlin wrote:
>>> +
>>> +     if (query_item->length == 0)
>>> +             return total_length;
>>> +
>>> +     if (query_item->length < total_length)
>>> +             return -EINVAL;
>>
>> Did we talk about whether this check should be != or < yet? != would
>> sound safer to me, or you want to allow extending the queries in the
>> future and keeping the same id?
> 
> This is me, because I like read(buf, len) style behaviour that lets me
> pass in a preallocated buffer that should be big enough without having
> to worry and do a 2-pass approach to find out the length of the buffer
> to allocate first. '!=' style I have found much more painful to handle in
> userspace.

Yeah that's fine by me. Doesn't preclude kernel returning you some new 
fields you don't know about either.

Regards,

Tvrtko


More information about the Intel-gfx mailing list