diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-11-12 08:53:37 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-11-24 08:30:52 -0500 |
commit | caea7476d48e5f401f2d18b1738827748fb56c12 (patch) | |
tree | 583a60d043ef7c6676499349ad74491e47ce565a /drivers/gpu/drm/i915/i915_drv.h | |
parent | a7a09aebe8c0dd2b76c7b97018a9c614ddb483a5 (diff) |
drm/i915: More accurately track last fence usage by the GPU
Based on a patch by Daniel Vetter.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 42d3e901619d..ee7df1d2b8c8 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -124,9 +124,8 @@ struct drm_i915_master_private { | |||
124 | #define I915_FENCE_REG_NONE -1 | 124 | #define I915_FENCE_REG_NONE -1 |
125 | 125 | ||
126 | struct drm_i915_fence_reg { | 126 | struct drm_i915_fence_reg { |
127 | struct drm_i915_gem_object *obj; | ||
128 | struct list_head lru_list; | 127 | struct list_head lru_list; |
129 | bool gpu; | 128 | struct drm_i915_gem_object *obj; |
130 | }; | 129 | }; |
131 | 130 | ||
132 | struct sdvo_device_mapping { | 131 | struct sdvo_device_mapping { |
@@ -787,6 +786,12 @@ struct drm_i915_gem_object { | |||
787 | unsigned int fault_mappable : 1; | 786 | unsigned int fault_mappable : 1; |
788 | unsigned int pin_mappable : 1; | 787 | unsigned int pin_mappable : 1; |
789 | 788 | ||
789 | /* | ||
790 | * Is the GPU currently using a fence to access this buffer, | ||
791 | */ | ||
792 | unsigned int pending_fenced_gpu_access:1; | ||
793 | unsigned int fenced_gpu_access:1; | ||
794 | |||
790 | struct page **pages; | 795 | struct page **pages; |
791 | 796 | ||
792 | /** | 797 | /** |
@@ -802,11 +807,13 @@ struct drm_i915_gem_object { | |||
802 | */ | 807 | */ |
803 | uint32_t gtt_offset; | 808 | uint32_t gtt_offset; |
804 | 809 | ||
805 | /* Which ring is refering to is this object */ | ||
806 | struct intel_ring_buffer *ring; | ||
807 | |||
808 | /** Breadcrumb of last rendering to the buffer. */ | 810 | /** Breadcrumb of last rendering to the buffer. */ |
809 | uint32_t last_rendering_seqno; | 811 | uint32_t last_rendering_seqno; |
812 | struct intel_ring_buffer *ring; | ||
813 | |||
814 | /** Breadcrumb of last fenced GPU access to the buffer. */ | ||
815 | uint32_t last_fenced_seqno; | ||
816 | struct intel_ring_buffer *last_fenced_ring; | ||
810 | 817 | ||
811 | /** Current tiling stride for the object, if it's tiled. */ | 818 | /** Current tiling stride for the object, if it's tiled. */ |
812 | uint32_t stride; | 819 | uint32_t stride; |