Rev 6084 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6084 | Rev 6937 | ||
---|---|---|---|
Line 98... | Line 98... | ||
98 | struct intel_ringbuffer { |
98 | struct intel_ringbuffer { |
99 | struct drm_i915_gem_object *obj; |
99 | struct drm_i915_gem_object *obj; |
100 | void __iomem *virtual_start; |
100 | void __iomem *virtual_start; |
Line 101... | Line 101... | ||
101 | 101 | ||
- | 102 | struct intel_engine_cs *ring; |
|
Line 102... | Line 103... | ||
102 | struct intel_engine_cs *ring; |
103 | struct list_head link; |
103 | 104 | ||
104 | u32 head; |
105 | u32 head; |
105 | u32 tail; |
106 | u32 tail; |
Line 155... | Line 156... | ||
155 | #define I915_NUM_RINGS 5 |
156 | #define I915_NUM_RINGS 5 |
156 | #define LAST_USER_RING (VECS + 1) |
157 | #define LAST_USER_RING (VECS + 1) |
157 | u32 mmio_base; |
158 | u32 mmio_base; |
158 | struct drm_device *dev; |
159 | struct drm_device *dev; |
159 | struct intel_ringbuffer *buffer; |
160 | struct intel_ringbuffer *buffer; |
- | 161 | struct list_head buffers; |
|
Line 160... | Line 162... | ||
160 | 162 | ||
161 | /* |
163 | /* |
162 | * A pool of objects to use as shadow copies of client batch buffers |
164 | * A pool of objects to use as shadow copies of client batch buffers |
163 | * when the command parser is enabled. Prevents the client from |
165 | * when the command parser is enabled. Prevents the client from |
Line 245... | Line 247... | ||
245 | union { |
247 | union { |
246 | struct { |
248 | struct { |
247 | /* our mbox written by others */ |
249 | /* our mbox written by others */ |
248 | u32 wait[I915_NUM_RINGS]; |
250 | u32 wait[I915_NUM_RINGS]; |
249 | /* mboxes this ring signals to */ |
251 | /* mboxes this ring signals to */ |
250 | u32 signal[I915_NUM_RINGS]; |
252 | i915_reg_t signal[I915_NUM_RINGS]; |
251 | } mbox; |
253 | } mbox; |
252 | u64 signal_ggtt[I915_NUM_RINGS]; |
254 | u64 signal_ggtt[I915_NUM_RINGS]; |
253 | }; |
255 | }; |
Line 254... | Line 256... | ||
254 | 256 | ||
Line 346... | Line 348... | ||
346 | * to encode the command length in the header). |
348 | * to encode the command length in the header). |
347 | */ |
349 | */ |
348 | u32 (*get_cmd_length_mask)(u32 cmd_header); |
350 | u32 (*get_cmd_length_mask)(u32 cmd_header); |
349 | }; |
351 | }; |
Line -... | Line 352... | ||
- | 352 | ||
350 | 353 | static inline bool |
|
- | 354 | intel_ring_initialized(struct intel_engine_cs *ring) |
|
- | 355 | { |
|
- | 356 | return ring->dev != NULL; |
|
Line 351... | Line 357... | ||
351 | bool intel_ring_initialized(struct intel_engine_cs *ring); |
357 | } |
352 | 358 | ||
353 | static inline unsigned |
359 | static inline unsigned |
354 | intel_ring_flag(struct intel_engine_cs *ring) |
360 | intel_ring_flag(struct intel_engine_cs *ring) |
Line 439... | Line 445... | ||
439 | { |
445 | { |
440 | struct intel_ringbuffer *ringbuf = ring->buffer; |
446 | struct intel_ringbuffer *ringbuf = ring->buffer; |
441 | iowrite32(data, ringbuf->virtual_start + ringbuf->tail); |
447 | iowrite32(data, ringbuf->virtual_start + ringbuf->tail); |
442 | ringbuf->tail += 4; |
448 | ringbuf->tail += 4; |
443 | } |
449 | } |
- | 450 | static inline void intel_ring_emit_reg(struct intel_engine_cs *ring, |
|
- | 451 | i915_reg_t reg) |
|
- | 452 | { |
|
- | 453 | intel_ring_emit(ring, i915_mmio_reg_offset(reg)); |
|
- | 454 | } |
|
444 | static inline void intel_ring_advance(struct intel_engine_cs *ring) |
455 | static inline void intel_ring_advance(struct intel_engine_cs *ring) |
445 | { |
456 | { |
446 | struct intel_ringbuffer *ringbuf = ring->buffer; |
457 | struct intel_ringbuffer *ringbuf = ring->buffer; |
447 | ringbuf->tail &= ringbuf->size - 1; |
458 | ringbuf->tail &= ringbuf->size - 1; |
448 | } |
459 | } |