Rev 4104 | Rev 5060 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4104 | Rev 4560 | ||
---|---|---|---|
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 | ||
35 | 36 | enum intel_ring_hangcheck_action { |
|
36 | enum intel_ring_hangcheck_action { |
37 | HANGCHECK_IDLE = 0, |
37 | HANGCHECK_WAIT, |
38 | HANGCHECK_WAIT, |
38 | HANGCHECK_ACTIVE, |
39 | HANGCHECK_ACTIVE, |
39 | HANGCHECK_KICK, |
40 | HANGCHECK_KICK, |
Line 138... | Line 139... | ||
138 | struct list_head request_list; |
139 | struct list_head request_list; |
Line 139... | Line 140... | ||
139 | 140 | ||
140 | /** |
141 | /** |
141 | * Do we have some not yet emitted requests outstanding? |
142 | * Do we have some not yet emitted requests outstanding? |
- | 143 | */ |
|
142 | */ |
144 | struct drm_i915_gem_request *preallocated_lazy_request; |
143 | u32 outstanding_lazy_request; |
145 | u32 outstanding_lazy_seqno; |
144 | bool gpu_caches_dirty; |
146 | bool gpu_caches_dirty; |
Line 145... | Line 147... | ||
145 | bool fbc_dirty; |
147 | bool fbc_dirty; |
Line 235... | Line 237... | ||
235 | u32 data) |
237 | u32 data) |
236 | { |
238 | { |
237 | iowrite32(data, ring->virtual_start + ring->tail); |
239 | iowrite32(data, ring->virtual_start + ring->tail); |
238 | ring->tail += 4; |
240 | ring->tail += 4; |
239 | } |
241 | } |
- | 242 | static inline void intel_ring_advance(struct intel_ring_buffer *ring) |
|
- | 243 | { |
|
- | 244 | ring->tail &= ring->size - 1; |
|
- | 245 | } |
|
240 | void intel_ring_advance(struct intel_ring_buffer *ring); |
246 | void __intel_ring_advance(struct intel_ring_buffer *ring); |
- | 247 | ||
241 | int __must_check intel_ring_idle(struct intel_ring_buffer *ring); |
248 | int __must_check intel_ring_idle(struct intel_ring_buffer *ring); |
242 | void intel_ring_init_seqno(struct intel_ring_buffer *ring, u32 seqno); |
249 | void intel_ring_init_seqno(struct intel_ring_buffer *ring, u32 seqno); |
243 | int intel_ring_flush_all_caches(struct intel_ring_buffer *ring); |
250 | int intel_ring_flush_all_caches(struct intel_ring_buffer *ring); |
244 | int intel_ring_invalidate_all_caches(struct intel_ring_buffer *ring); |
251 | int intel_ring_invalidate_all_caches(struct intel_ring_buffer *ring); |
Line 256... | Line 263... | ||
256 | return ring->tail; |
263 | return ring->tail; |
257 | } |
264 | } |
Line 258... | Line 265... | ||
258 | 265 | ||
259 | static inline u32 intel_ring_get_seqno(struct intel_ring_buffer *ring) |
266 | static inline u32 intel_ring_get_seqno(struct intel_ring_buffer *ring) |
260 | { |
267 | { |
261 | BUG_ON(ring->outstanding_lazy_request == 0); |
268 | BUG_ON(ring->outstanding_lazy_seqno == 0); |
262 | return ring->outstanding_lazy_request; |
269 | return ring->outstanding_lazy_seqno; |
Line 263... | Line 270... | ||
263 | } |
270 | } |
264 | 271 | ||
265 | static inline void i915_trace_irq_get(struct intel_ring_buffer *ring, u32 seqno) |
272 | static inline void i915_trace_irq_get(struct intel_ring_buffer *ring, u32 seqno) |