Re: [PATCH 54/55] drm/i915: Remove the now obsolete 'i915_gem_check_olr()'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29/05/2015 17:44, John.C.Harrison@xxxxxxxxx wrote:
From: John Harrison <John.C.Harrison@xxxxxxxxx>

As there is no OLR to check, the check_olr() function is now a no-op and can be
removed.

For: VIZ-5115
Signed-off-by: John Harrison <John.C.Harrison@xxxxxxxxx>
---
  drivers/gpu/drm/i915/i915_drv.h      |    1 -
  drivers/gpu/drm/i915/i915_gem.c      |   34 +---------------------------------
  drivers/gpu/drm/i915/intel_display.c |    6 ------
  3 files changed, 1 insertion(+), 40 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 18bfc84..cb5bb4a 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2825,7 +2825,6 @@ bool i915_gem_retire_requests(struct drm_device *dev);
  void i915_gem_retire_requests_ring(struct intel_engine_cs *ring);
  int __must_check i915_gem_check_wedge(struct i915_gpu_error *error,
  				      bool interruptible);
-int __must_check i915_gem_check_olr(struct drm_i915_gem_request *req);

  static inline bool i915_reset_in_progress(struct i915_gpu_error *error)
  {
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b8fe931..f825942 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1149,17 +1149,6 @@ i915_gem_check_wedge(struct i915_gpu_error *error,
  	return 0;
  }

-/*
- * Compare arbitrary request against outstanding lazy request. Emit on match.
- */
-int
-i915_gem_check_olr(struct drm_i915_gem_request *req)
-{
-	WARN_ON(!mutex_is_locked(&req->ring->dev->struct_mutex));
-
-	return 0;
-}
-
  static void fake_irq(unsigned long data)
  {
  	wake_up_process((struct task_struct *)data);
@@ -1440,10 +1429,6 @@ i915_wait_request(struct drm_i915_gem_request *req)
  	if (ret)
  		return ret;

-	ret = i915_gem_check_olr(req);
-	if (ret)
-		return ret;
-
  	ret = __i915_wait_request(req,
  				  atomic_read(&dev_priv->gpu_error.reset_counter),
  				  interruptible, NULL, NULL);
@@ -1543,10 +1528,6 @@ i915_gem_object_wait_rendering__nonblocking(struct drm_i915_gem_object *obj,
  		if (req == NULL)
  			return 0;

-		ret = i915_gem_check_olr(req);
-		if (ret)
-			goto err;
-
  		requests[n++] = i915_gem_request_reference(req);
  	} else {
  		for (i = 0; i < I915_NUM_RINGS; i++) {
@@ -1556,10 +1537,6 @@ i915_gem_object_wait_rendering__nonblocking(struct drm_i915_gem_object *obj,
  			if (req == NULL)
  				continue;

-			ret = i915_gem_check_olr(req);
-			if (ret)
-				goto err;
-
  			requests[n++] = i915_gem_request_reference(req);
  		}
  	}
@@ -1570,7 +1547,6 @@ i915_gem_object_wait_rendering__nonblocking(struct drm_i915_gem_object *obj,
  					  NULL, rps);
  	mutex_lock(&dev->struct_mutex);

-err:
  	for (i = 0; i < n; i++) {
  		if (ret == 0)
  			i915_gem_object_retire_request(obj, requests[i]);
@@ -2987,7 +2963,7 @@ i915_gem_idle_work_handler(struct work_struct *work)
  static int
  i915_gem_object_flush_active(struct drm_i915_gem_object *obj)
  {
-	int ret, i;
+	int i;

  	if (!obj->active)
  		return 0;
@@ -3002,10 +2978,6 @@ i915_gem_object_flush_active(struct drm_i915_gem_object *obj)
  		if (list_empty(&req->list))
  			goto retire;

-		ret = i915_gem_check_olr(req);
-		if (ret)
-			return ret;
-
  		if (i915_gem_request_completed(req, true)) {
  			__i915_gem_request_retire__upto(req);
  retire:
@@ -3121,10 +3093,6 @@ __i915_gem_object_sync(struct drm_i915_gem_object *obj,
  	if (i915_gem_request_completed(from_req, true))
  		return 0;

-	ret = i915_gem_check_olr(from_req);
-	if (ret)
-		return ret;
-
  	if (!i915_semaphore_is_enabled(obj->base.dev)) {
  		struct drm_i915_private *i915 = to_i915(obj->base.dev);
  		ret = __i915_wait_request(from_req,
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 91e19d0..aca2215 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11243,12 +11243,6 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
  		i915_gem_request_assign(&work->flip_queued_req,
  					obj->last_write_req);
  	} else {
-		if (obj->last_write_req) {
-			ret = i915_gem_check_olr(obj->last_write_req);
-			if (ret)
-				goto cleanup_unpin;
-		}
-
  		if (!request) {
  			ret = i915_gem_request_alloc(ring, ring->default_context, &request);
  			if (ret)



Reviewed-by: Tomas Elf <tomas.elf@xxxxxxxxx>

Thanks,
Tomas

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux