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)
commit9310cb7f8dbee342995c1144714218a185e7dd07
treef7007fc5916300cb672579e4d434ff1e16dcd3e8
parent0b71cea29fc29bbd8e9dd9c641fee6bd75f68274
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