diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-11-15 06:32:21 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-30 17:31:33 -0500 |
commit | c1ad11fce86405c955873974f58ab305d894be78 (patch) | |
tree | b46d21b197743436b89a1cde300bff7233bfd631 /drivers/gpu/drm/i915/i915_drv.h | |
parent | 11be49eb4db24c5e971edef160afb87788cc270c (diff) |
drm/i915: Allow objects to be created with no backing pages, but stolen space
In order to accommodate objects that are not backed by struct pages, but
instead point into a contiguous region of stolen space, we need to make
various changes to avoid dereferencing obj->pages or obj->base.filp.
First introduce a marker for the stolen object, that specifies its
offset into the stolen region and implies that it has no backing pages.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 6969c722edf6..1646d036db09 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -962,6 +962,8 @@ struct drm_i915_gem_object { | |||
962 | 962 | ||
963 | /** Current space allocated to this object in the GTT, if any. */ | 963 | /** Current space allocated to this object in the GTT, if any. */ |
964 | struct drm_mm_node *gtt_space; | 964 | struct drm_mm_node *gtt_space; |
965 | /** Stolen memory for this object, instead of being backed by shmem. */ | ||
966 | struct drm_mm_node *stolen; | ||
965 | struct list_head gtt_list; | 967 | struct list_head gtt_list; |
966 | 968 | ||
967 | /** This object's place on the active/inactive lists */ | 969 | /** This object's place on the active/inactive lists */ |