[Intel-gfx] [PATCH] drm/i915: Document the split in internal and public execbuf flags
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Thu Sep 21 11:09:44 UTC 2017
On 21/09/2017 12:01, Chris Wilson wrote:
> Since we reuse the same field for the user passing in their control
> flags, and for the kernel to track a couple of bits of state, document
> and check that those do not overlap.
>
> Suggested-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index e962a0111b5e..163d71c9abdb 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -58,6 +58,7 @@ enum {
>
> #define __EXEC_HAS_RELOC BIT(31)
> #define __EXEC_VALIDATED BIT(30)
> +#define __EXEC_INTERNAL_FLAGS (~0u << 30)
> #define UPDATE PIN_OFFSET_FIXED
>
> #define BATCH_OFFSET_BIAS (256*1024)
> @@ -2185,6 +2186,7 @@ i915_gem_do_execbuffer(struct drm_device *dev,
> int out_fence_fd = -1;
> int err;
>
> + BUILD_BUG_ON(__EXEC_INTERNAL_FLAGS & ~__I915_EXEC_ILLEGAL_FLAGS);
> BUILD_BUG_ON(__EXEC_OBJECT_INTERNAL_FLAGS &
> ~__EXEC_OBJECT_UNKNOWN_FLAGS);
>
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Regards,
Tvrtko
More information about the Intel-gfx
mailing list