summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRan Ferderber <Ran.Ferderber@freescale.com>2009-12-09 18:30:51 +0200
committerJustin Waters <justin.waters@timesys.com>2010-03-25 14:01:46 -0400
commitacc41cfb94eece13a5d2b9dca2543885f6211a8f (patch)
treef2649aadd8b18bbb34d613b714a97ff18d914ef4
parent5c2fffec7406f81988824933bf55a97bb66ff2f0 (diff)
ENGR00114151 800x600-16@60 video not play correctly
Setting "video=mxcfb:800x600-16@60" in the exec command makes video not play correctly, IPU didn't play video when panel blank line where lower then minimum required by IPU Signed-off-by: Ran Ferderber r53561@freescale.com
-rw-r--r--drivers/mxc/ipu3/ipu_disp.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/mxc/ipu3/ipu_disp.c b/drivers/mxc/ipu3/ipu_disp.c
index 1135fcbaf3c2..505d3f7d84d7 100644
--- a/drivers/mxc/ipu3/ipu_disp.c
+++ b/drivers/mxc/ipu3/ipu_disp.c
@@ -795,6 +795,28 @@ void _ipu_dp_set_csc_coefficients(ipu_channel_t channel, int32_t param[][3])
}
/*!
+ * This function is called to adapt synchronous LCD panel to IPU restriction.
+ *
+ */
+void adapt_panel_to_ipu_restricitions(uint16_t *pixel_clk,
+ uint16_t width, uint16_t height,
+ uint16_t h_start_width,
+ uint16_t h_end_width,
+ uint16_t v_start_width,
+ uint16_t *v_end_width)
+{
+ if (*v_end_width < 2) {
+ uint16_t total_width = width + h_start_width + h_end_width;
+ uint16_t total_height_old = height + v_start_width + (*v_end_width);
+ uint16_t total_height_new = height + v_start_width + 2;
+ *v_end_width = 2;
+ *pixel_clk = (*pixel_clk) * total_width * total_height_new /
+ (total_width * total_height_old);
+ dev_err(g_ipu_dev, "WARNING: adapt panel end blank lines\n");
+ }
+}
+
+/*!
* This function is called to initialize a synchronous LCD panel.
*
* @param disp The DI the panel is attached to.
@@ -855,6 +877,9 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk,
if ((v_sync_width == 0) || (h_sync_width == 0))
return EINVAL;
+ adapt_panel_to_ipu_restricitions(&pixel_clk, width, height,
+ h_start_width, h_end_width,
+ v_start_width, &v_end_width);
h_total = width + h_sync_width + h_start_width + h_end_width;
v_total = height + v_sync_width + v_start_width + v_end_width;