From: Giulio Benetti <giulio.benetti@benettiengineering.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: Marjan Pascolo <marjan.pascolo@trexom.it>,
wens@csie.org, daniel@ffwll.ch, airlied@linux.ie,
treding@nvidia.com, Jernej Skrabec <jernej.skrabec@siol.net>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Giulio Benetti <giulio.benetti@micronovasrl.com>
Subject: [PATCH v2 1/2] drm/sun4i: tcon: fix inverted DCLK polarity
Date: Thu, 7 Jan 2021 03:30:31 +0100 [thread overview]
Message-ID: <20210107023032.560182-2-giulio.benetti@benettiengineering.com> (raw)
In-Reply-To: <20210107023032.560182-1-giulio.benetti@benettiengineering.com>
From: Giulio Benetti <giulio.benetti@micronovasrl.com>
During commit 88bc4178568b ("drm: Use new
DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags") DRM_BUS_FLAG_*
macros have been changed to avoid ambiguity but just because of this
ambiguity previous DRM_BUS_FLAG_PIXDATA_(POS/NEG)EDGE were used meaning
_SAMPLE_ not _DRIVE_. This lead to DLCK inversion, so let's swap DCLK
phase to fix it.
Fixes: 88bc4178568b ("drm: Use new DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags")
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
V1->V2:
use Fixes: tag in commit log as suggested by Jernej
---
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 eaaf5d70e352..52598bb0fb0b 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -585,10 +585,10 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,
* and DOTCLOCK drivers.
*/
if (info->bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE)
- clk_set_phase(tcon->dclk, 240);
+ clk_set_phase(tcon->dclk, 0);
if (info->bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE)
- clk_set_phase(tcon->dclk, 0);
+ clk_set_phase(tcon->dclk, 240);
regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG,
SUN4I_TCON0_IO_POL_HSYNC_POSITIVE |
--
2.25.1
next prev parent reply other threads:[~2021-01-07 2:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 19:27 [PATCH 0/2] drm/sun4i: fix DCLK and improve its handling Giulio Benetti
2021-01-06 19:27 ` [PATCH 1/2] drm/sun4i: tcon: fix inverted DCLK polarity Giulio Benetti
2021-01-06 21:00 ` Jernej Škrabec
2021-01-07 2:30 ` [PATCH v2 0/2] drm/sun4i: fix DCLK and improve its handling Giulio Benetti
2021-01-07 2:30 ` Giulio Benetti [this message]
2021-01-07 2:30 ` [PATCH v2 2/2] drm/sun4i: tcon: improve DCLK polarity handling Giulio Benetti
2021-01-08 9:23 ` Maxime Ripard
2021-01-08 14:34 ` Giulio Benetti
2021-01-11 17:20 ` Maxime Ripard
2021-01-11 17:37 ` Giulio Benetti
2021-01-11 17:46 ` [PATCH v3] drm/sun4i: tcon: fix inverted DCLK polarity Giulio Benetti
2021-01-13 9:42 ` Maxime Ripard
2021-01-13 10:47 ` [PATCH v4] " Giulio Benetti
2021-01-13 16:05 ` [PATCH v5] " Giulio Benetti
2021-01-14 1:32 ` kernel test robot
2021-01-14 7:58 ` Marjan Pascolo
2021-01-14 8:12 ` Giulio Benetti
2021-01-14 8:17 ` [PATCH v6] " Giulio Benetti
2021-01-14 11:40 ` Marjan Pascolo
2021-01-14 11:42 ` Maxime Ripard
2021-02-10 16:22 ` [PATCH] pinctrl/sunxi: adding input-debounce-ns property Marjan Pascolo
2021-02-17 11:03 ` Maxime Ripard
2021-02-26 12:53 ` Marjan Pascolo
2021-03-04 15:51 ` Maxime Ripard
2021-01-13 10:48 ` [PATCH v3] drm/sun4i: tcon: fix inverted DCLK polarity Giulio Benetti
[not found] ` <00f21d15-7a88-2d01-dd48-dc49e9295e34@trexom.it>
2021-01-08 14:46 ` [PATCH v2 2/2] drm/sun4i: tcon: improve DCLK polarity handling Giulio Benetti
2021-01-06 19:28 ` [PATCH " Giulio Benetti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210107023032.560182-2-giulio.benetti@benettiengineering.com \
--to=giulio.benetti@benettiengineering.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=giulio.benetti@micronovasrl.com \
--cc=jernej.skrabec@siol.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marjan.pascolo@trexom.it \
--cc=maxime@cerno.tech \
--cc=treding@nvidia.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).