aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-01-24 11:37:19 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-01-31 16:24:57 -0500
commit123bc1832c33218dfa677a88c2c54bc1a48a9e72 (patch)
tree5ad2423f6e4752d7db0120b8ecb4af6a83a00df2 /drivers/gpu/drm/radeon/r600.c
parentf770d78ac159a96071e3c4e4ab97c262e79506d3 (diff)
drm/radeon: use the reset mask to determine if rings are hung
fetch the reset mask and check if the relevant ring flags are set to determine whether the ring is hung or not. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r--drivers/gpu/drm/radeon/r600.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index abb143c0bdca..3f292765aea8 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1537,16 +1537,22 @@ int r600_asic_reset(struct radeon_device *rdev)
1537 return 0; 1537 return 0;
1538} 1538}
1539 1539
1540bool r600_gpu_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring) 1540/**
1541 * r600_gfx_is_lockup - Check if the GFX engine is locked up
1542 *
1543 * @rdev: radeon_device pointer
1544 * @ring: radeon_ring structure holding ring information
1545 *
1546 * Check if the GFX engine is locked up.
1547 * Returns true if the engine appears to be locked up, false if not.
1548 */
1549bool r600_gfx_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring)
1541{ 1550{
1542 u32 srbm_status; 1551 u32 reset_mask = r600_gpu_check_soft_reset(rdev);
1543 u32 grbm_status; 1552
1544 u32 grbm_status2; 1553 if (!(reset_mask & (RADEON_RESET_GFX |
1545 1554 RADEON_RESET_COMPUTE |
1546 srbm_status = RREG32(R_000E50_SRBM_STATUS); 1555 RADEON_RESET_CP))) {
1547 grbm_status = RREG32(R_008010_GRBM_STATUS);
1548 grbm_status2 = RREG32(R_008014_GRBM_STATUS2);
1549 if (!G_008010_GUI_ACTIVE(grbm_status)) {
1550 radeon_ring_lockup_update(ring); 1556 radeon_ring_lockup_update(ring);
1551 return false; 1557 return false;
1552 } 1558 }
@@ -1561,15 +1567,14 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring)
1561 * @rdev: radeon_device pointer 1567 * @rdev: radeon_device pointer
1562 * @ring: radeon_ring structure holding ring information 1568 * @ring: radeon_ring structure holding ring information
1563 * 1569 *
1564 * Check if the async DMA engine is locked up (r6xx-evergreen). 1570 * Check if the async DMA engine is locked up.
1565 * Returns true if the engine appears to be locked up, false if not. 1571 * Returns true if the engine appears to be locked up, false if not.
1566 */ 1572 */
1567bool r600_dma_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring) 1573bool r600_dma_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring)
1568{ 1574{
1569 u32 dma_status_reg; 1575 u32 reset_mask = r600_gpu_check_soft_reset(rdev);
1570 1576
1571 dma_status_reg = RREG32(DMA_STATUS_REG); 1577 if (!(reset_mask & RADEON_RESET_DMA)) {
1572 if (dma_status_reg & DMA_IDLE) {
1573 radeon_ring_lockup_update(ring); 1578 radeon_ring_lockup_update(ring);
1574 return false; 1579 return false;
1575 } 1580 }