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

Emil Velikov emil.l.velikov at gmail.com
Thu May 18 14:10:36 UTC 2017


Hi Tvrtko,

On 18 May 2017 at 14:06, Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com> wrote:

> struct drm_i915_engine_info {
>         /** Engine instance number. */
>         __u32   instance;
>         __u32   rsvd;
>
>         /** Engine specific features and info. */
> #define DRM_I915_ENGINE_HAS_HEVC        BIT(0)
>         __u8 features;
>         __u8 rsvd;
>
>         __32 info;
> };
>
To spare yourself from writing a compat ioctl, you want to have the
members at the same offset on both 32 and 64bit builds.
At the same times the whole struct size should be multiple of 64bit.

This and a few others are covered in Daniel Vetter's "Botching up ioctls" [1]

-Emil

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ioctl/botching-up-ioctls.txt


More information about the Intel-gfx mailing list