Re: [PATCH v8 6/6] drm/i915: expose rcs topology through query uAPI

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

 




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
_______________________________________________
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