aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_drv.c
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-11-18 23:57:46 +0100
committerFrancisco Jerez <currojerez@riseup.net>2010-12-08 03:00:23 +0100
commit6dccd311dd4b104b3bc53cb67aef414141d11c9f (patch)
tree98cbd0546c1081c76d29184aa7f2510fe19f8f60 /drivers/gpu/drm/nouveau/nouveau_drv.c
parent38cf189fa13e988f85efb6de26315e762cecc260 (diff)
downloadkernel_samsung_smdk4412-6dccd311dd4b104b3bc53cb67aef414141d11c9f.zip
kernel_samsung_smdk4412-6dccd311dd4b104b3bc53cb67aef414141d11c9f.tar.gz
kernel_samsung_smdk4412-6dccd311dd4b104b3bc53cb67aef414141d11c9f.tar.bz2
drm/nouveau: Synchronize with the user channel before GPU object destruction.
There have been reports of PFIFO cache errors during context take down (fdo bug 31637). They are caused by some GPU objects being taken out while the channel is still potentially processing commands. Make sure that all the previous rendering has landed before releasing a GPU object. Reported-by: Grzesiek Sójka <pld@pfu.pl> Reported-by: Patrice Mandin <patmandin@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Acked-by: Ben Skeggs <bskeggs@redhat.com> 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.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
index 7ff5b43..a48c7da 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -197,22 +197,10 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
NV_INFO(dev, "Idling channels...\n");
for (i = 0; i < pfifo->channels; i++) {
- struct nouveau_fence *fence = NULL;
-
chan = dev_priv->channels.ptr[i];
- if (!chan || !chan->pushbuf_bo)
- continue;
-
- ret = nouveau_fence_new(chan, &fence, true);
- if (ret == 0) {
- ret = nouveau_fence_wait(fence, false, false);
- nouveau_fence_unref(&fence);
- }
- if (ret) {
- NV_ERROR(dev, "Failed to idle channel %d for suspend\n",
- chan->id);
- }
+ if (chan && chan->pushbuf_bo)
+ nouveau_channel_idle(chan);
}
pgraph->fifo_access(dev, false);