]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/omap: Add pclk setting case when channel is DSS_WB
authorBenoit Parrot <bparrot@ti.com>
Mon, 16 May 2016 21:42:50 +0000 (16:42 -0500)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 1 Mar 2018 07:18:18 +0000 (09:18 +0200)
In dispc_set_ovl_common() we need to initialize pclk to a valid
value when we use WB in capture mode (i.e. mem_2_mem is false).
Otherwise dispc_ovl_calc_scaling() fails.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/dss/dispc.c

index f0f729fc4ca2a5accf21540f8e00f3c3a55a85b0..3ad56b30c90ab3fb55659ca169c40877adcf8e25 100644 (file)
@@ -2590,6 +2590,10 @@ static int dispc_ovl_setup_common(struct dispc_device *dispc,
        unsigned long pclk = dispc_plane_pclk_rate(dispc, plane);
        unsigned long lclk = dispc_plane_lclk_rate(dispc, plane);
 
+       /* when setting up WB, dispc_plane_pclk_rate() returns 0 */
+       if (plane == OMAP_DSS_WB)
+               pclk = vm->pixelclock;
+
        if (paddr == 0 && rotation_type != OMAP_DSS_ROT_TILER)
                return -EINVAL;