diff options
author | Tvrtko Ursulin | 2014-10-24 13:42:33 +0200 |
---|---|---|
committer | Daniel Vetter | 2014-11-04 14:04:51 +0100 |
commit | aff437667b93c3d65576b02628885687c72e1b3b (patch) | |
tree | 56c324716e3a20f6c2f9357bd92bf6367cedea74 /drivers/gpu/drm/i915/i915_gem_gtt.h | |
parent | Merge tag 'drm-intel-next-2014-10-24' of git://anongit.freedesktop.org/drm-in... (diff) | |
download | kernel-qcow2-linux-aff437667b93c3d65576b02628885687c72e1b3b.tar.gz kernel-qcow2-linux-aff437667b93c3d65576b02628885687c72e1b3b.tar.xz kernel-qcow2-linux-aff437667b93c3d65576b02628885687c72e1b3b.zip |
drm/i915: Move flags describing VMA mappings into the VMA
If these flags are on the object level it will be more difficult to allow
for multiple VMAs per object.
v2: Simplification and cleanup after code review comments (Chris Wilson).
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_gtt.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_gtt.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h index d5c14af51e99..d0562d0ef6ec 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.h +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h @@ -123,6 +123,12 @@ struct i915_vma { struct drm_i915_gem_object *obj; struct i915_address_space *vm; + /** Flags and address space this VMA is bound to */ +#define GLOBAL_BIND (1<<0) +#define LOCAL_BIND (1<<1) +#define PTE_READ_ONLY (1<<2) + unsigned int bound : 4; + /** This object's place on the active/inactive lists */ struct list_head mm_list; @@ -155,8 +161,6 @@ struct i915_vma { * setting the valid PTE entries to a reserved scratch page. */ void (*unbind_vma)(struct i915_vma *vma); /* Map an object into an address space with the given cache flags. */ -#define GLOBAL_BIND (1<<0) -#define PTE_READ_ONLY (1<<1) void (*bind_vma)(struct i915_vma *vma, enum i915_cache_level cache_level, u32 flags); |