v3dv: V3D_CL_MAX_INSTR_SIZE bytes in last CL instruction not needed
As we are marking the last V3D_CLE_READAHEAD bytes as unusable we don't
need to reserve V3D_CL_MAX_INSTR_SIZE bytes for the CLE packet.
This reverts c2601f0690
("v3dv: ensure at least V3D_CL_MAX_INSTR_SIZE
bytes in last CL instruction")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29023>
This commit is contained in:

committed by
Marge Bot

parent
bb77ac983e
commit
7afebc15ce
@@ -24,8 +24,6 @@
|
||||
#ifndef V3D_LIMITS_H
|
||||
#define V3D_LIMITS_H
|
||||
|
||||
#define V3D_CL_MAX_INSTR_SIZE 25
|
||||
|
||||
/* Number of channels a QPU thread executes in parallel. Also known as
|
||||
* gl_SubGroupSizeARB.
|
||||
*/
|
||||
|
@@ -175,16 +175,6 @@ v3dv_cl_ensure_space(struct v3dv_cl *cl, uint32_t space, uint32_t alignment)
|
||||
void
|
||||
v3dv_cl_ensure_space_with_branch(struct v3dv_cl *cl, uint32_t space)
|
||||
{
|
||||
/*
|
||||
* The CLE processor in the simulator tries to read V3D_CL_MAX_INSTR_SIZE
|
||||
* bytes form the CL for each new instruction. If the last instruction in our
|
||||
* CL is smaller than that, and there are not at least V3D_CL_MAX_INSTR_SIZE
|
||||
* bytes until the end of the BO, it will read out of bounds and possibly
|
||||
* cause a GMP violation interrupt to trigger. Ensure we always have at
|
||||
* least that many bytes available to read with the last instruction.
|
||||
*/
|
||||
space += V3D_CL_MAX_INSTR_SIZE;
|
||||
|
||||
if (v3dv_cl_offset(cl) + space <= cl->size)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user