All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau: idle all channels before suspending
@ 2013-04-08 12:04 Maarten Lankhorst
       [not found] ` <5162B231.2060900-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Maarten Lankhorst @ 2013-04-08 12:04 UTC (permalink / raw)
  To: nouveau; +Cc: dri-devel@lists.freedesktop.org

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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-09  6:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 12:04 [PATCH] drm/nouveau: idle all channels before suspending Maarten Lankhorst
     [not found] ` <5162B231.2060900-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2013-04-08 23:14   ` Ben Skeggs
2013-04-09  6:44     ` Maarten Lankhorst

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.