linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Chen-Yu Tsai <wens@csie.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com,
	Hans Verkuil <hverkuil@xs4all.nl>
Subject: [PATCH v4 04/11] drm/sun4i: tcon: Fix tcon channel 1 backporch calculation
Date: Sat, 27 May 2017 18:09:29 +0200	[thread overview]
Message-ID: <edb1cf56431966445ddd6b6948e1e77a301f1f5d.1495900658.git-series.maxime.ripard@free-electrons.com> (raw)
In-Reply-To: <cover.c61cbe60123a4aeb24f255bca7927218dda6283e.1495900658.git-series.maxime.ripard@free-electrons.com>
In-Reply-To: <cover.c61cbe60123a4aeb24f255bca7927218dda6283e.1495900658.git-series.maxime.ripard@free-electrons.com>

It seems like what's called a backporch in the datasheet is actually the
backporch plus the sync period. Fix that in our driver.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 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 28da61ac9bab..6993ef3888dd 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -269,7 +269,7 @@ void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon,
 		     SUN4I_TCON1_BASIC2_Y(mode->crtc_vdisplay));
 
 	/* Set horizontal display timings */
-	bp = mode->crtc_htotal - mode->crtc_hsync_end;
+	bp = mode->crtc_htotal - mode->crtc_hsync_start;
 	DRM_DEBUG_DRIVER("Setting horizontal total %d, backporch %d\n",
 			 mode->htotal, bp);
 	regmap_write(tcon->regs, SUN4I_TCON1_BASIC3_REG,
@@ -277,7 +277,7 @@ void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon,
 		     SUN4I_TCON1_BASIC3_H_BACKPORCH(bp));
 
 	/* Set vertical display timings */
-	bp = mode->crtc_vtotal - mode->crtc_vsync_end;
+	bp = mode->crtc_vtotal - mode->crtc_vsync_start;
 	DRM_DEBUG_DRIVER("Setting vertical total %d, backporch %d\n",
 			 mode->vtotal, bp);
 	regmap_write(tcon->regs, SUN4I_TCON1_BASIC4_REG,
-- 
git-series 0.9.1

  parent reply	other threads:[~2017-05-27 16:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-27 16:09 [PATCH v4 00/11] drm: sun4i: Add support for the HDMI controller Maxime Ripard
2017-05-27 16:09 ` [PATCH v4 01/11] drm/sun4i: tcon: Add channel debug Maxime Ripard
2017-05-27 16:09 ` [PATCH v4 02/11] drm/sun4i: tcon: Move the muxing out of the mode set function Maxime Ripard
2017-05-27 16:09 ` [PATCH v4 03/11] drm/sun4i: tcon: Switch mux on only for composite Maxime Ripard
2017-05-27 16:09 ` Maxime Ripard [this message]
2017-05-27 16:09 ` [PATCH v4 05/11] drm/sun4i: tcon: Change vertical total size computation inconsistency Maxime Ripard
2017-05-27 16:09 ` [PATCH v4 06/11] drm/sun4i: tcon: multiply the vtotal when not in interlace Maxime Ripard
2017-05-28 14:55   ` Chen-Yu Tsai
2017-05-27 16:09 ` [PATCH v4 07/11] drm/sun4i: Ignore the generic connectors for components Maxime Ripard
2017-05-27 16:09 ` [PATCH v4 08/11] dt-bindings: display: sun4i: Add HDMI display bindings Maxime Ripard
2017-05-27 16:09 ` [PATCH v4 09/11] dt-bindings: display: sun4i: Add allwinner,tcon-channel property Maxime Ripard
2017-05-27 16:09 ` [PATCH v4 10/11] drm/sun4i: Add HDMI support Maxime Ripard
2017-05-27 16:09 ` [PATCH v4 11/11] drm/sun4i: Add compatible for the A10s pipeline Maxime Ripard
2017-05-29  9:16 ` [PATCH v4 00/11] drm: sun4i: Add support for the HDMI controller Maxime Ripard

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=edb1cf56431966445ddd6b6948e1e77a301f1f5d.1495900658.git-series.maxime.ripard@free-electrons.com \
    --to=maxime.ripard@free-electrons.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.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).