Patchwork [3.5.y.z,extended,stable] Patch "drm/nv17-50: restore fence buffer on resume" has been added to staging queue

mail settings
Submitter Herton Ronaldo Krzesinski
Date Jan. 23, 2013, 4:44 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/214780/
State New
Headers show


Herton Ronaldo Krzesinski - Jan. 23, 2013, 4:44 a.m.
This is a note to let you know that I have just added a patch titled

    drm/nv17-50: restore fence buffer on resume

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 2668ab49d95047c1e9d0db5c9bcc7efd53ab0008 Mon Sep 17 00:00:00 2001
From: Marcin Slusarz <>
Date: Tue, 25 Dec 2012 18:13:22 +0100
Subject: [PATCH] drm/nv17-50: restore fence buffer on resume

commit f20ebd034eab43fd38c58b11c5bb5fb125e5f7d7 upstream.

Since commit 5e120f6e4b3f35b741c5445dfc755f50128c3c44 "drm/nouveau/fence:
convert to exec engine, and improve channel sync" nouveau fence sync
implementation for nv17-50 and nvc0+ started to rely on state of fence buffer
left by previous sync operation. But as pinned bo's (where fence state is
stored) are not saved+restored across suspend/resume, we need to do it

nvc0+ was fixed by commit d6ba6d215a538a58f0f0026f0961b0b9125e8042
"drm/nvc0/fence: restore pre-suspend fence buffer context on resume".


Signed-off-by: Marcin Slusarz <>
Signed-off-by: Ben Skeggs <>
[ herton: backport for 3.5, looks like we only need to call
  nouveau_bo_wr32 on nv10_fence_init ]
Signed-off-by: Herton Ronaldo Krzesinski <>
 drivers/gpu/drm/nouveau/nv10_fence.c |    3 +++
 1 file changed, 3 insertions(+)



diff --git a/drivers/gpu/drm/nouveau/nv10_fence.c b/drivers/gpu/drm/nouveau/nv10_fence.c
index 8a1b750..18932a6 100644
--- a/drivers/gpu/drm/nouveau/nv10_fence.c
+++ b/drivers/gpu/drm/nouveau/nv10_fence.c
@@ -155,6 +155,9 @@  nv10_fence_fini(struct drm_device *dev, int engine, bool suspend)
 static int
 nv10_fence_init(struct drm_device *dev, int engine)
+	struct nv10_fence_priv *priv = nv_engine(dev, engine);
+	nouveau_bo_wr32(priv->bo, 0, priv->sequence);
 	return 0;