[PATCH] drm/nouveau: idle all channels before suspending

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

 



Seems to make suspend slightly more reliable on my system.

Cc: stable@xxxxxxxxxxxxxxx [3.7+]
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxx>
---
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;

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux