]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Remove kref from i915_sw_fence
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 17 May 2017 12:09:56 +0000 (13:09 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 17 May 2017 12:38:01 +0000 (13:38 +0100)
commitec0e7ac36f93b580c24ffa033d9ccf569b22cf54
treef7007fc5916300cb672579e4d434ff1e16dcd3e8
parentb11fe74812a5169ae76d7e1860fdc0d5c60ed6db
drm/i915: Remove kref from i915_sw_fence

My original intention was for i915_sw_fence to be the base class and
provide the reference count for the container. This was from starting
with a design to handle async_work. In practice, for i915 we embed
fences into structs which have their own independent reference counting,
making the i915_sw_fence.kref duplicitous. If we remove the kref, we
remove the i915_sw_fence's ability to free itself and its independence,
it can only exist within a container and must be supplied with a
callback to handle its release.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170517121007.27224-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_sw_fence.c
drivers/gpu/drm/i915/i915_sw_fence.h