[igt-dev] [PATCH i-g-t 4/4] tests/perf: add new tests for configurable OA buffer size

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 10 17:12:18 UTC 2018


Quoting Lionel Landwerlin (2018-10-10 17:57:47)
> +       igt_subtest("buffer-fill-sized") {
> +               size_t size = 128 * 1024; /* Smallest HW supported size. */
> +               const size_t max_size = DEFAULT_OA_BUF_SIZE;
> +
> +               igt_require(kernel_supports_open_option(drm_fd, DRM_I915_PERF_PROP_OA_BUFFER_SIZE, 0));
> +
> +               while (size <= max_size) {
> +                       test_buffer_fill(true, size);
> +                       size *= 2;

If you care about the actual bufsz, then report it back? Otherwise it
would seem to need to be a lot more stringent on validation to only use
the user requested size.
-Chris


More information about the igt-dev mailing list