Commit 8eed6714 authored by Chris Wilson's avatar Chris Wilson

drm/i915/selftests: Add intel_gt_driver_late_release for mock device

Having called intel_gt_init_early() to setup the mock intel_gt, we need
to call the corresponding intel_gt_driver_late_release() to clean up.

References: dea397e8 ("drm/i915/gt: Flush retire.work timer object on unload")
References: 24635c51 ("drm/i915: Move intel_gt initialization to a separate file")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191118094342.2193485-1-chris@chris-wilson.co.uk
parent 48ea97fa
...@@ -71,6 +71,7 @@ static void mock_device_release(struct drm_device *dev) ...@@ -71,6 +71,7 @@ static void mock_device_release(struct drm_device *dev)
mock_fini_ggtt(&i915->ggtt); mock_fini_ggtt(&i915->ggtt);
destroy_workqueue(i915->wq); destroy_workqueue(i915->wq);
intel_gt_driver_late_release(&i915->gt);
intel_memory_regions_driver_release(i915); intel_memory_regions_driver_release(i915);
drm_mode_config_cleanup(&i915->drm); drm_mode_config_cleanup(&i915->drm);
...@@ -204,6 +205,7 @@ struct drm_i915_private *mock_gem_device(void) ...@@ -204,6 +205,7 @@ struct drm_i915_private *mock_gem_device(void)
err_unlock: err_unlock:
destroy_workqueue(i915->wq); destroy_workqueue(i915->wq);
err_drv: err_drv:
intel_gt_driver_late_release(&i915->gt);
intel_memory_regions_driver_release(i915); intel_memory_regions_driver_release(i915);
drm_mode_config_cleanup(&i915->drm); drm_mode_config_cleanup(&i915->drm);
drm_dev_fini(&i915->drm); drm_dev_fini(&i915->drm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment