diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.h | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index a0bc7a8222b4..ce6cc2a6cf7a 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h | |||
@@ -300,24 +300,44 @@ struct intel_engine_execlists { | |||
300 | struct rb_node *first; | 300 | struct rb_node *first; |
301 | 301 | ||
302 | /** | 302 | /** |
303 | * @fw_domains: forcewake domains for irq tasklet | 303 | * @csb_read: control register for Context Switch buffer |
304 | * | ||
305 | * Note this register is always in mmio. | ||
304 | */ | 306 | */ |
305 | unsigned int fw_domains; | 307 | u32 __iomem *csb_read; |
306 | 308 | ||
307 | /** | 309 | /** |
308 | * @csb_head: context status buffer head | 310 | * @csb_write: control register for Context Switch buffer |
311 | * | ||
312 | * Note this register may be either mmio or HWSP shadow. | ||
309 | */ | 313 | */ |
310 | unsigned int csb_head; | 314 | u32 *csb_write; |
311 | 315 | ||
312 | /** | 316 | /** |
313 | * @csb_use_mmio: access csb through mmio, instead of hwsp | 317 | * @csb_status: status array for Context Switch buffer |
318 | * | ||
319 | * Note these register may be either mmio or HWSP shadow. | ||
314 | */ | 320 | */ |
315 | bool csb_use_mmio; | 321 | u32 *csb_status; |
316 | 322 | ||
317 | /** | 323 | /** |
318 | * @preempt_complete_status: expected CSB upon completing preemption | 324 | * @preempt_complete_status: expected CSB upon completing preemption |
319 | */ | 325 | */ |
320 | u32 preempt_complete_status; | 326 | u32 preempt_complete_status; |
327 | |||
328 | /** | ||
329 | * @csb_write_reset: reset value for CSB write pointer | ||
330 | * | ||
331 | * As the CSB write pointer maybe either in HWSP or as a field | ||
332 | * inside an mmio register, we want to reprogram it slightly | ||
333 | * differently to avoid later confusion. | ||
334 | */ | ||
335 | u32 csb_write_reset; | ||
336 | |||
337 | /** | ||
338 | * @csb_head: context status buffer head | ||
339 | */ | ||
340 | u8 csb_head; | ||
321 | }; | 341 | }; |
322 | 342 | ||
323 | #define INTEL_ENGINE_CS_MAX_NAME 8 | 343 | #define INTEL_ENGINE_CS_MAX_NAME 8 |
@@ -345,10 +365,8 @@ struct intel_engine_cs { | |||
345 | struct drm_i915_gem_object *default_state; | 365 | struct drm_i915_gem_object *default_state; |
346 | void *pinned_default_state; | 366 | void *pinned_default_state; |
347 | 367 | ||
348 | atomic_t irq_count; | ||
349 | unsigned long irq_posted; | 368 | unsigned long irq_posted; |
350 | #define ENGINE_IRQ_BREADCRUMB 0 | 369 | #define ENGINE_IRQ_BREADCRUMB 0 |
351 | #define ENGINE_IRQ_EXECLIST 1 | ||
352 | 370 | ||
353 | /* Rather than have every client wait upon all user interrupts, | 371 | /* Rather than have every client wait upon all user interrupts, |
354 | * with the herd waking after every interrupt and each doing the | 372 | * with the herd waking after every interrupt and each doing the |
@@ -380,6 +398,7 @@ struct intel_engine_cs { | |||
380 | 398 | ||
381 | unsigned int hangcheck_interrupts; | 399 | unsigned int hangcheck_interrupts; |
382 | unsigned int irq_enabled; | 400 | unsigned int irq_enabled; |
401 | unsigned int irq_count; | ||
383 | 402 | ||
384 | bool irq_armed : 1; | 403 | bool irq_armed : 1; |
385 | I915_SELFTEST_DECLARE(bool mock : 1); | 404 | I915_SELFTEST_DECLARE(bool mock : 1); |
@@ -928,11 +947,10 @@ static inline u32 intel_hws_preempt_done_address(struct intel_engine_cs *engine) | |||
928 | /* intel_breadcrumbs.c -- user interrupt bottom-half for waiters */ | 947 | /* intel_breadcrumbs.c -- user interrupt bottom-half for waiters */ |
929 | int intel_engine_init_breadcrumbs(struct intel_engine_cs *engine); | 948 | int intel_engine_init_breadcrumbs(struct intel_engine_cs *engine); |
930 | 949 | ||
931 | static inline void intel_wait_init(struct intel_wait *wait, | 950 | static inline void intel_wait_init(struct intel_wait *wait) |
932 | struct i915_request *rq) | ||
933 | { | 951 | { |
934 | wait->tsk = current; | 952 | wait->tsk = current; |
935 | wait->request = rq; | 953 | wait->request = NULL; |
936 | } | 954 | } |
937 | 955 | ||
938 | static inline void intel_wait_init_for_seqno(struct intel_wait *wait, u32 seqno) | 956 | static inline void intel_wait_init_for_seqno(struct intel_wait *wait, u32 seqno) |