]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Reference objects on the ww object list
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 17 Jun 2021 06:30:07 +0000 (08:30 +0200)
committerMatthew Auld <matthew.auld@intel.com>
Thu, 17 Jun 2021 13:22:58 +0000 (14:22 +0100)
commit37f9cd238bd94d6c5c1cf0480e6639448bcccfff
treedff488e12d5c50d864b9a5c83dc56a7d4aa9091b
parent4f783c729bf851ba012c41c0b329975c8424ca27
drm/i915: Reference objects on the ww object list

Since the ww transaction endpoint easily end up far out-of-scope of
the objects on the ww object list, particularly for contending lock
objects, make sure we reference objects on the list so they don't
disappear under us.

This comes with a performance penalty so it's been debated whether this
is really needed. But I think this is motivated by the fact that locking
is typically difficult to get right, and whatever we can do to make it
simpler for developers moving forward should be done, unless the
performance impact is far too high.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210617063018.92802-2-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/i915/gem/i915_gem_object.h
drivers/gpu/drm/i915/i915_gem.c