From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
To: nouveau@lists.freedesktop.org
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: [PATCH] drm/nouveau: idle all channels before suspending
Date: Mon, 08 Apr 2013 14:04:01 +0200 [thread overview]
Message-ID: <5162B231.2060900@canonical.com> (raw)
Seems to make suspend slightly more reliable on my system.
Cc: stable@vger.kernel.org [3.7+]
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
---
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index b6bdc9f..5032c31 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -464,6 +464,23 @@ nouveau_do_suspend(struct drm_device *dev)
NV_INFO(drm, "evicting buffers...\n");
ttm_bo_evict_mm(&drm->ttm.bdev, TTM_PL_VRAM);
+ list_for_each_entry(cli, &drm->clients, head) {
+ struct nouveau_abi16 *abi16 = cli->abi16;
+ struct nouveau_abi16_chan *chan;
+
+ if (!abi16)
+ continue;
+
+ list_for_each_entry(chan, &abi16->channels, head)
+ nouveau_channel_idle(chan->chan);
+ }
+
+ if (drm->channel)
+ nouveau_channel_idle(drm->channel);
+
+ if (drm->cechan)
+ nouveau_channel_idle(drm->cechan);
+
if (drm->fence && nouveau_fence(drm)->suspend) {
if (!nouveau_fence(drm)->suspend(drm))
return -ENOMEM;
next reply other threads:[~2013-04-08 12:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 12:04 Maarten Lankhorst [this message]
[not found] ` <5162B231.2060900-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2013-04-08 23:14 ` [PATCH] drm/nouveau: idle all channels before suspending Ben Skeggs
2013-04-09 6:44 ` Maarten Lankhorst
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=5162B231.2060900@canonical.com \
--to=maarten.lankhorst@canonical.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=nouveau@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.