[igt-dev] [PATCH 2/2] tests/prime_generic: add vendor-agnostic prime tests

Chris Wilson chris at chris-wilson.co.uk
Fri Jul 12 14:20:58 UTC 2019


Quoting Oleg Vasilev (2019-07-12 15:16:18)
> Current, we have different sets of prime tests:
>  - vgem+i915
>  - amdgpu+i915
>  - nouveau+i915
> 
> Those tests use vendor-specific ioctls, therefore, not interchangeable.
> The idea is to create a set of tests which are expected to work on any
> prime-compatible driver. It can be run with any combination of
> exporter+importer, while those devices have respective prime
> capabilities.
> 
> Since vgem can be used as both exporter and importer, and there aren't
> any generic kms features which vgem doesn't support, it is sufficient
> to test DRIVER_ANY+DRIVER_VKMS.
> 
> The first test is simple:
> 1. Exporter creates a dumb FB and fills it with a plain color
> 2. FB is transferred to the importer
> 3. Importer modesets and computes pipe CRC
> 4. Importer draws the same color through cairo and compares CRC
> 
> The initial motivation comes from the need to test prime support in
> vkms.
> 
> Cc: Rodrigo Siqueira <rodrigosiqueiramelo at gmail.com>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Signed-off-by: Oleg Vasilev <oleg.vasilev at intel.com>
> ---
>  tests/meson.build     |   1 +
>  tests/prime_generic.c | 250 ++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 251 insertions(+)
>  create mode 100644 tests/prime_generic.c
> 
> diff --git a/tests/meson.build b/tests/meson.build
> index 34a74025..1c938e95 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -76,6 +76,7 @@ test_progs = [
>         'prime_self_import',
>         'prime_udl',
>         'prime_vgem',
> +       'prime_generic',

Shouldn't this be kms_prime? A bunch of generic kms tests with the focus
on using prime imports?
-Chris


More information about the igt-dev mailing list