public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 1/2] tests/kms_setmode: Request the intiial vbl count with RELATIVE instead of ABSOLUTE
Date: Tue, 10 Oct 2017 12:24:06 +0300	[thread overview]
Message-ID: <20171010092406.GO10981@intel.com> (raw)
In-Reply-To: <20171010091623.di56pedxk4xtxwsy@phenom.ffwll.local>

On Tue, Oct 10, 2017 at 11:16:23AM +0200, Daniel Vetter wrote:
> On Mon, Oct 09, 2017 at 07:33:49PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Asking for the initial vblank count by specifying and absolute vblank count of 0
> > doesn't make much sense. Switch to a relative query instead.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  tests/kms_setmode.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
> > index 206d360607bb..ed5d97442255 100644
> > --- a/tests/kms_setmode.c
> > +++ b/tests/kms_setmode.c
> > @@ -431,7 +431,7 @@ static void check_timings(int crtc_idx, const drmModeModeInfo *kmode)
> >  
> >  	memset(&wait, 0, sizeof(wait));
> >  	wait.request.type = kmstest_get_vbl_flag(crtc_idx);
> > -	wait.request.type |= DRM_VBLANK_ABSOLUTE | DRM_VBLANK_NEXTONMISS;
> > +	wait.request.type |= DRM_VBLANK_RELATIVE | DRM_VBLANK_NEXTONMISS;
> 
> Looking at drm_wait_vblank_is_query() in drm_vblank.c you also want to
> drop NEXTONMISS.

Hmm. I think we may want to line things up to a vblank boundary here
(but I'd have to re-read the code to confirm that). Without the
NEXTONMISS we would just query the current count and continue
immediately. Alternative I guess we could drop the NEXTONMISS but
instead wait for seq+1.

> With that:
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> on both.
> 
> Cheers, Daniel
> >  	do_or_die(drmWaitVBlank(drm_fd, &wait));
> >  
> >  	last_seq = wait.reply.sequence;
> > -- 
> > 2.13.5
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-10-10  9:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09 16:33 [PATCH i-g-t 1/2] tests/kms_setmode: Request the intiial vbl count with RELATIVE instead of ABSOLUTE Ville Syrjala
2017-10-09 16:33 ` [PATCH i-g-t 2/2] tests/kms_flip: " Ville Syrjala
2017-10-09 19:01 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] tests/kms_setmode: " Patchwork
2017-10-10  9:16 ` [PATCH i-g-t 1/2] " Daniel Vetter
2017-10-10  9:24   ` Ville Syrjälä [this message]
2017-10-10 12:25     ` Daniel Vetter
2017-10-10 19:44 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2017-10-11  4:52 ` ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171010092406.GO10981@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox