OMAPDSS: skip pclk check for WB mem2mem
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 4 Nov 2015 15:10:51 +0000 (17:10 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 29 Dec 2015 09:06:27 +0000 (11:06 +0200)
When doing mem-to-mem writeback, there's no pixelclock. However, the
code that calculates scaling factors check that there is a pixel clock.
We can just skip the check when doing mem-to-mem writeback.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/omap2/dss/dispc.c

index 3cd78dc..837b1f5 100644 (file)
@@ -2477,7 +2477,7 @@ static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk,
        if (width == out_width && height == out_height)
                return 0;
 
-       if (pclk == 0 || mgr_timings->pixelclock == 0) {
+       if (!mem_to_mem && (pclk == 0 || mgr_timings->pixelclock == 0)) {
                DSSERR("cannot calculate scaling settings: pclk is zero\n");
                return -EINVAL;
        }