Commit 0b41da60 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/radeon/kms/ni: fix packet2 handling for VM IB parser

Packet2 is only one dword.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarJerome Glisse <jglisse@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 0e113315
...@@ -1793,10 +1793,12 @@ int evergreen_ib_parse(struct radeon_device *rdev, struct radeon_ib *ib) ...@@ -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) ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment