]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Add to timeline requires the timeline mutex
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 25 Jul 2019 13:14:46 +0000 (14:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 26 Jul 2019 18:25:34 +0000 (19:25 +0100)
commit28d944afe87d317a3f16c363c1fb941bf78fd2d5
treee54da6a533f89ad412132fa663645fa5af100a01
parent603a71c8efa67b0d951ca80c22d652760979290d
drm/i915/gt: Add to timeline requires the timeline mutex

Modifying a remote context requires careful serialisation with requests
on that context, and that serialisation requires us to take their
timeline->mutex. Make it so.

Note that while struct_mutex rules, we can't create more than one
request in parallel, but that age is soon coming to an end.

v2: Though it doesn't affect the current users, contexts may share
timelines so check if we already hold the right mutex.

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/20190725131447.27515-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_context.c