Skip to contentSkip to conversation

bogus cs utilities

RFC New Jerome Glisse 2 participants 3 messages Jan 28, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Attached is a patch which add a bogus cs capture utilities. Call radeon_bogus_add_ib each time you face a bogus ib then userspace can dump all the ib by using the radeon_ib_bogus debugfs file. It will dump the oldest bogus ib recorded, each dump on the file will dump the next ib.

I am using this trying to understand lockup. It might be a good feature for 2.6.34.

Cheers,
Jerome

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--

#1 lore raw

PATCH 2/3 drm/radeon/kms: bogus cs recorder utilities

This add an utilities function radeon_ib_bogus_add which will save an ib into a list of ib which can then be dumped using debugfs. Once dumped the ib is removed from the list. This should allow to save & capute ib for further debugging.

---
 drivers/gpu/drm/radeon/radeon.h      |    2 +
 drivers/gpu/drm/radeon/radeon_ring.c |   66 ++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/radeon.h +2 -0
index 9e2eefc..2ba8298 100644
@@ -378,6 +378,7 @@ struct radeon_ib_pool {
 	struct mutex		mutex;
 	struct radeon_bo	*robj;
 	struct list_head	scheduled_ibs;
+	struct list_head	bogus_ib;
 	struct radeon_ib	ibs[RADEON_IB_POOL_SIZE];
 	bool			ready;
 	DECLARE_BITMAP(alloc_bm, RADEON_IB_POOL_SIZE);
@@ -432,6 +433,7 @@ int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib);
 int radeon_ib_pool_init(struct radeon_device *rdev);
 void radeon_ib_pool_fini(struct radeon_device *rdev);
 int radeon_ib_test(struct radeon_device *rdev);
+extern void radeon_ib_bogus_add(struct radeon_device *rdev, struct radeon_ib *ib);
 /* Ring access between begin & end cannot sleep */
 void radeon_ring_free_size(struct radeon_device *rdev);
 int radeon_ring_lock(struct radeon_device *rdev, unsigned ndw);
drivers/gpu/drm/radeon/radeon_ring.c +66 -0

99 lines not on this page · raw message

Signature · 10 lines
1.6.6


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
#2 lore raw
In reply to Jerome Glisse
Quoted 6 lines · Jerome Glisse

Attached is a patch which add a bogus cs capture utilities. Call radeon_bogus_add_ib each time you face a bogus ib then userspace can dump all the ib by using the radeon_ib_bogus debugfs file. It will dump the oldest bogus ib recorded, each dump on the file will dump the next ib.

Quoted 6 lines

I am using this trying to understand lockup. It might be a good feature for 2.6.34.

Cheers,
Jerome

Once again patch was missing :(

Quoted 1 line

From cafe66113c5d942901da804d5cdffa63b130217b Mon Sep 17 00:00:00 2001

From: Jerome Glisse <[email protected]>
Date: Thu, 28 Jan 2010 18:22:31 +0100
Subject: [PATCH 2/3] drm/radeon/kms: bogus cs recorder utilities

This add an utilities function radeon_ib_bogus_add which will save an ib into a list of ib which can then be dumped using debugfs. Once dumped the ib is removed from the list. This should allow to save & capute ib for further debugging.

---
 drivers/gpu/drm/radeon/radeon.h      |    2 +
 drivers/gpu/drm/radeon/radeon_ring.c |   66 ++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/radeon.h +2 -0
index 9e2eefc..2ba8298 100644
@@ -378,6 +378,7 @@ struct radeon_ib_pool {
 	struct mutex		mutex;
 	struct radeon_bo	*robj;
 	struct list_head	scheduled_ibs;
+	struct list_head	bogus_ib;
 	struct radeon_ib	ibs[RADEON_IB_POOL_SIZE];
 	bool			ready;
 	DECLARE_BITMAP(alloc_bm, RADEON_IB_POOL_SIZE);
@@ -432,6 +433,7 @@ int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib);
 int radeon_ib_pool_init(struct radeon_device *rdev);
 void radeon_ib_pool_fini(struct radeon_device *rdev);
 int radeon_ib_test(struct radeon_device *rdev);
+extern void radeon_ib_bogus_add(struct radeon_device *rdev, struct radeon_ib *ib);
 /* Ring access between begin & end cannot sleep */
 void radeon_ring_free_size(struct radeon_device *rdev);
 int radeon_ring_lock(struct radeon_device *rdev, unsigned ndw);
drivers/gpu/drm/radeon/radeon_ring.c +66 -0

99 lines not on this page · raw message

Signature · 1 line
1.6.6

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com

--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel