summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-11-13 15:18:32 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-04 10:57:14 -0800
commit31278c7029bfeb279e367a437ddeeb45307321a7 (patch)
treefe46e60b448279bbfce84c55ad0a0355debd2d45
parent0c405f5ffe3415927a937fec905393cae640e24e (diff)
downloadlinux-3.10-31278c7029bfeb279e367a437ddeeb45307321a7.tar.gz
linux-3.10-31278c7029bfeb279e367a437ddeeb45307321a7.tar.bz2
linux-3.10-31278c7029bfeb279e367a437ddeeb45307321a7.zip
drm/nouveau: when bailing out of a pushbuf ioctl, do not remove previous fence
commit 9360bd1112d8874d21942e2ae74f5416b00a8db6 upstream. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index b4b4d0c1f4a..5bccf31cc97 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -287,7 +287,8 @@ validate_fini_list(struct list_head *list, struct nouveau_fence *fence)
list_for_each_safe(entry, tmp, list) {
nvbo = list_entry(entry, struct nouveau_bo, entry);
- nouveau_bo_fence(nvbo, fence);
+ if (likely(fence))
+ nouveau_bo_fence(nvbo, fence);
if (unlikely(nvbo->validate_mapped)) {
ttm_bo_kunmap(&nvbo->kmap);