All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: [PATCH 3/3] drm/i915: unregister interfaces first in unload
Date: Sat, 15 Jul 2017 00:46:56 +0200	[thread overview]
Message-ID: <20170714224656.6431-3-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20170714224656.6431-1-daniel.vetter@ffwll.ch>

We first need to make sure no one else can get at us anymore,
before we can proceed to tear down all the datastructures.

Just a small step towards eventually the perfect unload code ...

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 2c2afb19975d..38990b264b97 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1372,6 +1372,8 @@ void i915_driver_unload(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	struct pci_dev *pdev = dev_priv->drm.pdev;
 
+	i915_driver_unregister(dev_priv);
+
 	if (i915_gem_suspend(dev_priv))
 		DRM_ERROR("failed to idle hardware; continuing to unload!\n");
 
@@ -1381,8 +1383,6 @@ void i915_driver_unload(struct drm_device *dev)
 
 	intel_gvt_cleanup(dev_priv);
 
-	i915_driver_unregister(dev_priv);
-
 	intel_modeset_cleanup(dev);
 
 	/*
-- 
2.13.2

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

  parent reply	other threads:[~2017-07-14 22:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14 22:46 [PATCH 1/3] drm/atomic-helper: Fix leak in disable_all Daniel Vetter
2017-07-14 22:46 ` [PATCH 2/3] drm/i915: Fix fbdev unload sequence Daniel Vetter
2017-07-14 22:46 ` Daniel Vetter [this message]
2017-07-14 23:06 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/atomic-helper: Fix leak in disable_all Patchwork
2017-07-15  9:31 ` [PATCH] " Daniel Vetter
2017-07-17  9:39   ` [Intel-gfx] " Maarten Lankhorst
2017-07-17 15:21     ` Daniel Vetter
2017-07-19 10:15       ` Maarten Lankhorst
2017-07-15  9:51 ` ✓ Fi.CI.BAT: success for series starting with drm/atomic-helper: Fix leak in disable_all (rev2) Patchwork
2017-07-15 10:10 ` [PATCH 1/3] drm/atomic-helper: Fix leak in disable_all Chris Wilson
2017-07-15 11:03   ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2017-07-14 19:14 Daniel Vetter
2017-07-14 19:14 ` [PATCH 3/3] drm/i915: unregister interfaces first in unload Daniel Vetter
2017-07-14 19:35   ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170714224656.6431-3-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.