From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932076AbdCHVwy (ORCPT ); Wed, 8 Mar 2017 16:52:54 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:48543 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754591AbdCHVww (ORCPT ); Wed, 8 Mar 2017 16:52:52 -0500 Date: Wed, 8 Mar 2017 09:55:41 +0100 From: Maxime Ripard To: Chen-Yu Tsai Cc: Mike Turquette , Stephen Boyd , dri-devel , Daniel Vetter , David Airlie , Mark Rutland , Rob Herring , devicetree , linux-clk , linux-arm-kernel , linux-kernel , linux-sunxi Subject: Re: [PATCH 11/15] drm/sun4i: tcon: Fix tcon channel 1 backporch calculation Message-ID: <20170308085541.p75lt7hmjzbzzpem@lukather> References: <475aeed1da40d46d8e50420c281a74c32b78c730.1488876832.git-series.maxime.ripard@free-electrons.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3ekb4dmocyjhfaca" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --3ekb4dmocyjhfaca Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 08, 2017 at 12:25:59PM +0800, Chen-Yu Tsai wrote: > On Tue, Mar 7, 2017 at 4:56 PM, Maxime Ripard > wrote: > > It seems like what's called a backporch in the datasheet is actually the > > backporch plus the sync period. Fix that in our driver. > > > > Signed-off-by: Maxime Ripard > > --- > > drivers/gpu/drm/sun4i/sun4i_tcon.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i= /sun4i_tcon.c > > index 93249c5ab1e4..e44217fb4f6f 100644 > > --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c > > +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c > > @@ -240,15 +240,14 @@ void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon= , struct drm_encoder *encoder, > > SUN4I_TCON1_BASIC2_Y(mode->crtc_vdisplay)); > > > > /* Set horizontal display timings */ > > - bp =3D mode->crtc_htotal - mode->crtc_hsync_end; > > + bp =3D 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, > > SUN4I_TCON1_BASIC3_H_TOTAL(mode->crtc_htotal) | > > SUN4I_TCON1_BASIC3_H_BACKPORCH(bp)); > > > > - /* Set vertical display timings */ >=20 > Why remove the comment? I have no idea :) This will be fixed. Thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --3ekb4dmocyjhfaca Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYv8cJAAoJEBx+YmzsjxAgS7sP/jpkb39RNCNPzQ6N1glivs9h jbt0WXqjvMuf2CbUo/H94Rs7K5Me+dNPgmlfdOU8ei15kia4QhVzufyiLgY/EjFw QUpzhoTMILp45syzoH6FbuFg8LYm8OCo9nnSk+3TLMShPkH8kph9RUFk8F+nWn+J GXotZzobRdHkJ+aWwgYqbl4P+on7dy2WOfSGac6NPv4Wg63NTc4kwgAH6VP1e6us PYPgdC6Ykbfu4w/er7V0wkbiPH/0oaSnhlhMEWT1FC7GX3+qVDL/gKnMXu/ejtAi VhFWIZ8g/NIXeUcA6y9MSABNHSZK9PBwBfivhtfVPn5lY1On6hfjHvHB89rStp+P t12XljGxmpQxzLOFVDnk0vKYFY48myt0efmvPuhFCMlpiHdlKSGWERrdaxXkKk/p UcmQKnU7JRVYFwvBouyNzmT+CbSIzgjHILEG5ZDrIKM0qiFOMb3CIEnW4d/EmkQS Kr8dLXcdjltQZvJ5T6InEcxPeZL5V/dQwjYcca5VVX97n/67Bw64gl9nR5sX2G6U lJiuPDUrPCHGzfQeWkDd5pJkaxLC8NYTp8keY5ktBm4Wt6S6DmglkY7Suonbdec3 zhxMVxOOysNS61z7igGDBfW9pd2gngV0UE1hYzyxW6wMBwr3L7YUzf2tYluKHohr fsHUc5Ff4arGg78slgyj =Jcec -----END PGP SIGNATURE----- --3ekb4dmocyjhfaca-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH 11/15] drm/sun4i: tcon: Fix tcon channel 1 backporch calculation Date: Wed, 8 Mar 2017 09:55:41 +0100 Message-ID: <20170308085541.p75lt7hmjzbzzpem@lukather> References: <475aeed1da40d46d8e50420c281a74c32b78c730.1488876832.git-series.maxime.ripard@free-electrons.com> Reply-To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3ekb4dmocyjhfaca" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Chen-Yu Tsai Cc: Mike Turquette , Stephen Boyd , dri-devel , Daniel Vetter , David Airlie , Mark Rutland , Rob Herring , devicetree , linux-clk , linux-arm-kernel , linux-kernel , linux-sunxi List-Id: devicetree@vger.kernel.org --3ekb4dmocyjhfaca Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline On Wed, Mar 08, 2017 at 12:25:59PM +0800, Chen-Yu Tsai wrote: > On Tue, Mar 7, 2017 at 4:56 PM, Maxime Ripard > wrote: > > It seems like what's called a backporch in the datasheet is actually the > > backporch plus the sync period. Fix that in our driver. > > > > Signed-off-by: Maxime Ripard > > --- > > drivers/gpu/drm/sun4i/sun4i_tcon.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c > > index 93249c5ab1e4..e44217fb4f6f 100644 > > --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c > > +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c > > @@ -240,15 +240,14 @@ void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon, struct drm_encoder *encoder, > > 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, > > SUN4I_TCON1_BASIC3_H_TOTAL(mode->crtc_htotal) | > > SUN4I_TCON1_BASIC3_H_BACKPORCH(bp)); > > > > - /* Set vertical display timings */ > > Why remove the comment? I have no idea :) This will be fixed. Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --3ekb4dmocyjhfaca-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@free-electrons.com (Maxime Ripard) Date: Wed, 8 Mar 2017 09:55:41 +0100 Subject: [PATCH 11/15] drm/sun4i: tcon: Fix tcon channel 1 backporch calculation In-Reply-To: References: <475aeed1da40d46d8e50420c281a74c32b78c730.1488876832.git-series.maxime.ripard@free-electrons.com> Message-ID: <20170308085541.p75lt7hmjzbzzpem@lukather> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Mar 08, 2017 at 12:25:59PM +0800, Chen-Yu Tsai wrote: > On Tue, Mar 7, 2017 at 4:56 PM, Maxime Ripard > wrote: > > It seems like what's called a backporch in the datasheet is actually the > > backporch plus the sync period. Fix that in our driver. > > > > Signed-off-by: Maxime Ripard > > --- > > drivers/gpu/drm/sun4i/sun4i_tcon.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c > > index 93249c5ab1e4..e44217fb4f6f 100644 > > --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c > > +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c > > @@ -240,15 +240,14 @@ void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon, struct drm_encoder *encoder, > > 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, > > SUN4I_TCON1_BASIC3_H_TOTAL(mode->crtc_htotal) | > > SUN4I_TCON1_BASIC3_H_BACKPORCH(bp)); > > > > - /* Set vertical display timings */ > > Why remove the comment? I have no idea :) This will be fixed. Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: