[PATCH 22/24] drm/radeon: extend ring debugfs files with fence info c2

j.glisse at gmail.com j.glisse at gmail.com
Wed Apr 25 12:03:27 PDT 2012


From: Christian König <deathsimple at vodafone.de>

That should aid in debugging multi ring lockups.

v2 rebase on top of debugfs removal

Signed-off-by: Christian König <deathsimple at vodafone.de>
---
 drivers/gpu/drm/radeon/radeon.h       |    1 +
 drivers/gpu/drm/radeon/radeon_fence.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 91b48ac..6377f8c 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -233,6 +233,7 @@ struct radeon_fence {
 	bool				signaled;
 	/* RB, DMA, etc. */
 	int				ring;
+	unsigned			emitted_at;
 	struct radeon_semaphore		*semaphore;
 	struct radeon_ib		*ib;
 };
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 2868eda..2e56101 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -71,6 +71,7 @@ int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence *fence)
 		return 0;
 	}
 	fence->seq = atomic_add_return(1, &rdev->fence_drv[fence->ring].seq);
+	fence->emitted_at = rdev->ring[fence->ring].wptr;
 	radeon_fence_ring_emit(rdev, fence->ring, fence);
 	trace_radeon_fence_emit(rdev->ddev, fence->seq);
 	fence->emitted = true;
-- 
1.7.7.6



More information about the dri-devel mailing list