diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-07-18 08:00:06 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-07-22 23:20:07 +0100 |
commit | df8cf31e749788d8de8c3028e530e6fd9ef8bc79 (patch) | |
tree | 07fee32a0e159f713bc4986077fcc12a6936c1e8 /drivers/gpu/drm/i915/gt/intel_context.c | |
parent | f3bcb0cccd36c6eb6e3afbd61f83eeca32d6cc50 (diff) |
drm/i915/gt: Hook up intel_context_fini()
Prior to freeing the struct, call the fini function to cleanup the
common members. Currently this only calls the debug functions to mark
the structs as destroyed, but may be extended to real work in future.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190718070024.21781-2-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_context.c')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_context.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_context.c b/drivers/gpu/drm/i915/gt/intel_context.c index b667e2b35804..9292b6ca5e9c 100644 --- a/drivers/gpu/drm/i915/gt/intel_context.c +++ b/drivers/gpu/drm/i915/gt/intel_context.c @@ -204,6 +204,12 @@ intel_context_init(struct intel_context *ce, __intel_context_active, __intel_context_retire); } +void intel_context_fini(struct intel_context *ce) +{ + mutex_destroy(&ce->pin_mutex); + i915_active_fini(&ce->active); +} + static void i915_global_context_shrink(void) { kmem_cache_shrink(global.slab_ce); |