[igt-dev] [Intel-gfx] [PATCH i-g-t] Skip VBlank tests in modules without VBlank

Rodrigo Siqueira rodrigosiqueiramelo at gmail.com
Tue Aug 21 14:29:03 UTC 2018


On 08/21, Chris Wilson wrote:
> Quoting Rodrigo Siqueira (2018-08-21 00:54:45)
> > The kms_flip test does not support drivers without VBlank which exclude
> > some virtual drivers. This patch adds a function that checks if a module
> > has a VBlank or not; if a module has VBlank than kms_flip will execute
> > all the VBlank tests, otherwise, VBlank tests will be skipped.
> > 
> > Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo at gmail.com>
> > ---
> >  lib/igt_aux.c    | 14 ++++++++++++++
> >  lib/igt_aux.h    |  2 ++
> >  tests/kms_flip.c | 26 ++++++++++++++++++++++++--
> >  3 files changed, 40 insertions(+), 2 deletions(-)
> > 
> > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > index 1250d5c5..da5be4bb 100644
> > --- a/lib/igt_aux.c
> > +++ b/lib/igt_aux.c
> > @@ -564,6 +564,20 @@ bool igt_aub_dump_enabled(void)
> >         return dump_aub;
> >  }
> >  
> > +bool igt_there_is_vblank(int drm_fd)
> 
> I would suggest breaking out in the kms namespace,
> 
> bool kms_has_vblank(int fd);
Hi,

Do you mean to move this function to igt_kms, right? If so, how about
kmstest_has_vblank.

> > +{
> > +       drmVBlank dummy_vbl;
> > +       int ret;
> > +
> 
> Either memset() the rest or use a named initializer.
> 
> > +       dummy_vbl.request.type = DRM_VBLANK_ABSOLUTE;
> > +       ret = drmWaitVBlank(drm_fd, &dummy_vbl);
> 
> return drmWaitVblank() == 0;
> -Chris

Thanks for the feedback! I will apply the suggestions.

-- 
Rodrigo Siqueira
http://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo


More information about the igt-dev mailing list