summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-07-08 12:30:38 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-07-09 08:34:22 +0100
commitcbcec57e9dd75c5bb857ead091e471ecb25afd1d (patch)
treef22df89c97e7093a22adadf097d1d37f88f898c9
parentcb6d7c7dc7ff8cace666ddec66334117a6068ce2 (diff)
downloadlinux-cbcec57e9dd75c5bb857ead091e471ecb25afd1d.tar.gz
linux-cbcec57e9dd75c5bb857ead091e471ecb25afd1d.zip
drm/i915/selftests: Fill in a little more of the dummy fence
Initialise the dma_fence innards in preparation for making dma_fence_signal() always check the callback list. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190708113038.19251-1-chris@chris-wilson.co.uk
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_lrc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
index 11f490502ca6..672bdaa66540 100644
--- a/drivers/gpu/drm/i915/gt/selftest_lrc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
@@ -859,6 +859,10 @@ static struct i915_request *dummy_request(struct intel_engine_cs *engine)
i915_sw_fence_init(&rq->submit, dummy_notify);
set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
+ spin_lock_init(&rq->lock);
+ rq->fence.lock = &rq->lock;
+ INIT_LIST_HEAD(&rq->fence.cb_list);
+
return rq;
}