Commit eb4612d8 authored by Jani Nikula's avatar Jani Nikula

drm/i915: split out intel_modeset_driver_remove_nogem() and simplify

Split out a separate display function for driver remove after gem
deinitialization. Note that the sequence is not symmetric with
init. However use similar naming as that reflects the deinit sequence.

No functional changes.
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/197fa7e488b412e147ff0fe9440c48811888f1a6.1599056955.git.jani.nikula@intel.com
parent 24d98a54
...@@ -18946,6 +18946,18 @@ void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915) ...@@ -18946,6 +18946,18 @@ void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915)
intel_fbc_cleanup_cfb(i915); intel_fbc_cleanup_cfb(i915);
} }
/* part #3: call after gem init */
void intel_modeset_driver_remove_nogem(struct drm_i915_private *i915)
{
intel_csr_ucode_fini(i915);
intel_power_domains_driver_remove(i915);
intel_vga_unregister(i915);
intel_bios_driver_remove(i915);
}
#if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) #if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR)
struct intel_display_error_state { struct intel_display_error_state {
......
...@@ -633,6 +633,7 @@ int intel_modeset_init_nogem(struct drm_i915_private *i915); ...@@ -633,6 +633,7 @@ int intel_modeset_init_nogem(struct drm_i915_private *i915);
int intel_modeset_init(struct drm_i915_private *i915); int intel_modeset_init(struct drm_i915_private *i915);
void intel_modeset_driver_remove(struct drm_i915_private *i915); void intel_modeset_driver_remove(struct drm_i915_private *i915);
void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915); void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915);
void intel_modeset_driver_remove_nogem(struct drm_i915_private *i915);
void intel_display_resume(struct drm_device *dev); void intel_display_resume(struct drm_device *dev);
void intel_init_pch_refclk(struct drm_i915_private *dev_priv); void intel_init_pch_refclk(struct drm_i915_private *dev_priv);
......
...@@ -255,24 +255,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915) ...@@ -255,24 +255,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)
return ret; return ret;
} }
/* part #1: call before irq uninstall */
static void i915_driver_modeset_remove(struct drm_i915_private *i915)
{
intel_modeset_driver_remove(i915);
}
/* part #2: call after irq uninstall */
static void i915_driver_modeset_remove_noirq(struct drm_i915_private *i915)
{
intel_csr_ucode_fini(i915);
intel_power_domains_driver_remove(i915);
intel_vga_unregister(i915);
intel_bios_driver_remove(i915);
}
static void intel_init_dpio(struct drm_i915_private *dev_priv) static void intel_init_dpio(struct drm_i915_private *dev_priv)
{ {
/* /*
...@@ -966,7 +948,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -966,7 +948,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
out_cleanup_irq: out_cleanup_irq:
intel_irq_uninstall(i915); intel_irq_uninstall(i915);
out_cleanup_modeset: out_cleanup_modeset:
i915_driver_modeset_remove_noirq(i915); intel_modeset_driver_remove_nogem(i915);
out_cleanup_hw: out_cleanup_hw:
i915_driver_hw_remove(i915); i915_driver_hw_remove(i915);
intel_memory_regions_driver_release(i915); intel_memory_regions_driver_release(i915);
...@@ -998,7 +980,7 @@ void i915_driver_remove(struct drm_i915_private *i915) ...@@ -998,7 +980,7 @@ void i915_driver_remove(struct drm_i915_private *i915)
intel_gvt_driver_remove(i915); intel_gvt_driver_remove(i915);
i915_driver_modeset_remove(i915); intel_modeset_driver_remove(i915);
intel_irq_uninstall(i915); intel_irq_uninstall(i915);
...@@ -1007,7 +989,7 @@ void i915_driver_remove(struct drm_i915_private *i915) ...@@ -1007,7 +989,7 @@ void i915_driver_remove(struct drm_i915_private *i915)
i915_reset_error_state(i915); i915_reset_error_state(i915);
i915_gem_driver_remove(i915); i915_gem_driver_remove(i915);
i915_driver_modeset_remove_noirq(i915); intel_modeset_driver_remove_nogem(i915);
i915_driver_hw_remove(i915); i915_driver_hw_remove(i915);
......
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