[Intel-gfx] [PATCH 53/59] drm/i915: Remove the now obsolete 'outstanding_lazy_request'
John.C.Harrison at Intel.com
John.C.Harrison at Intel.com
Thu Mar 19 05:30:58 PDT 2015
From: John Harrison <John.C.Harrison at Intel.com>
The outstanding_lazy_request is no longer used anywhere in the driver.
Everything that was looking at it now has a request explicitly passed in from on
high. Everything that was relying upon it behind the scenes is now explicitly
creating/passing/submitting it's own private request. Thus the OLR can be
removed.
For: VIZ-5115
Signed-off-by: John Harrison <John.C.Harrison at Intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 16 ++--------------
drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +---
drivers/gpu/drm/i915/intel_lrc.c | 1 -
drivers/gpu/drm/i915/intel_ringbuffer.c | 8 --------
drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ----
5 files changed, 3 insertions(+), 30 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index fe2de21..9ff9bda 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1161,9 +1161,6 @@ i915_gem_check_olr(struct drm_i915_gem_request *req)
{
WARN_ON(!mutex_is_locked(&req->ring->dev->struct_mutex));
- if (req == req->ring->outstanding_lazy_request)
- i915_add_request(req);
-
return 0;
}
@@ -2344,8 +2341,6 @@ void __i915_add_request(struct drm_i915_gem_request *request,
dev_priv = ring->dev->dev_private;
ringbuf = request->ringbuf;
- WARN_ON(request != ring->outstanding_lazy_request);
-
/*
* To ensure that this call will not fail, space for it's emissions
* should already have been reserved in the ring buffer. Let the ring
@@ -2412,7 +2407,6 @@ void __i915_add_request(struct drm_i915_gem_request *request,
}
trace_i915_gem_request_add(request);
- ring->outstanding_lazy_request = NULL;
i915_queue_hangcheck(ring->dev);
@@ -2526,8 +2520,7 @@ int i915_gem_request_alloc(struct intel_engine_cs *ring,
if (!req_out)
return -EINVAL;
- if ((*req_out = ring->outstanding_lazy_request) != NULL)
- return 0;
+ *req_out = NULL;
request = kzalloc(sizeof(*request), GFP_KERNEL);
if (request == NULL)
@@ -2576,7 +2569,7 @@ int i915_gem_request_alloc(struct intel_engine_cs *ring,
return ret;
}
- *req_out = ring->outstanding_lazy_request = request;
+ *req_out = request;
return 0;
}
@@ -2671,9 +2664,6 @@ static void i915_gem_reset_ring_cleanup(struct drm_i915_private *dev_priv,
i915_gem_free_request(request);
}
-
- /* This may not have been flushed before the reset, so clean it now */
- i915_gem_request_assign(&ring->outstanding_lazy_request, NULL);
}
void i915_gem_restore_fences(struct drm_device *dev)
@@ -3131,8 +3121,6 @@ int i915_gpu_idle(struct drm_device *dev)
i915_add_request_no_flush(req);
}
- WARN_ON(ring->outstanding_lazy_request);
-
ret = intel_ring_idle(ring);
if (ret)
return ret;
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 9345db8..c512979 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1638,10 +1638,8 @@ err:
* must be freed again. If it was submitted then it is being tracked
* on the active request list and no clean up is required here.
*/
- if (ret && params->request) {
+ if (ret && params->request)
i915_gem_request_cancel(params->request);
- ring->outstanding_lazy_request = NULL;
- }
mutex_unlock(&dev->struct_mutex);
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 8cb34c6..60bcf9a 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1384,7 +1384,6 @@ void intel_logical_ring_cleanup(struct intel_engine_cs *ring)
intel_logical_ring_stop(ring);
WARN_ON((I915_READ_MODE(ring) & MODE_IDLE) == 0);
- i915_gem_request_assign(&ring->outstanding_lazy_request, NULL);
if (ring->cleanup)
ring->cleanup(ring);
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index c7dcabd..c5752c4 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -2051,7 +2051,6 @@ void intel_cleanup_ring_buffer(struct intel_engine_cs *ring)
intel_unpin_ringbuffer_obj(ringbuf);
intel_destroy_ringbuffer_obj(ringbuf);
- i915_gem_request_assign(&ring->outstanding_lazy_request, NULL);
if (ring->cleanup)
ring->cleanup(ring);
@@ -2182,11 +2181,6 @@ int intel_ring_idle(struct intel_engine_cs *ring)
{
struct drm_i915_gem_request *req;
- /* We need to add any requests required to flush the objects and ring */
- WARN_ON(ring->outstanding_lazy_request);
- if (ring->outstanding_lazy_request)
- i915_add_request(ring->outstanding_lazy_request);
-
/* Wait upon the last request to be completed */
if (list_empty(&ring->request_list))
return 0;
@@ -2321,8 +2315,6 @@ void intel_ring_init_seqno(struct intel_engine_cs *ring, u32 seqno)
struct drm_device *dev = ring->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
- BUG_ON(ring->outstanding_lazy_request);
-
if (INTEL_INFO(dev)->gen == 6 || INTEL_INFO(dev)->gen == 7) {
I915_WRITE(RING_SYNC_0(ring->mmio_base), 0);
I915_WRITE(RING_SYNC_1(ring->mmio_base), 0);
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index 3002338..68097c1 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -261,10 +261,6 @@ struct intel_engine_cs {
*/
struct list_head request_list;
- /**
- * Do we have some not yet emitted requests outstanding?
- */
- struct drm_i915_gem_request *outstanding_lazy_request;
bool gpu_caches_dirty;
wait_queue_head_t irq_queue;
--
1.7.9.5
More information about the Intel-gfx
mailing list