[igt-dev] [PATCH v19 1/6] include/drm-uapi: import i915_drm.h header file
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Tue Apr 9 07:33:56 UTC 2019
On 08/04/2019 19:33, Antonio Argenziano wrote:
> On 08/04/19 09:56, Tvrtko Ursulin wrote:
>>
>> On 08/04/2019 17:47, Andi Shyti wrote:
>>> Hi Tvrtko,
>>>
>>>>> This header file is imported in order to include the two new
>>>>> ioctls DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM,
>>>>> DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM and DRM_IOCTL_I915_QUERY.
>>>>>
>>>>> Signed-off-by: Andi Shyti <andi.shyti at intel.com>
>>>>> ---
>>>>> include/drm-uapi/i915_drm.h | 361
>>>>> ++++++++++++++++++++++++++++++------
>>>>> 1 file changed, 304 insertions(+), 57 deletions(-)
>>>>>
>>>>> diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h
>>>>> index 4ae1c6ff6ae6..2bbad08eb9d2 100644
>>>>> --- a/include/drm-uapi/i915_drm.h
>>>>> +++ b/include/drm-uapi/i915_drm.h
>>>>> @@ -62,6 +62,26 @@ extern "C" {
>>>>> #define I915_ERROR_UEVENT "ERROR"
>>>>> #define I915_RESET_UEVENT "RESET"
>>>>> +/*
>>>>> + * i915_user_extension: Base class for defining a chain of extensions
>>>>> + *
>>>>> + * Many interfaces need to grow over time. In most cases we can
>>>>> simply
>>>>> + * extend the struct and have userspace pass in more data. Another
>>>>> option,
>>>>> + * as demonstrated by Vulkan's approach to providing extensions
>>>>> for forward
>>>>> + * and backward compatibility, is to use a list of optional
>>>>> structs to
>>>>> + * provide those extra details.
>>>>> + *
>>>>> + * The key advantage to using an extension chain is that it allows
>>>>> us to
>>>>> + * redefine the interface more easily than an ever growing struct of
>>>>> + * increasing complexity, and for large parts of that interface to be
>>>>> + * entirely optional. The downside is more pointer chasing;
>>>>> chasing across
>>>>> + * the boundary with pointers encapsulated inside u64.
>>>>> + */
>>>>> +struct i915_user_extension {
>>>>> + __u64 next_extension;
>>>>> + __u64 name;
>>>>> +};
>>>>
>>>> Just a note to not merge this version since my branch has accidentally
>>>> diverged from latest drm-tip in this respect.
>>>
>>> yes, it slipped off my mind. Do you have any plans to rebase your
>>> branch? I would send the patches today.
>>
>> I do have plans but I won't make it today. Will let you know.
>
> Are we saying to merge the header file from a private branch? if that is
Certainly not! :) Just making the delta, between the tree Andi uses to
develop this and what will one day become upstream, smaller.
> the case, can we have 'LOCAL_' definitions of the IOCTLs you are trying
> to import. It might get messy in case the private and public version
> diverge again. If that is not the case, ignore me ;).
LOCAL_ approach would be annoying in this case since we have many tests
and tools piled up for media scalability and uAPI still keeps getting
tweaks.
Regards,
Tvrtko
More information about the igt-dev
mailing list