Commit 1823521d authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

drm/i915: Rename ring->outstanding_lazy_request

Prior to preallocating an request for lazy emission, rename the existing
field to make way (and differentiate the seqno from the request struct).
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent b315fedf
...@@ -964,7 +964,7 @@ i915_gem_check_olr(struct intel_ring_buffer *ring, u32 seqno) ...@@ -964,7 +964,7 @@ i915_gem_check_olr(struct intel_ring_buffer *ring, u32 seqno)
BUG_ON(!mutex_is_locked(&ring->dev->struct_mutex)); BUG_ON(!mutex_is_locked(&ring->dev->struct_mutex));
ret = 0; ret = 0;
if (seqno == ring->outstanding_lazy_request) if (seqno == ring->outstanding_lazy_seqno)
ret = i915_add_request(ring, NULL); ret = i915_add_request(ring, NULL);
return ret; return ret;
...@@ -2094,7 +2094,7 @@ int __i915_add_request(struct intel_ring_buffer *ring, ...@@ -2094,7 +2094,7 @@ int __i915_add_request(struct intel_ring_buffer *ring,
} }
trace_i915_gem_request_add(ring, request->seqno); trace_i915_gem_request_add(ring, request->seqno);
ring->outstanding_lazy_request = 0; ring->outstanding_lazy_seqno = 0;
if (!dev_priv->ums.mm_suspended) { if (!dev_priv->ums.mm_suspended) {
i915_queue_hangcheck(ring->dev); i915_queue_hangcheck(ring->dev);
......
...@@ -593,7 +593,7 @@ update_mboxes(struct intel_ring_buffer *ring, ...@@ -593,7 +593,7 @@ update_mboxes(struct intel_ring_buffer *ring,
#define MBOX_UPDATE_DWORDS 4 #define MBOX_UPDATE_DWORDS 4
intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1)); intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1));
intel_ring_emit(ring, mmio_offset); intel_ring_emit(ring, mmio_offset);
intel_ring_emit(ring, ring->outstanding_lazy_request); intel_ring_emit(ring, ring->outstanding_lazy_seqno);
intel_ring_emit(ring, MI_NOOP); intel_ring_emit(ring, MI_NOOP);
} }
...@@ -629,7 +629,7 @@ gen6_add_request(struct intel_ring_buffer *ring) ...@@ -629,7 +629,7 @@ gen6_add_request(struct intel_ring_buffer *ring)
intel_ring_emit(ring, MI_STORE_DWORD_INDEX); intel_ring_emit(ring, MI_STORE_DWORD_INDEX);
intel_ring_emit(ring, I915_GEM_HWS_INDEX << MI_STORE_DWORD_INDEX_SHIFT); intel_ring_emit(ring, I915_GEM_HWS_INDEX << MI_STORE_DWORD_INDEX_SHIFT);
intel_ring_emit(ring, ring->outstanding_lazy_request); intel_ring_emit(ring, ring->outstanding_lazy_seqno);
intel_ring_emit(ring, MI_USER_INTERRUPT); intel_ring_emit(ring, MI_USER_INTERRUPT);
intel_ring_advance(ring); intel_ring_advance(ring);
...@@ -723,7 +723,7 @@ pc_render_add_request(struct intel_ring_buffer *ring) ...@@ -723,7 +723,7 @@ pc_render_add_request(struct intel_ring_buffer *ring)
PIPE_CONTROL_WRITE_FLUSH | PIPE_CONTROL_WRITE_FLUSH |
PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE); PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE);
intel_ring_emit(ring, ring->scratch.gtt_offset | PIPE_CONTROL_GLOBAL_GTT); intel_ring_emit(ring, ring->scratch.gtt_offset | PIPE_CONTROL_GLOBAL_GTT);
intel_ring_emit(ring, ring->outstanding_lazy_request); intel_ring_emit(ring, ring->outstanding_lazy_seqno);
intel_ring_emit(ring, 0); intel_ring_emit(ring, 0);
PIPE_CONTROL_FLUSH(ring, scratch_addr); PIPE_CONTROL_FLUSH(ring, scratch_addr);
scratch_addr += 128; /* write to separate cachelines */ scratch_addr += 128; /* write to separate cachelines */
...@@ -742,7 +742,7 @@ pc_render_add_request(struct intel_ring_buffer *ring) ...@@ -742,7 +742,7 @@ pc_render_add_request(struct intel_ring_buffer *ring)
PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE | PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE |
PIPE_CONTROL_NOTIFY); PIPE_CONTROL_NOTIFY);
intel_ring_emit(ring, ring->scratch.gtt_offset | PIPE_CONTROL_GLOBAL_GTT); intel_ring_emit(ring, ring->scratch.gtt_offset | PIPE_CONTROL_GLOBAL_GTT);
intel_ring_emit(ring, ring->outstanding_lazy_request); intel_ring_emit(ring, ring->outstanding_lazy_seqno);
intel_ring_emit(ring, 0); intel_ring_emit(ring, 0);
intel_ring_advance(ring); intel_ring_advance(ring);
...@@ -963,7 +963,7 @@ i9xx_add_request(struct intel_ring_buffer *ring) ...@@ -963,7 +963,7 @@ i9xx_add_request(struct intel_ring_buffer *ring)
intel_ring_emit(ring, MI_STORE_DWORD_INDEX); intel_ring_emit(ring, MI_STORE_DWORD_INDEX);
intel_ring_emit(ring, I915_GEM_HWS_INDEX << MI_STORE_DWORD_INDEX_SHIFT); intel_ring_emit(ring, I915_GEM_HWS_INDEX << MI_STORE_DWORD_INDEX_SHIFT);
intel_ring_emit(ring, ring->outstanding_lazy_request); intel_ring_emit(ring, ring->outstanding_lazy_seqno);
intel_ring_emit(ring, MI_USER_INTERRUPT); intel_ring_emit(ring, MI_USER_INTERRUPT);
intel_ring_advance(ring); intel_ring_advance(ring);
...@@ -1475,7 +1475,7 @@ int intel_ring_idle(struct intel_ring_buffer *ring) ...@@ -1475,7 +1475,7 @@ int intel_ring_idle(struct intel_ring_buffer *ring)
int ret; int ret;
/* We need to add any requests required to flush the objects and ring */ /* We need to add any requests required to flush the objects and ring */
if (ring->outstanding_lazy_request) { if (ring->outstanding_lazy_seqno) {
ret = i915_add_request(ring, NULL); ret = i915_add_request(ring, NULL);
if (ret) if (ret)
return ret; return ret;
...@@ -1495,10 +1495,10 @@ int intel_ring_idle(struct intel_ring_buffer *ring) ...@@ -1495,10 +1495,10 @@ int intel_ring_idle(struct intel_ring_buffer *ring)
static int static int
intel_ring_alloc_seqno(struct intel_ring_buffer *ring) intel_ring_alloc_seqno(struct intel_ring_buffer *ring)
{ {
if (ring->outstanding_lazy_request) if (ring->outstanding_lazy_seqno)
return 0; return 0;
return i915_gem_get_seqno(ring->dev, &ring->outstanding_lazy_request); return i915_gem_get_seqno(ring->dev, &ring->outstanding_lazy_seqno);
} }
static int __intel_ring_begin(struct intel_ring_buffer *ring, static int __intel_ring_begin(struct intel_ring_buffer *ring,
...@@ -1545,7 +1545,7 @@ void intel_ring_init_seqno(struct intel_ring_buffer *ring, u32 seqno) ...@@ -1545,7 +1545,7 @@ void intel_ring_init_seqno(struct intel_ring_buffer *ring, u32 seqno)
{ {
struct drm_i915_private *dev_priv = ring->dev->dev_private; struct drm_i915_private *dev_priv = ring->dev->dev_private;
BUG_ON(ring->outstanding_lazy_request); BUG_ON(ring->outstanding_lazy_seqno);
if (INTEL_INFO(ring->dev)->gen >= 6) { if (INTEL_INFO(ring->dev)->gen >= 6) {
I915_WRITE(RING_SYNC_0(ring->mmio_base), 0); I915_WRITE(RING_SYNC_0(ring->mmio_base), 0);
......
...@@ -140,7 +140,7 @@ struct intel_ring_buffer { ...@@ -140,7 +140,7 @@ struct intel_ring_buffer {
/** /**
* Do we have some not yet emitted requests outstanding? * Do we have some not yet emitted requests outstanding?
*/ */
u32 outstanding_lazy_request; u32 outstanding_lazy_seqno;
bool gpu_caches_dirty; bool gpu_caches_dirty;
bool fbc_dirty; bool fbc_dirty;
...@@ -258,8 +258,8 @@ static inline u32 intel_ring_get_tail(struct intel_ring_buffer *ring) ...@@ -258,8 +258,8 @@ static inline u32 intel_ring_get_tail(struct intel_ring_buffer *ring)
static inline u32 intel_ring_get_seqno(struct intel_ring_buffer *ring) static inline u32 intel_ring_get_seqno(struct intel_ring_buffer *ring)
{ {
BUG_ON(ring->outstanding_lazy_request == 0); BUG_ON(ring->outstanding_lazy_seqno == 0);
return ring->outstanding_lazy_request; return ring->outstanding_lazy_seqno;
} }
static inline void i915_trace_irq_get(struct intel_ring_buffer *ring, u32 seqno) static inline void i915_trace_irq_get(struct intel_ring_buffer *ring, u32 seqno)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment