aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_drv.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-07-18 20:51:42 -0400
committerBen Skeggs <bskeggs@redhat.com>2012-10-02 23:12:54 -0400
commite193b1d42c390bf1bff7fa02a5a1202b98e75601 (patch)
treec31143ea95c00e8b49c12571b10a1b9a200bd490 /drivers/gpu/drm/nouveau/nouveau_drv.c
parent66f247234d1c47da480f687b8104d8935d05b404 (diff)
drm/nouveau/fence: un-port from nouveau_exec_engine interfaces
Still the same code, but not an "engine" anymore. The fence code is more of a policy decision rather than exposing mechanisms, so it's not appropriate to port it to the new engine subsystem. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
index 4b90f12575b9..db150d9e0cd4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -33,6 +33,7 @@
33#include "nouveau_hw.h" 33#include "nouveau_hw.h"
34#include "nouveau_fb.h" 34#include "nouveau_fb.h"
35#include "nouveau_fbcon.h" 35#include "nouveau_fbcon.h"
36#include "nouveau_fence.h"
36#include "nouveau_pm.h" 37#include "nouveau_pm.h"
37#include <engine/fifo.h> 38#include <engine/fifo.h>
38#include "nv50_display.h" 39#include "nv50_display.h"
@@ -149,6 +150,7 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
149 struct drm_device *dev = pci_get_drvdata(pdev); 150 struct drm_device *dev = pci_get_drvdata(pdev);
150 struct drm_nouveau_private *dev_priv = dev->dev_private; 151 struct drm_nouveau_private *dev_priv = dev->dev_private;
151 struct nouveau_fifo_priv *pfifo = nv_engine(dev, NVOBJ_ENGINE_FIFO); 152 struct nouveau_fifo_priv *pfifo = nv_engine(dev, NVOBJ_ENGINE_FIFO);
153 struct nouveau_fence_priv *fence = dev_priv->fence.func;
152 struct nouveau_channel *chan; 154 struct nouveau_channel *chan;
153 struct drm_crtc *crtc; 155 struct drm_crtc *crtc;
154 int ret, i, e; 156 int ret, i, e;
@@ -188,6 +190,11 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
188 nouveau_channel_idle(chan); 190 nouveau_channel_idle(chan);
189 } 191 }
190 192
193 if (fence->suspend) {
194 if (!fence->suspend(dev))
195 return -ENOMEM;
196 }
197
191 for (e = NVOBJ_ENGINE_NR - 1; e >= 0; e--) { 198 for (e = NVOBJ_ENGINE_NR - 1; e >= 0; e--) {
192 if (!dev_priv->eng[e]) 199 if (!dev_priv->eng[e])
193 continue; 200 continue;
@@ -216,6 +223,7 @@ nouveau_pci_resume(struct pci_dev *pdev)
216 struct drm_device *dev = pci_get_drvdata(pdev); 223 struct drm_device *dev = pci_get_drvdata(pdev);
217 struct nouveau_fifo_priv *pfifo = nv_engine(dev, NVOBJ_ENGINE_FIFO); 224 struct nouveau_fifo_priv *pfifo = nv_engine(dev, NVOBJ_ENGINE_FIFO);
218 struct drm_nouveau_private *dev_priv = dev->dev_private; 225 struct drm_nouveau_private *dev_priv = dev->dev_private;
226 struct nouveau_fence_priv *fence = dev_priv->fence.func;
219 struct nouveau_engine *engine = &dev_priv->engine; 227 struct nouveau_engine *engine = &dev_priv->engine;
220 struct drm_crtc *crtc; 228 struct drm_crtc *crtc;
221 int ret, i; 229 int ret, i;
@@ -234,6 +242,9 @@ nouveau_pci_resume(struct pci_dev *pdev)
234 dev_priv->eng[i]->init(dev, i); 242 dev_priv->eng[i]->init(dev, i);
235 } 243 }
236 244
245 if (fence->resume)
246 fence->resume(dev);
247
237 nouveau_irq_postinstall(dev); 248 nouveau_irq_postinstall(dev);
238 249
239 /* Re-write SKIPS, they'll have been lost over the suspend */ 250 /* Re-write SKIPS, they'll have been lost over the suspend */