Hi,

On Mon, 2019-02-11 at 15:41 +0100, Maxime Ripard wrote:
> The DRQ calculation code in the Allwinner BSP uses the vertical front
> porch value as the condition, but we're using the video back porch.
> 
> Since I always confuse the two, and I'm the original author of that code, I
> guess I deserved a brown paper bag.
> 
> Signed-off-by: Maxime Ripard <maxime.rip...@bootlin.com>

Assuming that the BSP's hbp is referring to the back porch only, then
calculating ht - x - hbp does give us the front porch + hsync length.

Well, let's guess that this about the front porch only until we know
better. It's certainly better than using the back porch anyway :)

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

Cheers,

Paul

> ---
>  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c 
> b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> index 2518a0d7567c..8e6392831e9d 100644
> --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> @@ -372,9 +372,9 @@ static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi,
>       struct mipi_dsi_device *device = dsi->device;
>       u32 val = 0;
>  
> -     if ((mode->hsync_end - mode->hdisplay) > 20) {
> +     if ((mode->hsync_start - mode->hdisplay) > 20) {
>               /* Maaaaaagic */
> -             u16 drq = (mode->hsync_end - mode->hdisplay) - 20;
> +             u16 drq = (mode->hsync_start - mode->hdisplay) - 20;
>  
>               drq *= mipi_dsi_pixel_format_to_bpp(device->format);
>               drq /= 32;
-- 
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