summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/si.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2014-09-30 15:25:32 +0200
committerAlex Deucher <alexander.deucher@amd.com>2014-10-01 15:00:09 +0200
commit9d0223d5f883bd85f5b24a6eacb79ee5a446d648 (patch)
tree9f75f0aa638a8bf2df27fc5ccbad98f4127febb9 /drivers/gpu/drm/radeon/si.c
parentdrm/radeon: remove unecessary includes (diff)
downloadlinux-9d0223d5f883bd85f5b24a6eacb79ee5a446d648.tar.xz
linux-9d0223d5f883bd85f5b24a6eacb79ee5a446d648.zip
drm/radeon/si: print full CS when we hit a packet 0
We should never have a packet 0 in the command stream. Dump the full command stream to help debug. bug: https://bugs.freedesktop.org/show_bug.cgi?id=84500 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/si.c')
-rw-r--r--drivers/gpu/drm/radeon/si.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 6bce40847753..423a8cd052aa 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -4684,7 +4684,7 @@ static int si_vm_packet3_compute_check(struct radeon_device *rdev,
int si_ib_parse(struct radeon_device *rdev, struct radeon_ib *ib)
{
int ret = 0;
- u32 idx = 0;
+ u32 idx = 0, i;
struct radeon_cs_packet pkt;
do {
@@ -4695,6 +4695,12 @@ int si_ib_parse(struct radeon_device *rdev, struct radeon_ib *ib)
switch (pkt.type) {
case RADEON_PACKET_TYPE0:
dev_err(rdev->dev, "Packet0 not allowed!\n");
+ for (i = 0; i < ib->length_dw; i++) {
+ if (i == idx)
+ printk("\t0x%08x <---\n", ib->ptr[i]);
+ else
+ printk("\t0x%08x\n", ib->ptr[i]);
+ }
ret = -EINVAL;
break;
case RADEON_PACKET_TYPE2: