[igt-dev] [PATCH i-g-t] i915/pm_backlight: ensure driver is loaded before checking backlight

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 11 11:26:21 UTC 2020


Quoting Jani Nikula (2020-02-11 11:16:34)
> Checking the existence of the backlight interface before ensuring the
> driver is loaded skips whenever the test is run without the driver
> loaded. None of the tests would work properly if they were run as the
> first thing or after tests that unload the driver.
> 
> Open the driver (and thus probe it as needed) as the first thing.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

> (This is the low-hanging fruit. A proper test for skipping would be
> based on the presence of embedded displays, not based on the presence of
> the interface we're aiming to test.)

Slightly different test idea. Here we say this is a test for particular
interface, what you have in mind is a requirement that if available HW,
the kernel *must* provide an interface. (I don't really like userspace
demanding the kernel makes something available, for the cases were it
really can't be done due to some flaw or another. From the HW vendor
perspective, such a conformance test is understandable -- but we are
focusing on the interfaces the kernel does expose and verifying that
work as expected.)
-Chris


More information about the igt-dev mailing list