[igt-dev] [PATCH i-g-t] fbdev: Force module load
Petri Latvala
petri.latvala at intel.com
Fri Oct 30 10:11:58 UTC 2020
On Thu, Oct 29, 2020 at 04:07:46PM +0000, Chris Wilson wrote:
> If there are no /dev/fbN, force loading of the first available drm
> module and try again.
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2582
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
I think we're getting to the point where we need to export
__try_modprobe so tests can explicitly request modules to be loaded.
I can remember there being at least three tests where test touches
files created by drivers (sysfs, debugfs, etc) without necessarily
calling drm_open_driver (before, or at all).
--
Petri Latvala
> tests/fbdev.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/tests/fbdev.c b/tests/fbdev.c
> index fe320b14f..e60a19297 100644
> --- a/tests/fbdev.c
> +++ b/tests/fbdev.c
> @@ -43,8 +43,16 @@ igt_main
> struct fb_fix_screeninfo fix_info;
> int fd = -1;
>
> + /*
> + * Should this test focus on the fbdev independent of any drm driver,
> + * or should it look for fbdev of a particular device?
> + */
> igt_fixture {
> fd = open("/dev/fb0", O_RDWR);
> + if (fd < 0) {
> + close(drm_open_driver(DRIVER_ANY));
> + fd = open("/dev/fb0", O_RDWR);
> + }
> igt_require_f(fd != -1, "/dev/fb0\n");
>
> igt_require(ioctl(fd, FBIOGET_VSCREENINFO, &var_info) == 0);
> --
> 2.28.0
>
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
More information about the igt-dev
mailing list