drm/radeon/kms/ni: fix packet2 handling for VM IB parser
Packet2 is only one dword. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
0e11331579
commit
0b41da60c0
1 changed files with 2 additions and 1 deletions
|
@ -1793,10 +1793,12 @@ int evergreen_ib_parse(struct radeon_device *rdev, struct radeon_ib *ib)
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
case PACKET_TYPE2:
|
case PACKET_TYPE2:
|
||||||
|
idx += 1;
|
||||||
break;
|
break;
|
||||||
case PACKET_TYPE3:
|
case PACKET_TYPE3:
|
||||||
pkt.opcode = CP_PACKET3_GET_OPCODE(ib->ptr[idx]);
|
pkt.opcode = CP_PACKET3_GET_OPCODE(ib->ptr[idx]);
|
||||||
ret = evergreen_vm_packet3_check(rdev, ib->ptr, &pkt);
|
ret = evergreen_vm_packet3_check(rdev, ib->ptr, &pkt);
|
||||||
|
idx += pkt.count + 2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dev_err(rdev->dev, "Unknown packet type %d !\n", pkt.type);
|
dev_err(rdev->dev, "Unknown packet type %d !\n", pkt.type);
|
||||||
|
@ -1805,7 +1807,6 @@ int evergreen_ib_parse(struct radeon_device *rdev, struct radeon_ib *ib)
|
||||||
}
|
}
|
||||||
if (ret)
|
if (ret)
|
||||||
break;
|
break;
|
||||||
idx += pkt.count + 2;
|
|
||||||
} while (idx < ib->length_dw);
|
} while (idx < ib->length_dw);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue