[Intel-gfx] [PATCH i-g-t v2] igt/gem_exec_nop/headless: Verify GT performance in headless mode
Chris Wilson
chris at chris-wilson.co.uk
Tue Apr 18 12:29:20 UTC 2017
On Tue, Apr 18, 2017 at 12:41:14PM +0100, Tvrtko Ursulin wrote:
> +static void headless(int fd, uint32_t handle)
> +{
> + const struct intel_execution_engine *e = &intel_execution_engines[0];
> + unsigned int nr_connected = 0;
> + drmModeConnector *connector;
> + drmModeRes *res;
> + double n[2];
> +
> + res = drmModeGetResources(fd);
> + igt_assert(res);
> +
> + /* require at least one connected connector for the test */
> + for (int i = 0; i < res->count_connectors; i++) {
> + connector = drmModeGetConnectorCurrent(fd, res->connectors[i]);
> + if (connector->connection == DRM_MODE_CONNECTED)
> + nr_connected++;
> + drmModeFreeConnector(connector);
> + }
> + igt_require(nr_connected > 0);
> +
> + /* set graphics mode to prevent blanking */
> + kmstest_set_vt_graphics_mode();
> +
> + /* benchmark nops */
> + n[0] = stable_nop_on_ring(fd, handle, e->exec_id | e->flags, 1, 5);
Minor, just use I915_EXEC_DEFAULT that has the semantics you want.
I think the test is interesting and further improvements can be made in
situ.
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list