[PATCH xserver] modesetting: Fix inverted check in dri2 WaitMSC

Walter Harms wharms at bfs.de
Tue Apr 17 09:27:45 UTC 2018



> Frank Binns <frank.binns at imgtec.com> hat am 16. April 2018 um 22:17
> geschrieben:
> 
> 
> Adam Jackson <ajax at redhat.com> writes:
> 
> > ms_queue_vblank() returns false on failure.
> >
> > Reported-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Signed-off-by: Adam Jackson <ajax at redhat.com>
> 
> Reviewed-by: Frank Binns <frank.binns at imgtec.com>
> 
> > ---
> >  hw/xfree86/drivers/modesetting/dri2.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/xfree86/drivers/modesetting/dri2.c
> > b/hw/xfree86/drivers/modesetting/dri2.c
> > index fd36aa118..96eaaaaf7 100644
> > --- a/hw/xfree86/drivers/modesetting/dri2.c
> > +++ b/hw/xfree86/drivers/modesetting/dri2.c
> > @@ -749,7 +749,7 @@ ms_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr
> > draw, CARD64 target_msc,
> >              target_msc = current_msc;
> >  
> >          ret = ms_queue_vblank(crtc, MS_QUEUE_ABSOLUTE, target_msc,
> > &queued_msc, seq);
> > -        if (ret) {
> > +        if (!ret) {
> >              static int limit = 5;
> >              if (limit) {
> >                  xf86DrvMsg(scrn->scrnIndex, X_WARNING,
> 


A few lines later there is:

    if (!ms_queue_vblank(crtc, MS_QUEUE_ABSOLUTE, request_msc, &queued_msc,
seq)) {
        static int limit = 5;
        if (limit) {
            xf86DrvMsg(scrn->scrnIndex, X_WARNING,
                       "%s:%d get vblank counter failed: %s\n",
                       __FUNCTION__, __LINE__,
                       strerror(errno));
            limit--;
        }
        goto out_free;
    }

perhaps that can be changed into the same style ?
Either with or without ret i do not care but the same.

re,
 wh


> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list