[igt-dev] [PATCH i-g-t] kms_fence_pin_leak: check for availabile fences

Ramalingam C ramalingam.c at intel.com
Fri Feb 7 14:22:04 UTC 2020


On 2020-02-07 at 16:08:29 +0200, Ville Syrjälä wrote:
> On Fri, Feb 07, 2020 at 07:26:06PM +0530, Ramalingam C wrote:
> > On 2020-02-06 at 21:26:52 -0800, Ashutosh Dixit wrote:
> > > Need fences to leak fences.
> > > 
> > > Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
> > > ---
> > >  tests/kms_fence_pin_leak.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/tests/kms_fence_pin_leak.c b/tests/kms_fence_pin_leak.c
> > > index 8c9e10a56..1ac65e8a1 100644
> > > --- a/tests/kms_fence_pin_leak.c
> > > +++ b/tests/kms_fence_pin_leak.c
> > > @@ -200,6 +200,7 @@ igt_simple_main
> > >  
> > >  	data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> > >  	igt_require_gem(data.drm_fd);
> > > +	igt_require(gem_available_fences(data.drm_fd) > 0);
> > >From documentation, seams this gem_available_fences is Only relevant for pre-gen4.
> > after the gen4 we dont use the fences or we can't use this method to get the fence
> > count?
> 
> These days it just returns the total number of fences, so should work
> on everything. There used to be a way userspace could reserve some
> fences for itself (I think for UMS). I believe that's what the
> documentation  is referring to. That stuff got removed years ago.
Thanks ville for the details.

With that, this looks good to me for the purpose.

Reviewed-by: Ramalingam C <ramlaingam.c at intel.com>
> 
> -- 
> Ville Syrjälä
> Intel


More information about the igt-dev mailing list