diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-07-19 10:51:42 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-03 13:12:54 +1000 |
commit | e193b1d42c390bf1bff7fa02a5a1202b98e75601 (patch) | |
tree | c31143ea95c00e8b49c12571b10a1b9a200bd490 /drivers/gpu/drm/nouveau/nouveau_drv.c | |
parent | 66f247234d1c47da480f687b8104d8935d05b404 (diff) | |
download | linux-e193b1d42c390bf1bff7fa02a5a1202b98e75601.tar.bz2 |
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.c | 11 |
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 @@ #include "nouveau_hw.h" #include "nouveau_fb.h" #include "nouveau_fbcon.h" +#include "nouveau_fence.h" #include "nouveau_pm.h" #include <engine/fifo.h> #include "nv50_display.h" @@ -149,6 +150,7 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state) struct drm_device *dev = pci_get_drvdata(pdev); struct drm_nouveau_private *dev_priv = dev->dev_private; struct nouveau_fifo_priv *pfifo = nv_engine(dev, NVOBJ_ENGINE_FIFO); + struct nouveau_fence_priv *fence = dev_priv->fence.func; struct nouveau_channel *chan; struct drm_crtc *crtc; int ret, i, e; @@ -188,6 +190,11 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state) nouveau_channel_idle(chan); } + if (fence->suspend) { + if (!fence->suspend(dev)) + return -ENOMEM; + } + for (e = NVOBJ_ENGINE_NR - 1; e >= 0; e--) { if (!dev_priv->eng[e]) continue; @@ -216,6 +223,7 @@ nouveau_pci_resume(struct pci_dev *pdev) struct drm_device *dev = pci_get_drvdata(pdev); struct nouveau_fifo_priv *pfifo = nv_engine(dev, NVOBJ_ENGINE_FIFO); struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_fence_priv *fence = dev_priv->fence.func; struct nouveau_engine *engine = &dev_priv->engine; struct drm_crtc *crtc; int ret, i; @@ -234,6 +242,9 @@ nouveau_pci_resume(struct pci_dev *pdev) dev_priv->eng[i]->init(dev, i); } + if (fence->resume) + fence->resume(dev); + nouveau_irq_postinstall(dev); /* Re-write SKIPS, they'll have been lost over the suspend */ |