summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_object.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_object.c
parent38cf189fa13e988f85efb6de26315e762cecc260 (diff)
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_object.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_object.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c
index 2fb7e9d47500..24540862a23f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_object.c
+++ b/drivers/gpu/drm/nouveau/nouveau_object.c
@@ -1017,6 +1017,9 @@ int nouveau_ioctl_gpuobj_free(struct drm_device *dev, void *data,
if (IS_ERR(chan))
return PTR_ERR(chan);
+ /* Synchronize with the user channel */
+ nouveau_channel_idle(chan);
+
ret = nouveau_ramht_remove(chan, objfree->handle);
nouveau_channel_put(&chan);
return ret;