[08/13] drm/i915: split i915_driver_modeset_remove() to pre/post irq uninstall

Submitted by Jani Nikula on Sept. 19, 2019, 2:03 p.m.

Details

Message ID 332eb864c73e2f04681ac5b8b330a0501521a2f6.1568901239.git.jani.nikula@intel.com
State New
Headers show
Series "drm/i915: modeset probe/remove path refactoring" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Jani Nikula Sept. 19, 2019, 2:03 p.m.
Push irq uninstall further up, by splitting i915_driver_modeset_remove()
to two, the part with working irqs before irq uninstall, and the part
after irq uninstall. No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index f2af3ba24ce9..e10d3ce5db09 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -422,13 +422,16 @@  static int i915_driver_modeset_probe(struct drm_i915_private *i915)
 	return ret;
 }
 
-static void i915_driver_modeset_remove(struct drm_i915_private *i915)
+/* part #1: call before irq uninstall */
+static void i915_driver_modeset_remove_irq(struct drm_i915_private *i915)
 {
-	struct pci_dev *pdev = i915->drm.pdev;
-
 	intel_modeset_driver_remove_irq(i915);
+}
 
-	intel_irq_uninstall(i915);
+/* part #2: call after irq uninstall */
+static void i915_driver_modeset_remove(struct drm_i915_private *i915)
+{
+	struct pci_dev *pdev = i915->drm.pdev;
 
 	intel_modeset_driver_remove(i915);
 
@@ -1624,6 +1627,10 @@  void i915_driver_remove(struct drm_i915_private *i915)
 
 	intel_gvt_driver_remove(i915);
 
+	i915_driver_modeset_remove_irq(i915);
+
+	intel_irq_uninstall(i915);
+
 	i915_driver_modeset_remove(i915);
 
 	/* Free error state after interrupts are fully disabled. */