Commit 73bad7ca authored by Chris Wilson's avatar Chris Wilson

drm/i915: Cleanup modesetting on load-error path

After handling a critical failure initialising GEM we need to unwind the
modesetting setup.

Testcase: igt/drv_module_reload/basic-reload-inject
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710094421.16223-2-chris@chris-wilson.co.ukReviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
parent 8bcf9f70
...@@ -682,7 +682,7 @@ static int i915_load_modeset_init(struct drm_device *dev) ...@@ -682,7 +682,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
ret = i915_gem_init(dev_priv); ret = i915_gem_init(dev_priv);
if (ret) if (ret)
goto cleanup_irq; goto cleanup_modeset;
intel_setup_overlay(dev_priv); intel_setup_overlay(dev_priv);
...@@ -702,6 +702,8 @@ static int i915_load_modeset_init(struct drm_device *dev) ...@@ -702,6 +702,8 @@ static int i915_load_modeset_init(struct drm_device *dev)
if (i915_gem_suspend(dev_priv)) if (i915_gem_suspend(dev_priv))
DRM_ERROR("failed to idle hardware; continuing to unload!\n"); DRM_ERROR("failed to idle hardware; continuing to unload!\n");
i915_gem_fini(dev_priv); i915_gem_fini(dev_priv);
cleanup_modeset:
intel_modeset_cleanup(dev);
cleanup_irq: cleanup_irq:
drm_irq_uninstall(dev); drm_irq_uninstall(dev);
intel_teardown_gmbus(dev_priv); intel_teardown_gmbus(dev_priv);
......
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