Rev 3480 | Rev 4560 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3480 | Rev 4104 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | #define I915_WRITE_CTL(ring, val) I915_WRITE(RING_CTL((ring)->mmio_base), val) |
31 | #define I915_WRITE_CTL(ring, val) I915_WRITE(RING_CTL((ring)->mmio_base), val) |
Line 32... | Line 32... | ||
32 | 32 | ||
33 | #define I915_READ_IMR(ring) I915_READ(RING_IMR((ring)->mmio_base)) |
33 | #define I915_READ_IMR(ring) I915_READ(RING_IMR((ring)->mmio_base)) |
Line 34... | Line 34... | ||
34 | #define I915_WRITE_IMR(ring, val) I915_WRITE(RING_IMR((ring)->mmio_base), val) |
34 | #define I915_WRITE_IMR(ring, val) I915_WRITE(RING_IMR((ring)->mmio_base), val) |
- | 35 | ||
- | 36 | enum intel_ring_hangcheck_action { |
|
- | 37 | HANGCHECK_WAIT, |
|
- | 38 | HANGCHECK_ACTIVE, |
|
- | 39 | HANGCHECK_KICK, |
|
- | 40 | HANGCHECK_HUNG, |
|
35 | 41 | }; |
|
- | 42 | ||
- | 43 | struct intel_ring_hangcheck { |
|
- | 44 | bool deadlock; |
|
- | 45 | u32 seqno; |
|
36 | #define I915_READ_NOPID(ring) I915_READ(RING_NOPID((ring)->mmio_base)) |
46 | u32 acthd; |
- | 47 | int score; |
|
Line 37... | Line 48... | ||
37 | #define I915_READ_SYNC_0(ring) I915_READ(RING_SYNC_0((ring)->mmio_base)) |
48 | enum intel_ring_hangcheck_action action; |
38 | #define I915_READ_SYNC_1(ring) I915_READ(RING_SYNC_1((ring)->mmio_base)) |
49 | }; |
39 | 50 | ||
40 | struct intel_ring_buffer { |
51 | struct intel_ring_buffer { |
41 | const char *name; |
52 | const char *name; |
42 | enum intel_ring_id { |
53 | enum intel_ring_id { |
- | 54 | RCS = 0x0, |
|
43 | RCS = 0x0, |
55 | VCS, |
44 | VCS, |
56 | BCS, |
45 | BCS, |
57 | VECS, |
46 | } id; |
58 | } id; |
47 | #define I915_NUM_RINGS 3 |
59 | #define I915_NUM_RINGS 4 |
48 | u32 mmio_base; |
60 | u32 mmio_base; |
Line 65... | Line 77... | ||
65 | * last_retired_head is set to -1 after the value is consumed so |
77 | * last_retired_head is set to -1 after the value is consumed so |
66 | * we can detect new retirements. |
78 | * we can detect new retirements. |
67 | */ |
79 | */ |
68 | u32 last_retired_head; |
80 | u32 last_retired_head; |
Line 69... | Line 81... | ||
69 | 81 | ||
70 | u32 irq_refcount; /* protected by dev_priv->irq_lock */ |
82 | unsigned irq_refcount; /* protected by dev_priv->irq_lock */ |
71 | u32 irq_enable_mask; /* bitmask to enable ring interrupt */ |
83 | u32 irq_enable_mask; /* bitmask to enable ring interrupt */ |
72 | u32 trace_irq_seqno; |
84 | u32 trace_irq_seqno; |
73 | u32 sync_seqno[I915_NUM_RINGS-1]; |
85 | u32 sync_seqno[I915_NUM_RINGS-1]; |
74 | bool __must_check (*irq_get)(struct intel_ring_buffer *ring); |
86 | bool __must_check (*irq_get)(struct intel_ring_buffer *ring); |
Line 100... | Line 112... | ||
100 | void (*cleanup)(struct intel_ring_buffer *ring); |
112 | void (*cleanup)(struct intel_ring_buffer *ring); |
101 | int (*sync_to)(struct intel_ring_buffer *ring, |
113 | int (*sync_to)(struct intel_ring_buffer *ring, |
102 | struct intel_ring_buffer *to, |
114 | struct intel_ring_buffer *to, |
103 | u32 seqno); |
115 | u32 seqno); |
Line 104... | Line 116... | ||
104 | 116 | ||
- | 117 | /* our mbox written by others */ |
|
105 | u32 semaphore_register[3]; /*our mbox written by others */ |
118 | u32 semaphore_register[I915_NUM_RINGS]; |
- | 119 | /* mboxes this ring signals to */ |
|
- | 120 | u32 signal_mbox[I915_NUM_RINGS]; |
|
106 | u32 signal_mbox[2]; /* mboxes this ring signals to */ |
121 | |
107 | /** |
122 | /** |
108 | * List of objects currently involved in rendering from the |
123 | * List of objects currently involved in rendering from the |
109 | * ringbuffer. |
124 | * ringbuffer. |
110 | * |
125 | * |
Line 125... | Line 140... | ||
125 | /** |
140 | /** |
126 | * Do we have some not yet emitted requests outstanding? |
141 | * Do we have some not yet emitted requests outstanding? |
127 | */ |
142 | */ |
128 | u32 outstanding_lazy_request; |
143 | u32 outstanding_lazy_request; |
129 | bool gpu_caches_dirty; |
144 | bool gpu_caches_dirty; |
- | 145 | bool fbc_dirty; |
|
Line 130... | Line 146... | ||
130 | 146 | ||
Line 131... | Line 147... | ||
131 | wait_queue_head_t irq_queue; |
147 | wait_queue_head_t irq_queue; |
132 | 148 | ||
133 | /** |
149 | /** |
134 | * Do an explicit TLB flush before MI_SET_CONTEXT |
150 | * Do an explicit TLB flush before MI_SET_CONTEXT |
135 | */ |
151 | */ |
136 | bool itlb_before_ctx_switch; |
152 | bool itlb_before_ctx_switch; |
- | 153 | struct i915_hw_context *default_context; |
|
- | 154 | struct i915_hw_context *last_context; |
|
Line -... | Line 155... | ||
- | 155 | ||
- | 156 | struct intel_ring_hangcheck hangcheck; |
|
- | 157 | ||
- | 158 | struct { |
|
137 | struct i915_hw_context *default_context; |
159 | struct drm_i915_gem_object *obj; |
138 | struct drm_i915_gem_object *last_context_obj; |
160 | u32 gtt_offset; |
Line 139... | Line 161... | ||
139 | 161 | volatile u32 *cpu_page; |
|
140 | void *private; |
162 | } scratch; |
141 | }; |
163 | }; |
Line 222... | Line 244... | ||
222 | int intel_ring_invalidate_all_caches(struct intel_ring_buffer *ring); |
244 | int intel_ring_invalidate_all_caches(struct intel_ring_buffer *ring); |
Line 223... | Line 245... | ||
223 | 245 | ||
224 | int intel_init_render_ring_buffer(struct drm_device *dev); |
246 | int intel_init_render_ring_buffer(struct drm_device *dev); |
225 | int intel_init_bsd_ring_buffer(struct drm_device *dev); |
247 | int intel_init_bsd_ring_buffer(struct drm_device *dev); |
- | 248 | int intel_init_blt_ring_buffer(struct drm_device *dev); |
|
Line 226... | Line 249... | ||
226 | int intel_init_blt_ring_buffer(struct drm_device *dev); |
249 | int intel_init_vebox_ring_buffer(struct drm_device *dev); |
227 | 250 | ||
Line 228... | Line 251... | ||
228 | u32 intel_ring_get_active_head(struct intel_ring_buffer *ring); |
251 | u32 intel_ring_get_active_head(struct intel_ring_buffer *ring); |