return 4;
}
- return -1;
+ return -EINVAL;
}
/*
debug("panel size = %d x %d\n", width, height);
if ((v_sync_width == 0) || (h_sync_width == 0))
- return EINVAL;
+ return -EINVAL;
adapt_panel_to_ipu_restricitions(&pixel_clk, width, height,
h_start_width, h_end_width,
if (clk_get_usecount(g_pixel_clk[disp]) != 0)
clk_set_parent(g_pixel_clk[disp], g_ipu_clk);
}
- rounded_pixel_clk = clk_round_rate(g_pixel_clk[disp], pixel_clk);
- clk_set_rate(g_pixel_clk[disp], rounded_pixel_clk);
- udelay(5000);
- /* Get integer portion of divider */
- div = clk_get_rate(clk_get_parent(g_pixel_clk[disp])) /
- rounded_pixel_clk;
/* Enable for a divide by 2 clock change. */
reg = __raw_readl(IPU_PM);
if (pixel_fmt != IPU_PIX_FMT_LVDS666 &&
pixel_fmt != IPU_PIX_FMT_LVDS888) {
+ rounded_pixel_clk = clk_round_rate(g_pixel_clk[disp], pixel_clk);
clk_set_rate(g_pixel_clk[disp], rounded_pixel_clk);
udelay(5000);
/* Get integer portion of divider */
rounded_pixel_clk;
ipu_di_data_wave_config(disp, SYNC_WAVE, div - 1, div - 1);
} else {
- clk_set_rate(g_pixel_clk[disp], clk_get_rate(g_ipu_clk));
+ rounded_pixel_clk = clk_get_rate(clk_get_parent(g_pixel_clk[disp]));
+ clk_set_rate(g_pixel_clk[disp], rounded_pixel_clk);
div = 1;
ipu_di_data_wave_config(disp, SYNC_WAVE, 0, 0);
di_gen |= (6 << 24);
map = ipu_pixfmt_to_map(pixel_fmt);
if (map < 0) {
- debug("IPU_DISP: No MAP\n");
- return -EINVAL;
+ printf("IPU_DISP: No MAP for pixel format: %c%c%c%c\n",
+ pixel_fmt, pixel_fmt >> 8, pixel_fmt >> 16,
+ pixel_fmt >> 24);
+ return map;
}
if (sig.interlaced) {