From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752828AbeAVIvQ (ORCPT ); Mon, 22 Jan 2018 03:51:16 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:43302 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751966AbeAVIvO (ORCPT ); Mon, 22 Jan 2018 03:51:14 -0500 Date: Mon, 22 Jan 2018 09:51:12 +0100 From: Maxime Ripard To: Giulio Benetti Cc: airlied@linux.ie, wens@csie.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] drm/sun4i: Handle DRM_MODE_FLAG_**SYNC_POSITIVE correctly Message-ID: <20180122085112.7xo2t3x5ag4k2kpl@flea.lan> References: <1516474221-114596-1-git-send-email-giulio.benetti@micronovasrl.com> <1516474221-114596-2-git-send-email-giulio.benetti@micronovasrl.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="evkrrzzysytke6sc" Content-Disposition: inline In-Reply-To: <1516474221-114596-2-git-send-email-giulio.benetti@micronovasrl.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --evkrrzzysytke6sc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > Signed-off-by: Giulio Benetti >=20 > PVSYNC and PHSYNC only >=20 > Signed-off-by: Giulio Benetti Checkpatch: WARNING: Duplicate signature > --- > drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/s= un4i_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_t= con *tcon, > SUN4I_TCON0_BASIC3_H_SYNC(hsync)); > =20 > /* Setup the polarity of the various signals */ > - if (!(mode->flags & DRM_MODE_FLAG_PHSYNC)) > + if (mode->flags & DRM_MODE_FLAG_PHSYNC) > val |=3D SUN4I_TCON0_IO_POL_HSYNC_POSITIVE; > =20 > - if (!(mode->flags & DRM_MODE_FLAG_PVSYNC)) > + if (mode->flags & DRM_MODE_FLAG_PVSYNC) > val |=3D 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 --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --evkrrzzysytke6sc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlplpf8ACgkQ0rTAlCFN r3Qm0g//R9C3LOrDU8iXrA8R/ty6Z/GZUBJO0pwfbbBsi1RaTbj0FANSqiXNW2BR n1MFVhiKsaPuXzRbuUemoPS6rokbvwppq3sDpfNeK8nzJIPW+SKwA8v+k5Z3HDFS riOIeq+diUpuvEPYdILDr7NaQwcIhnFKtwpSBrHMPsrXyMqlAJpMQWgWC2P2occg A15y/NEydpNPIOIq2OueDXJfSIs1lKSz6y1hBlIqYB2OGVue51AT/qitYGfHGBEO 5YIC+8w9nEjT/sxsHmwDEhdoRb4mZ4+MzkyVsWMUJXoxwKS0+hXZOFIeuoi4FQXq +PDoE+waXHE6VeM2Rn25uX+WDHCOlL6ZCAx8fBJ9n6QjYSqRtkRL3V2RP888Phed NyCLRZDLTq4EZsa7B6ZTZ96XeE2Ul88IGxC3sZXWXnPNcCn6WtqbSCYLEfljkbdV tiQNfvbbOxQQ18jEmGaPTpGGm59wUtoELta2Oc37Ly2EtrajM1dIdIcnWcM8bTwU 4+Qk/g1rWiJlIiY29yyQPlBgzqyp3PnCEjtmXkm1t4z9aV2JaeuA8RrrBmOPzemI GlKed8Ap+auc+dGfLR4EPkuy9i50s/MhH4Tnkz6C8JP1rpOcz9yHeGYAGUIk89Rh idmZuwOpm2FiYNGmRopyqHKVw0JpIHP2N1oFseNHhD+0OzGqX3A= =ip3G -----END PGP SIGNATURE----- --evkrrzzysytke6sc--