drm/i915: add i915_address_space_fini
authorMatthew Auld <matthew.auld@intel.com>
Thu, 17 Nov 2016 21:04:10 +0000 (21:04 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 17 Nov 2016 21:05:36 +0000 (21:05 +0000)
commited9724ddde863ab650f7aaf61d577920dd2b3e15
tree8d0b44d23ff6c9afbdb277291f8b38f5804359cc
parent6288c79ea519f6ca3a54d87974b48ca6a8b986af
drm/i915: add i915_address_space_fini

We already have an i915_address_space_init, so for symmetry we should
also have a _fini, plus we already open code it twice. This then also
fixes a bug where we leak the timeline for the ggtt vm.

v2: don't forget about the struct_mutex for the ggtt path.

Fixes: 80b204bce8f2 ("drm/i915: Enable multiple timelines")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20161117210411.14044-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c