]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Only revoke mmap handlers if active
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 2 Jul 2020 16:36:23 +0000 (17:36 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 2 Jul 2020 19:46:08 +0000 (20:46 +0100)
commit4dbaeb771be07e6458ca8934b7f5e4c36d928438
tree265ec23ce80f6db63da3715a53b000b40848aa90
parent1213ecb619d45cc4048ebcee889ebdfdef7bae67
drm/i915/gem: Only revoke mmap handlers if active

Avoid waking up the device and taking stale locks if we know that the
object is not currently mmapped. This is particularly useful as not many
object are actually mmapped and so we can destroy them without waking
the device up, and gives us a little more freedom of workqueue ordering
during shutdown.

v2: Pull the release_mmap() into its single user in freeing the objects,
where there can not be any race with a concurrent user of the freed
object. Or so one hopes!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
Link: https://patchwork.freedesktop.org/patch/msgid/20200702163623.6402-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_mman.c
drivers/gpu/drm/i915/gem/i915_gem_mman.h
drivers/gpu/drm/i915/gem/i915_gem_object.c