aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_ring.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-02-18 06:37:50 -0500
committerChristian König <christian.koenig@amd.com>2014-02-18 11:50:00 -0500
commit2d2fe3f9b60fd3cc9a19dcc3ae892a23825da07f (patch)
treec2bbdb57e1d33b271b84a1eb9463ad073f7c0f4a /drivers/gpu/drm/radeon/radeon_ring.c
parentff212f25feb44a915ce9c0144faef7fae27a6e61 (diff)
drm/radeon: drop radeon_ring_force_activity
The reason for the false positives was fixed quite some time ago and since most engines can still execute NOPs while being locked up it leads to false negatives. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ring.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ring.c38
1 files changed, 1 insertions, 37 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index 0f78789d085a..668097abb424 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -479,28 +479,6 @@ void radeon_ring_unlock_undo(struct radeon_device *rdev, struct radeon_ring *rin
479} 479}
480 480
481/** 481/**
482 * radeon_ring_force_activity - add some nop packets to the ring
483 *
484 * @rdev: radeon_device pointer
485 * @ring: radeon_ring structure holding ring information
486 *
487 * Add some nop packets to the ring to force activity (all asics).
488 * Used for lockup detection to see if the rptr is advancing.
489 */
490void radeon_ring_force_activity(struct radeon_device *rdev, struct radeon_ring *ring)
491{
492 int r;
493
494 if (radeon_ring_get_rptr(rdev, ring) == ring->wptr) {
495 r = radeon_ring_alloc(rdev, ring, 1);
496 if (!r) {
497 radeon_ring_write(ring, ring->nop);
498 radeon_ring_commit(rdev, ring);
499 }
500 }
501}
502
503/**
504 * radeon_ring_lockup_update - update lockup variables 482 * radeon_ring_lockup_update - update lockup variables
505 * 483 *
506 * @ring: radeon_ring structure holding ring information 484 * @ring: radeon_ring structure holding ring information
@@ -519,21 +497,7 @@ void radeon_ring_lockup_update(struct radeon_device *rdev,
519 * @rdev: radeon device structure 497 * @rdev: radeon device structure
520 * @ring: radeon_ring structure holding ring information 498 * @ring: radeon_ring structure holding ring information
521 * 499 *
522 * We don't need to initialize the lockup tracking information as we will either 500 */
523 * have CP rptr to a different value of jiffies wrap around which will force
524 * initialization of the lockup tracking informations.
525 *
526 * A possible false positivie is if we get call after while and last_cp_rptr ==
527 * the current CP rptr, even if it's unlikely it might happen. To avoid this
528 * if the elapsed time since last call is bigger than 2 second than we return
529 * false and update the tracking information. Due to this the caller must call
530 * radeon_ring_test_lockup several time in less than 2sec for lockup to be reported
531 * the fencing code should be cautious about that.
532 *
533 * Caller should write to the ring to force CP to do something so we don't get
534 * false positive when CP is just gived nothing to do.
535 *
536 **/
537bool radeon_ring_test_lockup(struct radeon_device *rdev, struct radeon_ring *ring) 501bool radeon_ring_test_lockup(struct radeon_device *rdev, struct radeon_ring *ring)
538{ 502{
539 uint32_t rptr = radeon_ring_get_rptr(rdev, ring); 503 uint32_t rptr = radeon_ring_get_rptr(rdev, ring);