提交 cf57fc7a 编写于 作者: A Alex Deucher 提交者: Dave Airlie

drm/radeon/kms/r100: fix bug in CS parser

The first dword of PACKET3_3D_DRAW_IMMD maps to
SE_VTX_FMT so the vertex size is part of the draw
packet.

This patch fixes a possible case where you have a
command buffer that does not contain SE_VTX_FMT
register write, but does contain PACKET3_3D_DRAW_IMMD.
Signed-off-by: NAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: NDave Airlie <airlied@linux.ie>
上级 828153e2
...@@ -1504,6 +1504,7 @@ static int r100_packet3_check(struct radeon_cs_parser *p, ...@@ -1504,6 +1504,7 @@ static int r100_packet3_check(struct radeon_cs_parser *p,
DRM_ERROR("PRIM_WALK must be 3 for IMMD draw\n"); DRM_ERROR("PRIM_WALK must be 3 for IMMD draw\n");
return -EINVAL; return -EINVAL;
} }
track->vtx_size = r100_get_vtx_size(radeon_get_ib_value(p, idx + 0));
track->vap_vf_cntl = radeon_get_ib_value(p, idx + 1); track->vap_vf_cntl = radeon_get_ib_value(p, idx + 1);
track->immd_dwords = pkt->count - 1; track->immd_dwords = pkt->count - 1;
r = r100_cs_track_check(p->rdev, track); r = r100_cs_track_check(p->rdev, track);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册