[Intel-gfx] [PATCH] drm/i915/selftests: Add intel_gt_driver_late_release for mock device

Chris Wilson chris at chris-wilson.co.uk
Mon Nov 18 09:43:42 UTC 2019


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: dea397e818b1 ("drm/i915/gt: Flush retire.work timer object on unload")
References: 24635c5152af ("drm/i915: Move intel_gt initialization to a separate file")
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index e58b0bc9cdb6..d14ba8498f57 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -71,6 +71,7 @@ static void mock_device_release(struct drm_device *dev)
 	mock_fini_ggtt(&i915->ggtt);
 	destroy_workqueue(i915->wq);
 
+	intel_gt_driver_late_release(&i915->gt);
 	intel_memory_regions_driver_release(i915);
 
 	drm_mode_config_cleanup(&i915->drm);
@@ -204,6 +205,7 @@ struct drm_i915_private *mock_gem_device(void)
 err_unlock:
 	destroy_workqueue(i915->wq);
 err_drv:
+	intel_gt_driver_late_release(&i915->gt);
 	intel_memory_regions_driver_release(i915);
 	drm_mode_config_cleanup(&i915->drm);
 	drm_dev_fini(&i915->drm);
-- 
2.24.0



More information about the Intel-gfx mailing list