diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-04-14 11:35:12 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-04-20 11:54:29 -0400 |
commit | 777dc5bb26a5aff916af1b6ee84ed7dc8cac1245 (patch) | |
tree | 53a904de010d5d2091c4628ec04bdcdca63271a9 /drivers/gpu/drm/i915/i915_gem_gtt.h | |
parent | c7e16f22e83775de96bf7585682d2e7be7f1c1dc (diff) |
drm/i915: Move vma vfuns to adddress_space
They change with the address space and not with each vma, so move them
into the right pile of vfuncs. Save 2 pointers per vma and clarifies
the code.
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_gtt.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_gtt.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h index 29de64d1164e..12d0ded0d823 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.h +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h | |||
@@ -196,14 +196,6 @@ struct i915_vma { | |||
196 | * bits with absolutely no headroom. So use 4 bits. */ | 196 | * bits with absolutely no headroom. So use 4 bits. */ |
197 | unsigned int pin_count:4; | 197 | unsigned int pin_count:4; |
198 | #define DRM_I915_GEM_OBJECT_MAX_PIN_COUNT 0xf | 198 | #define DRM_I915_GEM_OBJECT_MAX_PIN_COUNT 0xf |
199 | |||
200 | /** Unmap an object from an address space. This usually consists of | ||
201 | * setting the valid PTE entries to a reserved scratch page. */ | ||
202 | void (*unbind_vma)(struct i915_vma *vma); | ||
203 | /* Map an object into an address space with the given cache flags. */ | ||
204 | void (*bind_vma)(struct i915_vma *vma, | ||
205 | enum i915_cache_level cache_level, | ||
206 | u32 flags); | ||
207 | }; | 199 | }; |
208 | 200 | ||
209 | struct i915_page_table { | 201 | struct i915_page_table { |
@@ -281,6 +273,13 @@ struct i915_address_space { | |||
281 | uint64_t start, | 273 | uint64_t start, |
282 | enum i915_cache_level cache_level, u32 flags); | 274 | enum i915_cache_level cache_level, u32 flags); |
283 | void (*cleanup)(struct i915_address_space *vm); | 275 | void (*cleanup)(struct i915_address_space *vm); |
276 | /** Unmap an object from an address space. This usually consists of | ||
277 | * setting the valid PTE entries to a reserved scratch page. */ | ||
278 | void (*unbind_vma)(struct i915_vma *vma); | ||
279 | /* Map an object into an address space with the given cache flags. */ | ||
280 | void (*bind_vma)(struct i915_vma *vma, | ||
281 | enum i915_cache_level cache_level, | ||
282 | u32 flags); | ||
284 | }; | 283 | }; |
285 | 284 | ||
286 | /* The Graphics Translation Table is the way in which GEN hardware translates a | 285 | /* The Graphics Translation Table is the way in which GEN hardware translates a |