summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/selftests/mock_timeline.c
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2019-02-05 12:50:30 +0300
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2019-02-05 14:32:03 +0300
commit7810858412a0ab8b8ebb97d301dd601808968c88 (patch)
tree80e1b3062fba6b39d3148847f8856a73445951c3 /drivers/gpu/drm/i915/selftests/mock_timeline.c
parentec431eae8fc51c1b4555ec5f566e081804207657 (diff)
downloadlinux-7810858412a0ab8b8ebb97d301dd601808968c88.tar.xz
drm/i915: Add timeline barrier support
Timeline barrier allows serialization between different timelines. After calling i915_timeline_set_barrier with a request, all following submissions on this timeline will be set up as depending on this request, or barrier. Once the barrier has been completed it automatically gets cleared and things continue as normal. This facility will be used by the upcoming context SSEU code. v2: * Assert barrier has been retired on timeline_fini. (Chris Wilson) * Fix mock_timeline. v3: * Improved comment language. (Chris Wilson) v4: * Maintain ordering with previous barriers set on the timeline. v5: * Rebase. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190205095032.22673-3-tvrtko.ursulin@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/mock_timeline.c')
-rw-r--r--drivers/gpu/drm/i915/selftests/mock_timeline.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/mock_timeline.c b/drivers/gpu/drm/i915/selftests/mock_timeline.c
index cf39ccd9fc05..e5659aaa856d 100644
--- a/drivers/gpu/drm/i915/selftests/mock_timeline.c
+++ b/drivers/gpu/drm/i915/selftests/mock_timeline.c
@@ -15,6 +15,7 @@ void mock_timeline_init(struct i915_timeline *timeline, u64 context)
spin_lock_init(&timeline->lock);
+ init_request_active(&timeline->barrier, NULL);
init_request_active(&timeline->last_request, NULL);
INIT_LIST_HEAD(&timeline->requests);