]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00292585 IPUv3: Fix a horizontal line at the middle playing 1080i
authorOliver Brown <oliver.brown@freescale.com>
Thu, 19 Dec 2013 18:59:05 +0000 (12:59 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 16 Jun 2014 16:09:15 +0000 (18:09 +0200)
Added additional check to handle stripe limits differently for upscaling
and downscaling. Upscaling requires relaxed checking because input stripe
may fall slighty outside of the input window. Downscaling requires strict
limit checking.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
drivers/mxc/ipu3/ipu_device.c

index 92f3cd8486dad3533c807e9a2e2dff40aba8738b..19ee573e802063f442ef43ffc997d8c3089cf12a 100644 (file)
@@ -932,7 +932,14 @@ static int update_split_setting(struct ipu_task_entry *t, bool vdi_split)
                t->set.sp_setting.o_bottom_pos = 0;
        }
 
-       if ((t->set.sp_setting.ih + t->set.sp_setting.i_bottom_pos) > (ih+16))
+       /* downscale case: enforce limits */
+       if (((t->set.sp_setting.ih + t->set.sp_setting.i_bottom_pos) > (ih))
+            && (t->set.sp_setting.ih >= t->set.sp_setting.oh))
+               return IPU_CHECK_ERR_SPLIT_INPUTH_OVER;
+       /* upscale case: relax limits because ipu_calc_stripes_sizes() may
+          create input stripe that falls just outside of the input window */
+       else if ((t->set.sp_setting.ih + t->set.sp_setting.i_bottom_pos)
+                > (ih+16))
                return IPU_CHECK_ERR_SPLIT_INPUTH_OVER;
        if (((t->set.sp_setting.oh + t->set.sp_setting.o_bottom_pos) > oh)
                || (t->set.sp_setting.oh > soc_max_out_height()))