Commit 776f3236 authored by Chris Wilson's avatar Chris Wilson

drm/i915: s/__i915_wait_request/i915_wait_request/

There is only one wait on request function now, so drop the "expert"
indication of leading __.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-21-git-send-email-chris@chris-wilson.co.uk
parent 37db1470
...@@ -1420,7 +1420,7 @@ i915_gem_object_wait_rendering__nonblocking(struct drm_i915_gem_object *obj, ...@@ -1420,7 +1420,7 @@ i915_gem_object_wait_rendering__nonblocking(struct drm_i915_gem_object *obj,
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
ret = 0; ret = 0;
for (i = 0; ret == 0 && i < n; i++) for (i = 0; ret == 0 && i < n; i++)
ret = __i915_wait_request(requests[i], true, NULL, rps); ret = i915_wait_request(requests[i], true, NULL, rps);
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
...@@ -2726,9 +2726,9 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file) ...@@ -2726,9 +2726,9 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
if (ret == 0) if (ret == 0)
ret = __i915_wait_request(requests[i], true, ret = i915_wait_request(requests[i], true,
args->timeout_ns > 0 ? &args->timeout_ns : NULL, args->timeout_ns > 0 ? &args->timeout_ns : NULL,
to_rps_client(file)); to_rps_client(file));
i915_gem_request_put(requests[i]); i915_gem_request_put(requests[i]);
} }
return ret; return ret;
...@@ -2744,10 +2744,10 @@ __i915_gem_object_sync(struct drm_i915_gem_request *to, ...@@ -2744,10 +2744,10 @@ __i915_gem_object_sync(struct drm_i915_gem_request *to,
return 0; return 0;
if (!i915.semaphores) { if (!i915.semaphores) {
ret = __i915_wait_request(from, ret = i915_wait_request(from,
from->i915->mm.interruptible, from->i915->mm.interruptible,
NULL, NULL,
NO_WAITBOOST); NO_WAITBOOST);
if (ret) if (ret)
return ret; return ret;
} else { } else {
...@@ -3712,7 +3712,7 @@ i915_gem_ring_throttle(struct drm_device *dev, struct drm_file *file) ...@@ -3712,7 +3712,7 @@ i915_gem_ring_throttle(struct drm_device *dev, struct drm_file *file)
if (target == NULL) if (target == NULL)
return 0; return 0;
ret = __i915_wait_request(target, true, NULL, NULL); ret = i915_wait_request(target, true, NULL, NULL);
i915_gem_request_put(target); i915_gem_request_put(target);
return ret; return ret;
......
...@@ -70,9 +70,9 @@ static signed long i915_fence_wait(struct fence *fence, ...@@ -70,9 +70,9 @@ static signed long i915_fence_wait(struct fence *fence,
timeout = NULL; timeout = NULL;
} }
ret = __i915_wait_request(to_request(fence), ret = i915_wait_request(to_request(fence),
interruptible, timeout, interruptible, timeout,
NO_WAITBOOST); NO_WAITBOOST);
if (ret == -ETIME) if (ret == -ETIME)
return 0; return 0;
...@@ -579,7 +579,7 @@ bool __i915_spin_request(const struct drm_i915_gem_request *req, ...@@ -579,7 +579,7 @@ bool __i915_spin_request(const struct drm_i915_gem_request *req,
} }
/** /**
* __i915_wait_request - wait until execution of request has finished * i915_wait_request - wait until execution of request has finished
* @req: duh! * @req: duh!
* @interruptible: do an interruptible wait (normally yes) * @interruptible: do an interruptible wait (normally yes)
* @timeout: in - how long to wait (NULL forever); out - how much time remaining * @timeout: in - how long to wait (NULL forever); out - how much time remaining
...@@ -595,10 +595,10 @@ bool __i915_spin_request(const struct drm_i915_gem_request *req, ...@@ -595,10 +595,10 @@ bool __i915_spin_request(const struct drm_i915_gem_request *req,
* Returns 0 if the request was found within the alloted time. Else returns the * Returns 0 if the request was found within the alloted time. Else returns the
* errno with remaining time filled in timeout argument. * errno with remaining time filled in timeout argument.
*/ */
int __i915_wait_request(struct drm_i915_gem_request *req, int i915_wait_request(struct drm_i915_gem_request *req,
bool interruptible, bool interruptible,
s64 *timeout, s64 *timeout,
struct intel_rps_client *rps) struct intel_rps_client *rps)
{ {
int state = interruptible ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE; int state = interruptible ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE;
DEFINE_WAIT(reset); DEFINE_WAIT(reset);
......
...@@ -214,10 +214,10 @@ struct intel_rps_client; ...@@ -214,10 +214,10 @@ struct intel_rps_client;
#define IS_RPS_CLIENT(p) (!IS_ERR(p)) #define IS_RPS_CLIENT(p) (!IS_ERR(p))
#define IS_RPS_USER(p) (!IS_ERR_OR_NULL(p)) #define IS_RPS_USER(p) (!IS_ERR_OR_NULL(p))
int __i915_wait_request(struct drm_i915_gem_request *req, int i915_wait_request(struct drm_i915_gem_request *req,
bool interruptible, bool interruptible,
s64 *timeout, s64 *timeout,
struct intel_rps_client *rps) struct intel_rps_client *rps)
__attribute__((nonnull(1))); __attribute__((nonnull(1)));
static inline u32 intel_engine_get_seqno(struct intel_engine_cs *engine); static inline u32 intel_engine_get_seqno(struct intel_engine_cs *engine);
...@@ -418,7 +418,7 @@ i915_gem_active_wait(const struct i915_gem_active *active, struct mutex *mutex) ...@@ -418,7 +418,7 @@ i915_gem_active_wait(const struct i915_gem_active *active, struct mutex *mutex)
if (!request) if (!request)
return 0; return 0;
return __i915_wait_request(request, true, NULL, NULL); return i915_wait_request(request, true, NULL, NULL);
} }
/** /**
...@@ -441,7 +441,7 @@ i915_gem_active_retire(struct i915_gem_active *active, ...@@ -441,7 +441,7 @@ i915_gem_active_retire(struct i915_gem_active *active,
if (!request) if (!request)
return 0; return 0;
ret = __i915_wait_request(request, true, NULL, NULL); ret = i915_wait_request(request, true, NULL, NULL);
if (ret) if (ret)
return ret; return ret;
......
...@@ -83,7 +83,7 @@ static void wait_rendering(struct drm_i915_gem_object *obj) ...@@ -83,7 +83,7 @@ static void wait_rendering(struct drm_i915_gem_object *obj)
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
__i915_wait_request(requests[i], false, NULL, NULL); i915_wait_request(requests[i], false, NULL, NULL);
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
......
...@@ -11463,9 +11463,9 @@ static void intel_mmio_flip_work_func(struct work_struct *w) ...@@ -11463,9 +11463,9 @@ static void intel_mmio_flip_work_func(struct work_struct *w)
struct reservation_object *resv; struct reservation_object *resv;
if (work->flip_queued_req) if (work->flip_queued_req)
WARN_ON(__i915_wait_request(work->flip_queued_req, WARN_ON(i915_wait_request(work->flip_queued_req,
false, NULL, false, NULL,
NO_WAITBOOST)); NO_WAITBOOST));
/* For framebuffer backed by dmabuf, wait for fence */ /* For framebuffer backed by dmabuf, wait for fence */
resv = i915_gem_object_get_dmabuf_resv(obj); resv = i915_gem_object_get_dmabuf_resv(obj);
...@@ -13508,8 +13508,8 @@ static int intel_atomic_prepare_commit(struct drm_device *dev, ...@@ -13508,8 +13508,8 @@ static int intel_atomic_prepare_commit(struct drm_device *dev,
if (!intel_plane_state->wait_req) if (!intel_plane_state->wait_req)
continue; continue;
ret = __i915_wait_request(intel_plane_state->wait_req, ret = i915_wait_request(intel_plane_state->wait_req,
true, NULL, NULL); true, NULL, NULL);
if (ret) { if (ret) {
/* Any hang should be swallowed by the wait */ /* Any hang should be swallowed by the wait */
WARN_ON(ret == -EIO); WARN_ON(ret == -EIO);
...@@ -13621,8 +13621,8 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state) ...@@ -13621,8 +13621,8 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
if (!intel_plane_state->wait_req) if (!intel_plane_state->wait_req)
continue; continue;
ret = __i915_wait_request(intel_plane_state->wait_req, ret = i915_wait_request(intel_plane_state->wait_req,
true, NULL, NULL); true, NULL, NULL);
/* EIO should be eaten, and we can't get interrupted in the /* EIO should be eaten, and we can't get interrupted in the
* worker, and blocking commits have waited already. */ * worker, and blocking commits have waited already. */
WARN_ON(ret); WARN_ON(ret);
......
...@@ -2240,9 +2240,9 @@ int intel_engine_idle(struct intel_engine_cs *engine) ...@@ -2240,9 +2240,9 @@ int intel_engine_idle(struct intel_engine_cs *engine)
link); link);
/* Make sure we do not trigger any retires */ /* Make sure we do not trigger any retires */
return __i915_wait_request(req, return i915_wait_request(req,
req->i915->mm.interruptible, req->i915->mm.interruptible,
NULL, NULL); NULL, NULL);
} }
int intel_ring_alloc_request_extras(struct drm_i915_gem_request *request) int intel_ring_alloc_request_extras(struct drm_i915_gem_request *request)
...@@ -2299,7 +2299,7 @@ static int wait_for_space(struct drm_i915_gem_request *req, int bytes) ...@@ -2299,7 +2299,7 @@ static int wait_for_space(struct drm_i915_gem_request *req, int bytes)
if (WARN_ON(&target->ring_link == &ring->request_list)) if (WARN_ON(&target->ring_link == &ring->request_list))
return -ENOSPC; return -ENOSPC;
ret = __i915_wait_request(target, true, NULL, NO_WAITBOOST); ret = i915_wait_request(target, true, NULL, NO_WAITBOOST);
if (ret) if (ret)
return ret; return ret;
......
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