[igt-dev] [PATCH i-g-t v4] tests/i915/gem_exec_schedule.c: Switch to gem_sync and gem_read
Chris Wilson
chris at chris-wilson.co.uk
Fri Feb 15 00:57:46 UTC 2019
Quoting Antonio Argenziano (2019-02-15 00:49:01)
> use IOCTLs gem_read for reading and, gem_sync to wait on a batch, this
> will help testing platforms that might not expose gtt mapping.
>
> v2:
> - use a local helper for reading from BOs. (Chris)
> - Always sync before reading. (Chris)
>
> v3:
> - Better helper naming. (Chris)
> - Start read from actual offset. (Chris)
>
> v4:
> - Always use byte size in helper. (Chris)
>
> Signed-off-by: Antonio Argenziano <antonio.argenziano at intel.com>
>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> @@ -755,8 +759,8 @@ static void deep(int fd, unsigned ring)
> unsigned int nreq;
> uint32_t plug;
> uint32_t result, dep[XS];
> + uint32_t result_read[size / sizeof(uint32_t)], dep_read[size / sizeof(uint32_t)];
We only use one array at a time, keeping both on stack is overkill. You
might ask why not dep_read[XS][2048]?
> uint32_t expected = 0;
> - uint32_t *ptr;
> uint32_t *ctx;
> int dep_nreq;
> int n;
Other than that,
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the igt-dev
mailing list