[PATCH i-g-t] tests/intel/xe_exec_atomic: fix basic-inc-all

Mauro Carvalho Chehab mauro.chehab at linux.intel.com
Tue Jan 30 09:05:13 UTC 2024


On Tue, 30 Jan 2024 09:57:38 +0100
Kamil Konieczny <kamil.konieczny at linux.intel.com> wrote:

> Hi,
> On 2024-01-29 at 19:54:12 +0100, Kamil Konieczny wrote:
> > Previous test removed skips on unsupported system memory on dGPU
> - ^^^^^^^^^^^^^
> This should be:
> 
> Commit af750f5e7 ("tests/intel/xe_exec_atomic: don't test unsupported config")
> removed skip on unsupported system memory on dGPU but did it
> only for basic-dec-all. Fix it for second test basic-inc-all.
> Also while at this, use drm_open_driver and drm_close_driver
> which takes care of xe device get/put.
> 
> +cc Mauro

LGTM after change previous test -> commit af750f5e7.

Reviewed-by: Mauro Carvalho Chehab <mchehab at kernel.org>

> > 
> > Cc: Nirmoy Das <nirmoy.das at intel.com>
> > Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> > ---
> >  tests/intel/xe_exec_atomic.c | 14 +++++---------
> >  1 file changed, 5 insertions(+), 9 deletions(-)
> > 
> > diff --git a/tests/intel/xe_exec_atomic.c b/tests/intel/xe_exec_atomic.c
> > index 48c70ec72..d9790da78 100644
> > --- a/tests/intel/xe_exec_atomic.c
> > +++ b/tests/intel/xe_exec_atomic.c
> > @@ -124,10 +124,8 @@ igt_main
> >  	struct drm_xe_engine_class_instance *hwe;
> >  	int fd;
> >  
> > -	igt_fixture {
> > +	igt_fixture
> >  		fd = drm_open_driver(DRIVER_XE);
> > -		xe_device_get(fd);
> > -	}
> >  
> >  	igt_subtest_with_dynamic("basic-dec-all") {
> >  		xe_for_each_engine(fd, hwe) {
> > @@ -152,8 +150,8 @@ igt_main
> >  			uint64_t memreg = all_memory_regions(fd), region;
> >  
> >  			xe_for_each_mem_region(fd, memreg, region) {
> > -
> > -				igt_skip_on(!has_atomics(fd, region));
> > +				if (!has_atomics(fd, region))
> > +					continue;
> >  
> >  				igt_dynamic_f("Engine-%s-Instance-%d-Tile-%d-%s-memory",
> >  					      xe_engine_class_string(hwe->engine_class),
> > @@ -165,8 +163,6 @@ igt_main
> >  		}
> >  	}
> >  
> > -	igt_fixture {
> > -		xe_device_put(fd);
> > -		close(fd);
> > -	}
> > +	igt_fixture
> > +		drm_close_driver(fd);
> >  }
> > -- 
> > 2.42.0
> > 


More information about the igt-dev mailing list