]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Allow multiple user handles to the same VM
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 25 Apr 2019 05:43:33 +0000 (06:43 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 25 Apr 2019 06:33:57 +0000 (07:33 +0100)
commitfb02ad0e5bc541545ed4673f7c0c0846c9bef6fc
treea24cfaed0007b1a51fc5b7c6cca7c24488892d5a
parentf25619fc4d19e1f4853719bf8e501d368ae1e851
drm/i915: Allow multiple user handles to the same VM

It was noted that we made the same mistake for VM_ID as for object
handles, whereby we ensured that we only allocated a single handle for
one ppgtt. This has the unfortunate consequence for userspace that they
need to reference count the handles to avoid destroying an active ID. If
we allow multiple handles to the same ppgtt, userspace can freely
unreference any handle they own without fear of destroying the same
handle in use elsewhere.

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/20190425054333.27299-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_gtt.h