[PATCH weston] parse_modeline: Ignore case of {h,v}sync flags

Guido Günther agx at sigxcpu.org
Tue Jul 3 09:52:59 UTC 2018


Hi,
On Tue, Jul 03, 2018 at 12:04:37PM +0300, Pekka Paalanen wrote:
> On Tue, 26 Jun 2018 20:40:08 +0200
> Guido Günther <agx at sigxcpu.org> wrote:
> 
> > Some modeline generators put out e.g. +HSync instead of +hsync. Accept
> > that too since it's not ambigous.
> > 
> > Signed-off-by: Guido Günther <agx at sigxcpu.org>
> > ---
> >  libweston/compositor-drm.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> > index 8b1ea66d..1c9b7134 100644
> > --- a/libweston/compositor-drm.c
> > +++ b/libweston/compositor-drm.c
> > @@ -4341,16 +4341,16 @@ parse_modeline(const char *s, drmModeModeInfo *mode)
> >  		return -1;
> >  
> >  	mode->clock = fclock * 1000;
> > -	if (strcmp(hsync, "+hsync") == 0)
> > +	if (strcasecmp(hsync, "+hsync") == 0)
> >  		mode->flags |= DRM_MODE_FLAG_PHSYNC;
> > -	else if (strcmp(hsync, "-hsync") == 0)
> > +	else if (strcasecmp(hsync, "-hsync") == 0)
> >  		mode->flags |= DRM_MODE_FLAG_NHSYNC;
> >  	else
> >  		return -1;
> >  
> > -	if (strcmp(vsync, "+vsync") == 0)
> > +	if (strcasecmp(vsync, "+vsync") == 0)
> >  		mode->flags |= DRM_MODE_FLAG_PVSYNC;
> > -	else if (strcmp(vsync, "-vsync") == 0)
> > +	else if (strcasecmp(vsync, "-vsync") == 0)
> >  		mode->flags |= DRM_MODE_FLAG_NVSYNC;
> >  	else
> >  		return -1;
> 
> Hi,
> 
> I suppose this does no harm. Pushed:

Yeah, that was my intend when sending the patch.

>    35280448..92278e08  master -> master


Thanks,
 -- Guido


More information about the wayland-devel mailing list