summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_gem_request.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-09-09 16:11:49 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2016-09-09 16:23:03 +0300
commitea746f3659232b3104d9534d5a7ebd9934ae1dd6 (patch)
tree20aeb27da021fb0b980a6bdec56a938b572bfe72 /drivers/gpu/drm/i915/i915_gem_request.h
parent2c7487a524147f7a3f588c1394be44149f66da94 (diff)
downloadlinux-ea746f3659232b3104d9534d5a7ebd9934ae1dd6.tar.xz
drm/i915: Expand bool interruptible to pass flags to i915_wait_request()
We need finer control over wakeup behaviour during i915_wait_request(), so expand the current bool interruptible to a bitmask. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-9-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_request.h')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_request.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_request.h b/drivers/gpu/drm/i915/i915_gem_request.h
index a231bd318ef0..479896ef791e 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.h
+++ b/drivers/gpu/drm/i915/i915_gem_request.h
@@ -218,10 +218,11 @@ struct intel_rps_client;
#define IS_RPS_USER(p) (!IS_ERR_OR_NULL(p))
int i915_wait_request(struct drm_i915_gem_request *req,
- bool interruptible,
+ unsigned int flags,
s64 *timeout,
struct intel_rps_client *rps)
__attribute__((nonnull(1)));
+#define I915_WAIT_INTERRUPTIBLE BIT(0)
static inline u32 intel_engine_get_seqno(struct intel_engine_cs *engine);
@@ -575,13 +576,13 @@ i915_gem_active_wait(const struct i915_gem_active *active, struct mutex *mutex)
if (!request)
return 0;
- return i915_wait_request(request, true, NULL, NULL);
+ return i915_wait_request(request, I915_WAIT_INTERRUPTIBLE, NULL, NULL);
}
/**
* i915_gem_active_wait_unlocked - waits until the request is completed
* @active - the active request on which to wait
- * @interruptible - whether the wait can be woken by a userspace signal
+ * @flags - how to wait
* @timeout - how long to wait at most
* @rps - userspace client to charge for a waitboost
*
@@ -602,7 +603,7 @@ i915_gem_active_wait(const struct i915_gem_active *active, struct mutex *mutex)
*/
static inline int
i915_gem_active_wait_unlocked(const struct i915_gem_active *active,
- bool interruptible,
+ unsigned int flags,
s64 *timeout,
struct intel_rps_client *rps)
{
@@ -611,7 +612,7 @@ i915_gem_active_wait_unlocked(const struct i915_gem_active *active,
request = i915_gem_active_get_unlocked(active);
if (request) {
- ret = i915_wait_request(request, interruptible, timeout, rps);
+ ret = i915_wait_request(request, flags, timeout, rps);
i915_gem_request_put(request);
}
@@ -638,7 +639,7 @@ i915_gem_active_retire(struct i915_gem_active *active,
if (!request)
return 0;
- ret = i915_wait_request(request, true, NULL, NULL);
+ ret = i915_wait_request(request, I915_WAIT_INTERRUPTIBLE, NULL, NULL);
if (ret)
return ret;