[igt-dev] [PATCH i-g-t 1/3] lib: Support multiple filters
Petri Latvala
petri.latvala at intel.com
Wed Nov 11 12:55:39 UTC 2020
On Wed, Nov 11, 2020 at 12:03:52PM +0000, Chris Wilson wrote:
> Quoting Petri Latvala (2020-11-10 08:35:06)
> > On Mon, Nov 09, 2020 at 05:02:48PM +0000, Chris Wilson wrote:
> > > Quoting Arkadiusz Hiler (2020-05-04 08:37:05)
> > > > This patch brings back support for multiple filters that was in the
> > > > original series by Zbyszek.
> > >
> > > How is this filtering meant to work for tests that try to open two
> > > different devices? Shouldn't the igt_device_filter_count() take into
> > > account whether the filter even matches the desired device?
> > > Should all of the filters include all possible devices?
> >
> >
> > If you use filters, and you have two different devices you want to
> > use, the test should use drm_open_driver_another() and have filters
> > for two devices, semicolon-separated. See kms_prime for a good example
> > of the usage.
>
> Why does the test know about filters?
>
> drm_open_driver(DRIVER_INTEL);
> drm_open_driver(DRIVER_VGEM);
>
> fails to find vgem because some filter is restricting the available set
> to intel. And _another still does not overcome an imposed restriction.
Tradeoffs on top of tradeoffs.
If you have two intel devices and you want to kms_prime between them,
you need to be able to say "this DRIVER_INTEL goes here, this other
DRIVER_INTEL goes here."
If you have an intel and a non-intel device, you need to be able to
say "run tests on this device, don't even touch that other device, I
don't care about it for this run."
Now, having said that, vgem is kinda special and it might be worth to
keep special-casing its usage (it being already not part of DRIVER_ANY
and all that), by way of ignoring all filters when chipset ==
DRIVER_VGEM.
Arek, opinions on that?
--
Petri Latvala
More information about the igt-dev
mailing list