lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190514181257.GS17077@art_vandelay>
Date:   Tue, 14 May 2019 14:12:57 -0400
From:   Sean Paul <sean@...rly.run>
To:     Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc:     Matt Redfearn <matt.redfearn@...nci.com>,
        Archit Taneja <architt@...eaurora.org>,
        David Airlie <airlied@...ux.ie>,
        Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Matthew Redfearn <matthew.redfearn@...nci.com>,
        Jia-Ju Bai <baijiaju1990@...il.com>,
        Sean Paul <seanpaul@...omium.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] drm/bridge: adv7511: Fix low refresh rate selection

On Sat, May 11, 2019 at 10:32:26PM +0300, Laurent Pinchart wrote:
> Hi Matt,
> 
> Thank you for the patch.
> 
> On Wed, Apr 24, 2019 at 01:22:27PM +0000, Matt Redfearn wrote:
> > The driver currently sets register 0xfb (Low Refresh Rate) based on the
> > value of mode->vrefresh. Firstly, this field is specified to be in Hz,
> > but the magic numbers used by the code are Hz * 1000. This essentially
> > leads to the low refresh rate always being set to 0x01, since the
> > vrefresh value will always be less than 24000. Fix the magic numbers to
> > be in Hz.
> > Secondly, according to the comment in drm_modes.h, the field is not
> > supposed to be used in a functional way anyway. Instead, use the helper
> > function drm_mode_vrefresh().
> > 
> > Fixes: 9c8af882bf12 ("drm: Add adv7511 encoder driver")
> > Signed-off-by: Matt Redfearn <matt.redfearn@...nci.com>
> 
> Wow, a 4.5 year old bug fix, nice :-)
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> 

Applied to drm-misc-next-fixes.

Thanks!

Sean

> > ---
> > 
> >  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > index 85c2d407a52..e7ddd3e3db9 100644
> > --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > @@ -747,11 +747,11 @@ static void adv7511_mode_set(struct adv7511 *adv7511,
> >  			vsync_polarity = 1;
> >  	}
> >  
> > -	if (mode->vrefresh <= 24000)
> > +	if (drm_mode_vrefresh(mode) <= 24)
> >  		low_refresh_rate = ADV7511_LOW_REFRESH_RATE_24HZ;
> > -	else if (mode->vrefresh <= 25000)
> > +	else if (drm_mode_vrefresh(mode) <= 25)
> >  		low_refresh_rate = ADV7511_LOW_REFRESH_RATE_25HZ;
> > -	else if (mode->vrefresh <= 30000)
> > +	else if (drm_mode_vrefresh(mode) <= 30)
> >  		low_refresh_rate = ADV7511_LOW_REFRESH_RATE_30HZ;
> >  	else
> >  		low_refresh_rate = ADV7511_LOW_REFRESH_RATE_NONE;
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ