From: Rodrigo Vivi <rodrigo.vivi@gmail.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/6] drm/i915: Do hw quiescing first during unload
Date: Mon, 2 Dec 2013 11:26:07 -0200 [thread overview]
Message-ID: <1385990771-3877-3-git-send-email-rodrigo.vivi@gmail.com> (raw)
In-Reply-To: <1385990771-3877-1-git-send-email-rodrigo.vivi@gmail.com>
From: Chris Wilson <chris@chris-wilson.co.uk>
If we force the hw to idle as our first step during unload, we can abort
the unload upon failure. Later we can probe whether the hardware remain
active even after we try to shut it down.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
---
drivers/gpu/drm/i915/i915_dma.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 89e4cf1..a5d010c 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1702,6 +1702,12 @@ int i915_driver_unload(struct drm_device *dev)
struct drm_i915_private *dev_priv = dev->dev_private;
int ret;
+ ret = i915_gem_suspend(dev);
+ if (ret) {
+ DRM_ERROR("failed to idle hardware: %d\n", ret);
+ return ret;
+ }
+
intel_gpu_ips_teardown();
/* The i915.ko module is still not prepared to be loaded when
@@ -1715,10 +1721,6 @@ int i915_driver_unload(struct drm_device *dev)
if (dev_priv->mm.inactive_shrinker.scan_objects)
unregister_shrinker(&dev_priv->mm.inactive_shrinker);
- ret = i915_gem_suspend(dev);
- if (ret)
- DRM_ERROR("failed to idle hardware: %d\n", ret);
-
io_mapping_free(dev_priv->gtt.mappable);
arch_phys_wc_del(dev_priv->gtt.mtrr);
--
1.8.3.1
next prev parent reply other threads:[~2013-12-02 13:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 13:26 [PATCH 0/6] drm-intel-collector - update Rodrigo Vivi
2013-12-02 13:26 ` [PATCH 1/6] drm/i915: Asynchronously perform the set-base for a simple modeset Rodrigo Vivi
2013-12-02 13:26 ` Rodrigo Vivi [this message]
2013-12-05 11:49 ` [PATCH 2/6] drm/i915: Do hw quiescing first during unload Daniel Vetter
2013-12-02 13:26 ` [PATCH 3/6] drm/i915: Downgrade pipe state mismatches to DRM_DEBUG_KMS Rodrigo Vivi
2013-12-05 11:49 ` Daniel Vetter
2013-12-02 13:26 ` [PATCH 4/6] drm/i915: use __packed instead of __attribute__((packed)) Rodrigo Vivi
2013-12-03 11:34 ` Damien Lespiau
2013-12-02 13:26 ` [PATCH 5/6] drm/i915: parse backlight modulation frequency from the BIOS VBT Rodrigo Vivi
2013-12-06 12:45 ` Rodrigo Vivi
2013-12-02 13:26 ` [PATCH 6/6] drm/i915: i830M has watermarks like i855 Rodrigo Vivi
2013-12-02 14:27 ` Thomas Richter
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=1385990771-3877-3-git-send-email-rodrigo.vivi@gmail.com \
--to=rodrigo.vivi@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox