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 <[email protected]>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to