Received: by 10.223.185.116 with SMTP id b49csp7216565wrg; Thu, 1 Mar 2018 01:40:47 -0800 (PST) X-Google-Smtp-Source: AG47ELtFvah8t7eXUgKpH645JBGEi7PeMDpZHAwwDK5qQDPknXa10LMv7/fI+OoUOXu+BArjAQvu X-Received: by 2002:a17:902:8349:: with SMTP id z9-v6mr1328066pln.163.1519897247314; Thu, 01 Mar 2018 01:40:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519897247; cv=none; d=google.com; s=arc-20160816; b=cumZpWyu15+v0jsAEwepQd4Oac1e95v1rrbJqSso+TTCHyzj7rn9coL7Vxg8NXiliP DZoH748F38spqhuyoNng9elzixkQSI3K4bqVLagmlP/+e/CyW+TZ62BTiNoM+mnkJxV6 A5yRyb8VkhwqhivjdiA/cXrBvh47r+KcBI+s2huLX9VQcnpbqXHj4/urAwIfytDtItUb piMVkPftauhIoPEsV1MpOY7agTup3u5TbWzOg+5FT2ojrqiW4TGnuW9gV2fdLbw+G6Bo ZE/0GbQxCbJ2awxN/9XbNwr9Hp7lTZUttRIPs51LET9lLpZwE4EJK2s6fG8H5F5p7Awb wW2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=rEzjwp0oOBFz6Gs/1GwsOl42t8aGFgumT5mcxe0niFc=; b=oQas+vugSoOlgHoIhjNSh3M1Axpbbmr5OOmSbKWMH2OFQNZwPlPX5cNBCULtUhycM3 2OYd3qG7WSshFR3gvBr2mWvV8LCl5N6aUyNs/+rpkSPIShKQFH7DMAI6EtJ2bW6RzXnR MwMsviIC0+cisuabC9qUzIQ1OyYecVZgnfQnei27TVwxaDJXF9GKYUCveV6fuFBltW2n GfLf1yoHfvaqrnvxPCNZ+pZmxZVFti2baPUuo5PBc86vePF8EuwJ7gCD/L+AEUwv5kgF /7YvhfSrDiUPt3BKHLvCQRpUForHRquW5yybVBBP9JpQScIwtKpdcnhjw2rKr7Ih+QpN N37w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 59-v6si1012785pla.754.2018.03.01.01.40.32; Thu, 01 Mar 2018 01:40:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967018AbeCAJjZ (ORCPT + 99 others); Thu, 1 Mar 2018 04:39:25 -0500 Received: from mail.bootlin.com ([62.4.15.54]:34974 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966675AbeCAJjW (ORCPT ); Thu, 1 Mar 2018 04:39:22 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 938BA207F2; Thu, 1 Mar 2018 10:39:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.189]) by mail.bootlin.com (Postfix) with ESMTPSA id EC41520794; Thu, 1 Mar 2018 10:39:08 +0100 (CET) Date: Thu, 1 Mar 2018 10:39:09 +0100 From: Maxime Ripard To: Giulio Benetti Cc: David Airlie , Chen-Yu Tsai , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/sun4i: Handle DRM_BUS_FLAG_PIXDATA_*EDGE Message-ID: <20180301093909.ph6nuvxuqtwyfssd@flea> References: <1519834492-30559-1-git-send-email-giulio.benetti@micronovasrl.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rvhq4e4gay73qp4b" Content-Disposition: inline In-Reply-To: <1519834492-30559-1-git-send-email-giulio.benetti@micronovasrl.com> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --rvhq4e4gay73qp4b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 28, 2018 at 05:14:52PM +0100, Giulio Benetti wrote: > Handle both positive and negative dclk polarity, > according to bus_flags. >=20 > Signed-off-by: Giulio Benetti > --- > drivers/gpu/drm/sun4i/sun4i_tcon.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/s= un4i_tcon.c > index aaf911a..534e5ee 100644 > --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c > +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c > @@ -17,6 +17,7 @@ > #include > #include > #include > +#include > =20 > #include > =20 > @@ -340,6 +341,9 @@ static void sun4i_tcon0_mode_set_lvds(struct sun4i_tc= on *tcon, > static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, > const struct drm_display_mode *mode) > { > + struct drm_panel *panel =3D tcon->panel; > + struct drm_connector *connector =3D panel->connector; > + struct drm_display_info display_info =3D connector->display_info; > unsigned int bp, hsync, vsync; > u8 clk_delay; > u32 val =3D 0; > @@ -395,8 +399,15 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tc= on *tcon, > if (mode->flags & DRM_MODE_FLAG_PVSYNC) > val |=3D SUN4I_TCON0_IO_POL_VSYNC_POSITIVE; > =20 > + if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_POSEDGE) > + clk_set_phase(tcon->dclk, 240); > + > + if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE) > + clk_set_phase(tcon->dclk, 0); > + This needs to have a whole bunch of comments here. We want to have basically the whole discussion we had by mail previously about this in there. And the same goes for your commit log. > regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG, > - SUN4I_TCON0_IO_POL_HSYNC_POSITIVE | SUN4I_TCON0_IO_POL_VSYNC_POSIT= IVE, > + SUN4I_TCON0_IO_POL_HSYNC_POSITIVE | > + SUN4I_TCON0_IO_POL_VSYNC_POSITIVE, > val); This has nothing to do with your patch. Maxime --=20 Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com --rvhq4e4gay73qp4b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlqXyjwACgkQ0rTAlCFN r3Qqng/+NJRke8sq+795RZCyYCj8ln3Tzpojn9Rr+dxH5E1EsQAmVLrzxfRoMmws EI3VY0TM1XApOFqxRekmGMYc8KlFMEBF48WCvRXVzAXcMmMTXfETmQArxM919ETt TqOgTIodv7HejUqofIUlxv/tABWZ2LGKXjN/vgBVqa2ChIU4dFAxeApXxdCB8Akm T6Ry3RPJ7g2rPIVyTUQxhh8GF9wSYYDZBJpDa28DIMrms6fulnanRpMKR0yloHkJ B3vEr2h66BToztDRkvcc8UkxlRrPQnZU010jnikOQBJr7akTNDAjzzTBIJM//gMN /0wmLZwwVO9aTh8t7+xrVtEAPCfORYO4zoUqEOwSqLE0EmBbshfWzf0umnr4Um38 5z8u0hlgR2+chgB3WiK/U1CoG8GsulXiCWjeQUs5fyBdcnQVadl98ouHD7ixLa/9 Isxf+V5G6L7YPd9TrN4IidCBM/0WeZzDAax8mO3zRhQ7M9hRbS7EF+8ZYH2kuXFG Y6S7avtT4cQ7MPHsRdpLrbldvJjPuPUct9qmKnXWdF7OiZBSpgIgzO7Yt8Vi+R2k vhhsKdk84c2o4ZyotNBQlMiSmC0uos0dXtfjKIVBYnCp9R4mLvqSmBtB6K1Lursv gdex8GMrmpfrX9de6YyMAHXvwfQJHDEctP+jiI7qUTJWt6M/rsY= =gcH5 -----END PGP SIGNATURE----- --rvhq4e4gay73qp4b--