[igt-dev] [PATCH i-g-t 4/5] tests/dumb_duffer: extending for lmem coverage.

Chris Wilson chris at chris-wilson.co.uk
Mon Jan 27 17:13:02 UTC 2020


Quoting Ramalingam C (2020-01-27 17:02:04)
>         igt_fixture {
> -               fd = drm_open_driver(DRIVER_ANY);
> +               data.drm_fd = drm_open_driver(DRIVER_ANY);
> +               data.lmem = false;
> +               data.page_size = 4096;
> +               if (is_i915_device(data.drm_fd)) {
> +                       if (gem_has_lmem(data.drm_fd)) {
> +                               data.lmem = true;
> +                               data.page_size = 65536;
> +                       }

Just say to be agnostic to all potential limitations across drivers,
bump the allocation unit to SZ_2M. Let's not hardcode any backend
specific behaviour if we avoid it.

An alternative might be to assume that create.size returned for a 1x1
surface is the min_page_size. Better.
-Chris


More information about the igt-dev mailing list