diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-28 13:23:56 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-28 19:24:22 +0300 |
commit | 1e345568e3b541e19202caadae8d2cb2237e7ed8 (patch) | |
tree | b48938fe29b0fea0391f5a9d31feb248912dd4c3 /drivers/gpu/drm/i915/selftests/mock_timeline.c | |
parent | 0ca88ba0d6347cf8c4ea9f264c384594f8fefa11 (diff) | |
download | linux-1e345568e3b541e19202caadae8d2cb2237e7ed8.tar.xz |
drm/i915: Move list of timelines under its own lock
Currently, the list of timelines is serialised by the struct_mutex, but
to alleviate difficulties with using that mutex in future, move the
list management under its own dedicated mutex.
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/20190128102356.15037-5-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/mock_timeline.c')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/mock_timeline.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/selftests/mock_timeline.c b/drivers/gpu/drm/i915/selftests/mock_timeline.c index dcf3b16f5a07..cf39ccd9fc05 100644 --- a/drivers/gpu/drm/i915/selftests/mock_timeline.c +++ b/drivers/gpu/drm/i915/selftests/mock_timeline.c @@ -10,6 +10,7 @@ void mock_timeline_init(struct i915_timeline *timeline, u64 context) { + timeline->i915 = NULL; timeline->fence_context = context; spin_lock_init(&timeline->lock); @@ -24,5 +25,5 @@ void mock_timeline_init(struct i915_timeline *timeline, u64 context) void mock_timeline_fini(struct i915_timeline *timeline) { - i915_timeline_fini(timeline); + i915_syncmap_free(&timeline->sync); } |