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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_drv.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

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. */
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux