[PATCH i-g-t v1 0/3] print info in core_getversion

Kamil Konieczny kamil.konieczny at linux.intel.com
Tue Feb 20 18:27:25 UTC 2024


Hi Helen,
On 2024-02-20 at 11:30:16 -0300, Helen Koike wrote:
> 
> 
> On 20/02/2024 07:19, Kamil Konieczny wrote:
> > Reorganize core_getversion test, make it a basic subtest which
> > prints info from ioctl. Add also multigpu subtest for all drm
> > cards.
> > 
> > Cc: Helen Koike <helen.koike at collabora.com>
> > Cc: Mauro Carvalho Chehab <mchehab at kernel.org>
> > Cc: Mauro Carvalho Chehab <mauro.chehab at linux.intel.com>
> > Cc: Rob Clark <robdclark at chromium.org>
> > 
> > Kamil Konieczny (3):
> >    tests/core_getversion: convert to subtest
> >    tests/core_getversion: print version info
> >    tests/core_getversion: test all drm devices
> > 
> >   tests/core_getversion.c | 50 ++++++++++++++++++++++++++++++++++++-----
> >   1 file changed, 44 insertions(+), 6 deletions(-)
> > 
> 
> Hello,
> 
> For some reason I didn't receive the patches in my email box, so let me
> write here:

I only added your address in cover letter, not knowing if anyone
would like to look into it. I will add it in v2.

> 
> On patch 3/3:
> 
> +	igt_describe("Check GET_VERSION ioctl for all drm devices.");
> +	igt_subtest("multigpu") {
> +		int fd2;
> +
> +		for (int i = 0; i < 16; ++i) {
> 
> it would be great to replace this 16 by a defined macro.
> 

Right, good point, will do.

> +			fd2 = __drm_open_driver_another(i, DRIVER_ANY);
> +			if (fd2 == -1)
> +				break;
> 
> shouldn't it be a "continue" instead of break ?
> 

Due to current implementation of __drm_open_driver_another,
tring opening here index + 2, if there is no opened index + 1,
will result in assert. This open function searches for new card
based on all previously opened so tring to skip +2 is now
not possible (by design, see comment in lib/drmtest.c).

I was thinking about solving this here (patch 3/8):

https://patchwork.freedesktop.org/series/129101/#rev8
[i-g-t,v8] lib/drmtest: allow opening cards out of order

Regards,
Kamil

> +
> +			check(fd2, info, sizeof(info));
> +			igt_info("%d: %s\n", i, info);
> +			drm_close_driver(fd2);
> +		}
> +	}
> 
> Regards,
> Helen


More information about the igt-dev mailing list