[Intel-gfx] [PATCH intel-gpu-tools] gem_ring_sync_copy: Add a ring to ring synchronization test

Damien Lespiau damien.lespiau at intel.com
Tue Feb 4 12:00:10 CET 2014


On Wed, Jan 29, 2014 at 04:17:37PM +0000, Damien Lespiau wrote:
> +static void run_test(data_t *data, enum ring r1, enum ring r2, enum test test)
> +{
> +	struct ring_ops *r1_ops = &ops[r1];
> +	struct ring_ops *r2_ops = &ops[r2];
> +	drm_intel_bo *a, *b, *c;
> +
> +	a = bo_create(data, WIDTH, HEIGHT, 0xa);
> +	b = bo_create(data, WIDTH, HEIGHT, 0xb);
> +	c = bo_create(data, WIDTH, HEIGHT, 0xc);
> +
> +	r1_ops->busy(data);
> +	r2_ops->copy(data, a, b);
        ^^
	r1
> +
> +	switch (test) {
> +	case TEST_WRITE_READ:
> +		r2_ops->copy(data, b, c);
                ^^
> +		bo_check(data, c, 0xa);
> +		break;

Turns out I was copying a to b on r2, and then b to c still on r2. So
no inter-ring dependencies in that workload. Ooops.

Pushed an updated patch that copy a to b on r1 and then b to c on r2 and
verified that short-circuiting the semaphores breaks the test indeed.

-- 
Damien



More information about the Intel-gfx mailing list