Hi,

On Mon, 2019-02-11 at 15:41 +0100, Maxime Ripard wrote:
> Since I always confuse the back and front porches, a few miscalculation
> slipped through. Fix them.
> 
> Signed-off-by: Maxime Ripard <maxime.rip...@bootlin.com>

Food for thoughts: everything indicates that backporch does not count
sync length for the DSI registers (while it does for TCON). So all
these changes look good!

Reviewed-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com>

Cheers,

Paul

> ---
>  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c 
> b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> index 506f2e8cf454..2518a0d7567c 100644
> --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> @@ -477,7 +477,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
>        */
>  #define HBP_PACKET_OVERHEAD  6
>       hbp = max((unsigned int)HBP_PACKET_OVERHEAD,
> -               (mode->hsync_start - mode->hdisplay) * Bpp - 
> HBP_PACKET_OVERHEAD);
> +               (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD);
>  
>       /*
>        * The frontporch is set using a blanking packet (4 bytes +
> @@ -485,7 +485,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
>        */
>  #define HFP_PACKET_OVERHEAD  6
>       hfp = max((unsigned int)HFP_PACKET_OVERHEAD,
> -               (mode->htotal - mode->hsync_end) * Bpp - HFP_PACKET_OVERHEAD);
> +               (mode->hsync_start - mode->hdisplay) * Bpp - 
> HFP_PACKET_OVERHEAD);
>  
>       /*
>        * hblk seems to be the line + porches length.
> @@ -531,8 +531,8 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
>       regmap_write(dsi->regs, SUN6I_DSI_BASIC_SIZE0_REG,
>                    SUN6I_DSI_BASIC_SIZE0_VSA(mode->vsync_end -
>                                              mode->vsync_start) |
> -                  SUN6I_DSI_BASIC_SIZE0_VBP(mode->vsync_start -
> -                                            mode->vdisplay));
> +                  SUN6I_DSI_BASIC_SIZE0_VBP(mode->vtotal -
> +                                            mode->vsync_end));
>  
>       regmap_write(dsi->regs, SUN6I_DSI_BASIC_SIZE1_REG,
>                    SUN6I_DSI_BASIC_SIZE1_VACT(mode->vdisplay) |
-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to