[igt-dev] [PATCH i-g-t 2/2] v3d: Add tests for hanging V3D using an RCL.

Jani Nikula jani.nikula at linux.intel.com
Wed Nov 28 11:24:35 UTC 2018


On Tue, 27 Nov 2018, Eric Anholt <eric at anholt.net> wrote:
> +/** Creates a simple CL consisting of a single NOP instruction. */
> +struct v3d_cl *
> +igt_v3d_cl_create_nop(int fd)
> +{
> +	struct v3d_cl *cl = igt_v3d_cl_create(fd, 1);
> +        uint8_t nop_opcode = 1;

Not really reviewing this, the indents with spaces just caught my eyes.

> +
> +	memcpy(cl->next, &nop_opcode, 1);
> +	cl->next++;
> +
> +	return cl;
> +}
> +
> +/**
> + * Creates a simple CL consisting of an infinite loop branching to itself.
> + */
> +struct v3d_cl *
> +igt_v3d_cl_create_infinite_loop(int fd)
> +{
> +	struct v3d_cl *cl = igt_v3d_cl_create(fd, 5);
> +        uint8_t branch_opcode = 16;

Ditto here.

BR,
Jani.

> +
> +	memcpy(cl->next, &branch_opcode, 1);
> +	cl->next++;
> +
> +	memcpy(cl->next, &cl->bo->offset, 4);
> +	cl->next += 4;
> +
> +	return cl;
> +}

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the igt-dev mailing list