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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180122085112.7xo2t3x5ag4k2kpl@flea.lan>
Date:   Mon, 22 Jan 2018 09:51:12 +0100
From:   Maxime Ripard <maxime.ripard@...e-electrons.com>
To:     Giulio Benetti <giulio.benetti@...ronovasrl.com>
Cc:     airlied@...ux.ie, wens@...e.org, dri-devel@...ts.freedesktop.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] drm/sun4i: Handle DRM_MODE_FLAG_**SYNC_POSITIVE
 correctly

On Sat, Jan 20, 2018 at 07:50:21PM +0100, Giulio Benetti wrote:
> On previous handling, if specified DRM_MODE_FLAG_N*SYNC,
> it was ignored,
> because only PHSYNC and PVSYNC were taken into account.
> DRM_MODE_FLAG_P*SYNC and DRM_MODE_FLAG_N*SYNC are not exclusive.
> 
> If flags contains PVSYNC, it doesn't mean it is NVSYNC.
> And it's true also the contrary.
> Also, as I've checked with scope on A20,
> if (flags & PVSYNC) then SUN4I_TCON0_IO_POL_VSYNC_POSITIVE
> must be set, as name suggests.
> It seems all display io polarities starts inverted if 0.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@...ronovasrl.com>
> 
> PVSYNC and PHSYNC only
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@...ronovasrl.com>

Checkpatch:
WARNING: Duplicate signature

> ---
>  drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
> index 6121210..e873a37 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
> @@ -224,10 +224,10 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,
>  		     SUN4I_TCON0_BASIC3_H_SYNC(hsync));
>  
>  	/* Setup the polarity of the various signals */
> -	if (!(mode->flags & DRM_MODE_FLAG_PHSYNC))
> +	if (mode->flags & DRM_MODE_FLAG_PHSYNC)
>  		val |= SUN4I_TCON0_IO_POL_HSYNC_POSITIVE;
>  
> -	if (!(mode->flags & DRM_MODE_FLAG_PVSYNC))
> +	if (mode->flags & DRM_MODE_FLAG_PVSYNC)
>  		val |= SUN4I_TCON0_IO_POL_VSYNC_POSITIVE;

I'm not sure why you were talking of the differences between NVSYNC
and PVSYNC if you're not making use of any of it here?

Also, how was it tested? This seems quite weird that we haven't caught
that one sooner, and I'm a bit worried about the possible regressions
here.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ