Re: [PATCH 11/15] drm/sun4i: tcon: Fix tcon channel 1 backporch calculation

2017-03-08 Thread Chen-Yu Tsai
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?

Otherwise,

Acked-by: Chen-Yu Tsai 

> -   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.8.11
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 11/15] drm/sun4i: tcon: Fix tcon channel 1 backporch calculation

2017-03-08 Thread Maxime Ripard
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


signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 11/15] drm/sun4i: tcon: Fix tcon channel 1 backporch calculation

2017-03-07 Thread Maxime Ripard
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 */
-   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.8.11
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel