[Intel-gfx] [PATCH 4/9] drm/i915: Support for creating Stolen memory backed objects
Ankitprasad Sharma
ankitprasad.r.sharma at intel.com
Mon Dec 14 22:10:34 PST 2015
On Mon, 2015-12-14 at 10:05 +0000, Chris Wilson wrote:
> > diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> > index d727b49..ebce8c9 100644
> > --- a/include/uapi/drm/i915_drm.h
> > +++ b/include/uapi/drm/i915_drm.h
> > @@ -357,6 +357,7 @@ typedef struct drm_i915_irq_wait {
> > #define I915_PARAM_HAS_GPU_RESET 35
> > #define I915_PARAM_HAS_RESOURCE_STREAMER 36
> > #define I915_PARAM_HAS_EXEC_SOFTPIN 37
> > +#define I915_PARAM_CREATE_VERSION 38
> >
> > typedef struct drm_i915_getparam {
> > __s32 param;
> > @@ -456,6 +457,21 @@ struct drm_i915_gem_create {
> > */
> > __u32 handle;
> > __u32 pad;
> > + /**
> > + * Requested flags (currently used for placement
> > + * (which memory domain))
> > + *
> > + * You can request that the object be created from special memory
> > + * rather than regular system pages using this parameter. Such
> > + * irregular objects may have certain restrictions (such as CPU
> > + * access to a stolen object is verboten).
> > + *
> > + * This can be used in the future for other purposes too
> > + * e.g. specifying tiling/caching/madvise
> > + */
> > + __u32 flags;
> > +#define I915_CREATE_PLACEMENT_STOLEN (1<<0) /* Cannot use CPU mmaps */
> > +#define __I915_CREATE_UNKNOWN_FLAGS -(I915_CREATE_PLACEMENT_STOLEN << 1)
>
> Alignment. sizeof(drm_i915_gem_create) must be aligned to u64 since we
> contain u64 (to keep ABI compat for 32bit).
> -Chris
Sure, will update __u32 flags to __64 flags
Thanks,
Ankit
>
More information about the Intel-gfx
mailing list