diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-22 01:21:02 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-22 16:13:53 +0300 |
commit | 0e21834e18c545bdebed527209a7b6bb8aed9f9b (patch) | |
tree | 5a791de3433a477408eeff103b85ffff6840612a /drivers/gpu/drm/i915/i915_request.h | |
parent | 924090f4237bc34f32bb1992bbf334af76e64a29 (diff) | |
download | linux-0e21834e18c545bdebed527209a7b6bb8aed9f9b.tar.xz |
drm/i915: Tidy common test_bit probing of i915_request->fence.flags
A repeated pattern is to test the signaled bit of our
request->fence.flags. Make this an inline to shorten a few lines and
remove unnecessary line continuations.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190121222117.23305-20-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_request.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_request.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h index d014b0605445..c0f084ca4f29 100644 --- a/drivers/gpu/drm/i915/i915_request.h +++ b/drivers/gpu/drm/i915/i915_request.h @@ -280,6 +280,11 @@ long i915_request_wait(struct i915_request *rq, #define I915_WAIT_ALL BIT(3) /* used by i915_gem_object_wait() */ #define I915_WAIT_FOR_IDLE_BOOST BIT(4) +static inline bool i915_request_signaled(const struct i915_request *rq) +{ + return test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &rq->fence.flags); +} + static inline bool intel_engine_has_started(struct intel_engine_cs *engine, u32 seqno); static inline bool intel_engine_has_completed(struct intel_engine_cs *engine, |