]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Utilize rcu iteration of context engines
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 2 Apr 2020 12:42:18 +0000 (13:42 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 2 Apr 2020 20:43:53 +0000 (21:43 +0100)
commit8df8d4c9b931f54dcd25ee3ede3fa3c8e86b5f6c
tree4925a0a764902a53a0785f3fc67f72e53e5ead5d
parent44fd9be199b130a69c3a14a7257ec2271278accb
drm/i915/gem: Utilize rcu iteration of context engines

Now that we can peek at GEM->engines[] and obtain a reference to them
using RCU, do so for instances where we can safely iterate the
potentially old copy of the engines. For setting, we can do this when we
know the engine properties are copied over before swapping, so we know
the new engines already have the global property and we update the old
before they are discarded. For reading, we only need to be safe; as we
do so on behalf of the user, their races are their own problem.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200402124218.6375-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_context.c