]> 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)
commit4cad1105a1c60973ddd392f30465f760b668b556
tree4925a0a764902a53a0785f3fc67f72e53e5ead5d
parentbdd9b03b62d0434c7de351f4dd193161c6ba35f7
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