summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-02-18 14:13:29 +0100
committerDave Airlie <airlied@redhat.com>2010-02-19 22:35:18 +0100
commit7d404c7b5f4c004712bc15ed6e6edd6779842126 (patch)
tree1736892b1d1a20eed4422f82fd6b6977253eab4b /drivers
parentdrm/ttm: fix caching problem on non-PAT systems. (diff)
downloadlinux-7d404c7b5f4c004712bc15ed6e6edd6779842126.tar.xz
linux-7d404c7b5f4c004712bc15ed6e6edd6779842126.zip
drm/radeon/kms: free fence IB if it wasn't emited at IB free time
If at IB free time fence wasn't emited that means the IB wasn't scheduled because an error occured somewhere, thus we can free then fence and mark the IB as free. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ring.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index 694799f6fac1..6579eb4c1f28 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -100,6 +100,8 @@ void radeon_ib_free(struct radeon_device *rdev, struct radeon_ib **ib)
if (tmp == NULL) {
return;
}
+ if (!tmp->fence->emited)
+ radeon_fence_unref(&tmp->fence);
mutex_lock(&rdev->ib_pool.mutex);
tmp->free = true;
mutex_unlock(&rdev->ib_pool.mutex);