Skip to content

Commit

Permalink
drm/radeon/si: print full CS when we hit a packet 0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Deucher committed Oct 1, 2014
1 parent d7952dd commit 9d0223d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/gpu/drm/radeon/si.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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:
Expand Down

0 comments on commit 9d0223d

Please sign in to comment.