OSDN Git Service

drm/i915: Don't free shared locks while shared
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 1 Jun 2021 07:46:41 +0000 (09:46 +0200)
committerMatthew Auld <matthew.auld@intel.com>
Tue, 1 Jun 2021 08:32:33 +0000 (09:32 +0100)
commit4d8151ae5329cf50781a02fd2298a909589a5bab
tree2dd0b803845dd6c0ad52f4d8abfb46504fcd831f
parent0f4308d524e2e7ba8670249424bbcb3a4ff185f0
drm/i915: Don't free shared locks while shared

We are currently sharing the VM reservation locks across a number of
gem objects with page-table memory. Since TTM will individiualize the
reservation locks when freeing objects, including accessing the shared
locks, make sure that the shared locks are not freed until that is done.
For PPGTT we add an additional refcount, for GGTT we take additional
measures to make sure objects sharing the GGTT reservation lock are
freed at GGTT takedown

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210601074654.3103-3-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/i915/gem/i915_gem_object.c
drivers/gpu/drm/i915/gem/i915_gem_object_types.h
drivers/gpu/drm/i915/gt/intel_ggtt.c
drivers/gpu/drm/i915/gt/intel_gtt.c
drivers/gpu/drm/i915/gt/intel_gtt.h
drivers/gpu/drm/i915/gt/intel_ppgtt.c
drivers/gpu/drm/i915/i915_drv.c