aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2013-01-02 15:12:15 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-01-03 13:18:41 -0500
commiteaaa6983ab2ccdf826c90838eb584211e0cadb76 (patch)
tree7685122542cd9f8d6932aca08cae6471bc9d9805 /drivers/gpu
parent4d0091904cba756274bc4973157f63fb878befc3 (diff)
drm/radeon: print dma status reg on lockup (v2)
To help debug dma related lockup. v2: agd5f: update SI as well Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/evergreen.c4
-rw-r--r--drivers/gpu/drm/radeon/evergreend.h3
-rw-r--r--drivers/gpu/drm/radeon/ni.c4
-rw-r--r--drivers/gpu/drm/radeon/nid.h1
-rw-r--r--drivers/gpu/drm/radeon/r600.c4
-rw-r--r--drivers/gpu/drm/radeon/si.c9
-rw-r--r--drivers/gpu/drm/radeon/sid.h2
7 files changed, 26 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index f95d7fc1f5e0..6dc9ee78f4a8 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -2331,6 +2331,8 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev)
2331 RREG32(CP_BUSY_STAT)); 2331 RREG32(CP_BUSY_STAT));
2332 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 2332 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
2333 RREG32(CP_STAT)); 2333 RREG32(CP_STAT));
2334 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
2335 RREG32(DMA_STATUS_REG));
2334 evergreen_mc_stop(rdev, &save); 2336 evergreen_mc_stop(rdev, &save);
2335 if (evergreen_mc_wait_for_idle(rdev)) { 2337 if (evergreen_mc_wait_for_idle(rdev)) {
2336 dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); 2338 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
@@ -2376,6 +2378,8 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev)
2376 RREG32(CP_BUSY_STAT)); 2378 RREG32(CP_BUSY_STAT));
2377 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 2379 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
2378 RREG32(CP_STAT)); 2380 RREG32(CP_STAT));
2381 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
2382 RREG32(DMA_STATUS_REG));
2379 evergreen_mc_resume(rdev, &save); 2383 evergreen_mc_resume(rdev, &save);
2380 return 0; 2384 return 0;
2381} 2385}
diff --git a/drivers/gpu/drm/radeon/evergreend.h b/drivers/gpu/drm/radeon/evergreend.h
index cb9baaac9e85..f82f98a11a76 100644
--- a/drivers/gpu/drm/radeon/evergreend.h
+++ b/drivers/gpu/drm/radeon/evergreend.h
@@ -2027,4 +2027,7 @@
2027/* cayman packet3 addition */ 2027/* cayman packet3 addition */
2028#define CAYMAN_PACKET3_DEALLOC_STATE 0x14 2028#define CAYMAN_PACKET3_DEALLOC_STATE 0x14
2029 2029
2030/* DMA regs common on r6xx/r7xx/evergreen/ni */
2031#define DMA_STATUS_REG 0xd034
2032
2030#endif 2033#endif
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 7bdbcb00aaf2..6dae3878e397 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -1331,6 +1331,8 @@ static int cayman_gpu_soft_reset(struct radeon_device *rdev)
1331 RREG32(CP_BUSY_STAT)); 1331 RREG32(CP_BUSY_STAT));
1332 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 1332 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
1333 RREG32(CP_STAT)); 1333 RREG32(CP_STAT));
1334 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
1335 RREG32(DMA_STATUS_REG));
1334 dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_ADDR 0x%08X\n", 1336 dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_ADDR 0x%08X\n",
1335 RREG32(0x14F8)); 1337 RREG32(0x14F8));
1336 dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_STATUS 0x%08X\n", 1338 dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_STATUS 0x%08X\n",
@@ -1387,6 +1389,8 @@ static int cayman_gpu_soft_reset(struct radeon_device *rdev)
1387 RREG32(CP_BUSY_STAT)); 1389 RREG32(CP_BUSY_STAT));
1388 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 1390 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
1389 RREG32(CP_STAT)); 1391 RREG32(CP_STAT));
1392 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
1393 RREG32(DMA_STATUS_REG));
1390 evergreen_mc_resume(rdev, &save); 1394 evergreen_mc_resume(rdev, &save);
1391 return 0; 1395 return 0;
1392} 1396}
diff --git a/drivers/gpu/drm/radeon/nid.h b/drivers/gpu/drm/radeon/nid.h
index b93186b8ee4b..22a62c673fec 100644
--- a/drivers/gpu/drm/radeon/nid.h
+++ b/drivers/gpu/drm/radeon/nid.h
@@ -675,4 +675,3 @@
675#define DMA_PACKET_NOP 0xf 675#define DMA_PACKET_NOP 0xf
676 676
677#endif 677#endif
678
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 9f4ce5eb9e9c..252067bba2d9 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1297,6 +1297,8 @@ static int r600_gpu_soft_reset(struct radeon_device *rdev)
1297 RREG32(CP_BUSY_STAT)); 1297 RREG32(CP_BUSY_STAT));
1298 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 1298 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
1299 RREG32(CP_STAT)); 1299 RREG32(CP_STAT));
1300 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
1301 RREG32(DMA_STATUS_REG));
1300 rv515_mc_stop(rdev, &save); 1302 rv515_mc_stop(rdev, &save);
1301 if (r600_mc_wait_for_idle(rdev)) { 1303 if (r600_mc_wait_for_idle(rdev)) {
1302 dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); 1304 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
@@ -1348,6 +1350,8 @@ static int r600_gpu_soft_reset(struct radeon_device *rdev)
1348 RREG32(CP_BUSY_STAT)); 1350 RREG32(CP_BUSY_STAT));
1349 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 1351 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
1350 RREG32(CP_STAT)); 1352 RREG32(CP_STAT));
1353 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
1354 RREG32(DMA_STATUS_REG));
1351 rv515_mc_resume(rdev, &save); 1355 rv515_mc_resume(rdev, &save);
1352 return 0; 1356 return 0;
1353} 1357}
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index ef683653f0b7..74d38452c5c1 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -2145,6 +2145,13 @@ static int si_gpu_soft_reset(struct radeon_device *rdev)
2145 RREG32(GRBM_STATUS_SE1)); 2145 RREG32(GRBM_STATUS_SE1));
2146 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", 2146 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n",
2147 RREG32(SRBM_STATUS)); 2147 RREG32(SRBM_STATUS));
2148 dev_info(rdev->dev, " DMA_STATUS_REG = 0x%08X\n",
2149 RREG32(DMA_STATUS_REG));
2150 dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n",
2151 RREG32(VM_CONTEXT1_PROTECTION_FAULT_ADDR));
2152 dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
2153 RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS));
2154
2148 evergreen_mc_stop(rdev, &save); 2155 evergreen_mc_stop(rdev, &save);
2149 if (radeon_mc_wait_for_idle(rdev)) { 2156 if (radeon_mc_wait_for_idle(rdev)) {
2150 dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); 2157 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
@@ -2185,6 +2192,8 @@ static int si_gpu_soft_reset(struct radeon_device *rdev)
2185 RREG32(GRBM_STATUS_SE1)); 2192 RREG32(GRBM_STATUS_SE1));
2186 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", 2193 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n",
2187 RREG32(SRBM_STATUS)); 2194 RREG32(SRBM_STATUS));
2195 dev_info(rdev->dev, " DMA_STATUS_REG = 0x%08X\n",
2196 RREG32(DMA_STATUS_REG));
2188 evergreen_mc_resume(rdev, &save); 2197 evergreen_mc_resume(rdev, &save);
2189 return 0; 2198 return 0;
2190} 2199}
diff --git a/drivers/gpu/drm/radeon/sid.h b/drivers/gpu/drm/radeon/sid.h
index 62b46215d423..98909b264ac2 100644
--- a/drivers/gpu/drm/radeon/sid.h
+++ b/drivers/gpu/drm/radeon/sid.h
@@ -1013,6 +1013,8 @@
1013# define DATA_SWAP_ENABLE (1 << 3) 1013# define DATA_SWAP_ENABLE (1 << 3)
1014# define FENCE_SWAP_ENABLE (1 << 4) 1014# define FENCE_SWAP_ENABLE (1 << 4)
1015# define CTXEMPTY_INT_ENABLE (1 << 28) 1015# define CTXEMPTY_INT_ENABLE (1 << 28)
1016#define DMA_STATUS_REG 0xd034
1017# define DMA_IDLE (1 << 0)
1016#define DMA_TILING_CONFIG 0xd0b8 1018#define DMA_TILING_CONFIG 0xd0b8
1017 1019
1018#define DMA_PACKET(cmd, b, t, s, n) ((((cmd) & 0xF) << 28) | \ 1020#define DMA_PACKET(cmd, b, t, s, n) ((((cmd) & 0xF) << 28) | \