mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-02-04 08:04:49 +00:00
ipu: add platform data method to determine pixel clock accuracy (external or internal).
If the internal clock is deadly accurate for the desired mode, that will be used instead (the accuracy is set to within 1/200th which is well within VESA standards of 1/50th) to save power. efikamx changes: for HDMI, try external clock when necessary. For LVDS, don't since there is some weird clock mess with the binary blob for the LCD panels in the mtl017 driver which we think is derived from the lack of external clock support in more ancient kernels. It is fudging the values to both correct some kind of panel EDID bug and also to fix the potential deviation in clock, but since it's a binary blob it's kind of hard to change.
This commit is contained in:
@@ -177,6 +177,7 @@ static struct i2c_board_info mx51_efikamx_i2c_display[] __initdata = {
|
||||
static struct mxc_fb_platform_data mx51_efikamx_display_data[] = {
|
||||
[EFIKAMX_HDMI_DISPLAY_ID] = {
|
||||
.interface_pix_fmt = IPU_PIX_FMT_RGB24,
|
||||
.external_clk = true;
|
||||
},
|
||||
[EFIKASB_LVDS_DISPLAY_ID] = {
|
||||
.interface_pix_fmt = IPU_PIX_FMT_RGB565,
|
||||
|
||||
@@ -328,6 +328,7 @@ struct mxc_fb_platform_data {
|
||||
int num_modes;
|
||||
char *mode_str;
|
||||
u32 interface_pix_fmt;
|
||||
u32 external_clk;
|
||||
};
|
||||
|
||||
struct mxc_lcd_platform_data {
|
||||
|
||||
@@ -1674,11 +1674,10 @@ static int mxcfb_setup(struct fb_info *fbi, struct platform_device *pdev)
|
||||
|
||||
if (plat_data && !mxcfbi->ipu_di_pix_fmt) {
|
||||
mxcfbi->ipu_di_pix_fmt = plat_data->interface_pix_fmt;
|
||||
#if 0
|
||||
|
||||
/* try and use a bit depth closest to the bit depth we use for the panel */
|
||||
if (!mxcfbi->default_bpp)
|
||||
mxcfbi->default_bpp = pixfmt_to_bpp(plat_data->interface_pix_fmt);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!mxcfbi->default_bpp)
|
||||
@@ -1699,6 +1698,17 @@ static int mxcfb_setup(struct fb_info *fbi, struct platform_device *pdev)
|
||||
plat_data->num_modes, NULL, mxcfbi->default_bpp);
|
||||
}
|
||||
|
||||
/*
|
||||
* provides the following; if int_clk was supplied in the video= line, actually
|
||||
* it would be more prudent to do exactly what the platform data says (as it
|
||||
* has far better knowledge of the board design than a kernel argument set by
|
||||
* a user). So, if the internal clock flag is true, but the platform data says
|
||||
* try an external clock, use the external clock. This will only happen anyway
|
||||
* if the clock can't be generated from the IPU clock within 1/200th of the
|
||||
* desired rate anyway
|
||||
*/
|
||||
if (mxcfbi->ipu_int_clk && plat_data && plat_data->external_clk)
|
||||
mxcfbi->ipu_int_clk = !plat_data->external_clk;
|
||||
|
||||
mxcfb_check_var(&fbi->var, fbi);
|
||||
mxcfb_set_fix(fbi);
|
||||
|
||||
Reference in New Issue
Block a user