drm/radeon/kms: free fence IB if it wasn't emited at IB free time
diff mbox

Message ID 1266498809-14112-1-git-send-email-jglisse@redhat.com
State New, archived
Headers show

Commit Message

Jerome Glisse Feb. 18, 2010, 1:13 p.m. UTC
None

Patch
diff mbox

diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index 38fa144..95c991a 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -130,6 +130,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);