[igt-dev] [PATCH i-g-t v33 18/40] tests/gem_concurrent_all: remove libdrm dependency
Chris Wilson
chris at chris-wilson.co.uk
Thu Sep 10 13:25:08 UTC 2020
Quoting Zbigniew Kempczyński (2020-08-31 14:30:27)
> @@ -745,7 +769,7 @@ static void buffers_init(struct buffers *b,
> const struct access_mode *mode,
> const struct size *size,
> int num_buffers,
> - int _fd, int enable_reuse)
> + int _fd)
> {
> memset(b, 0, sizeof(*b));
> b->name = name;
> @@ -763,17 +787,13 @@ static void buffers_init(struct buffers *b,
> b->tmp = malloc(b->page_size);
> igt_assert(b->tmp);
>
> - b->bufmgr = drm_intel_bufmgr_gem_init(_fd, 4096);
> - igt_assert(b->bufmgr);
> + b->bops = buf_ops_create(_fd);
>
> - b->src = malloc(2*sizeof(drm_intel_bo *)*num_buffers);
> + b->src = malloc(2*sizeof(struct intel_buf *)*num_buffers);
> igt_assert(b->src);
> b->dst = b->src + num_buffers;
>
> - if (enable_reuse)
> - drm_intel_bufmgr_gem_enable_reuse(b->bufmgr);
> - b->batch = intel_batchbuffer_alloc(b->bufmgr, devid);
> - igt_assert(b->batch);
> + b->ibb = intel_bb_create(_fd, 4096);
> }
>
> static void buffers_destroy(struct buffers *b)
We have a problem with how we throw all the inherited state from the
parent and replace it with our own:
(gem_concurrent_blit:8928) intel_bufops-CRITICAL: Test assertion failure function intel_buf_destroy, file ../lib/intel_bufops.c:933:
(gem_concurrent_blit:8928) intel_bufops-CRITICAL: Failed assertion: buf->ptr == NULL
Stack trace:
#0 ../lib/igt_core.c:1727 __igt_fail_assert()
#1 [intel_buf_destroy+0x7a]
#2 ../tests/i915/gem_concurrent_all.c:811 buffers_destroy()
#3 ../tests/i915/gem_concurrent_all.c:1365 __run_forked()
#4 ../tests/i915/gem_concurrent_all.c:1403 run_forked()
We need to do some munmap cleanup of the buffers.
-Chris
More information about the igt-dev
mailing list