All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/radeon: stop the leaks in cik_ib_test
@ 2013-10-14  9:32 Christian König
  2013-10-14  9:32 ` [PATCH 2/2] drm/radeon: rework and fix reset detection v2 Christian König
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Christian König @ 2013-10-14  9:32 UTC (permalink / raw)
  To: dri-devel

From: Christian König <christian.koenig@amd.com>

Stop leaking IB memory and scratch register space when the test fails.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/radeon/cik.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index b874ccd..8f393df 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -3182,6 +3182,7 @@ int cik_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
 	r = radeon_ib_get(rdev, ring->idx, &ib, NULL, 256);
 	if (r) {
 		DRM_ERROR("radeon: failed to get ib (%d).\n", r);
+		radeon_scratch_free(rdev, scratch);
 		return r;
 	}
 	ib.ptr[0] = PACKET3(PACKET3_SET_UCONFIG_REG, 1);
@@ -3198,6 +3199,8 @@ int cik_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
 	r = radeon_fence_wait(ib.fence, false);
 	if (r) {
 		DRM_ERROR("radeon: fence wait failed (%d).\n", r);
+		radeon_scratch_free(rdev, scratch);
+		radeon_ib_free(rdev, &ib);
 		return r;
 	}
 	for (i = 0; i < rdev->usec_timeout; i++) {
-- 
1.8.1.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-16 11:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-14  9:32 [PATCH 1/2] drm/radeon: stop the leaks in cik_ib_test Christian König
2013-10-14  9:32 ` [PATCH 2/2] drm/radeon: rework and fix reset detection v2 Christian König
2013-10-14 13:20   ` Dieter Nützel
2013-10-14 17:35 ` [PATCH 1/2] drm/radeon: stop the leaks in cik_ib_test Alex Deucher
2013-10-14 19:13 ` Marek Olšák
2013-10-14 19:34   ` Marek Olšák
2013-10-15  9:11     ` Christian König
2013-10-15 10:57       ` Marek Olšák
2013-10-16 11:31         ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.