pixclk_limit now a hardcoded define (117MHz) and no more 1080p hack (dangerous anyway!)

This commit is contained in:
Matt Sealey
2010-09-09 10:54:35 -05:00
parent 1d91ed0309
commit 864d4af084
3 changed files with 12 additions and 29 deletions

View File

@@ -69,6 +69,12 @@ extern void mx51_efikamx_power_off(void);
extern int mxc_init_fb(void);
extern void mx51_efikamx_display_adjust_mem(int gpu_start, int gpu_mem, int fb_mem);
#define DBG(x) { printk(KERN_ERR "Efika MX: "); printk x ; }
#define DBG(x) { printk(KERN_INFO "Efika MX: "); printk x ; }
// also valid values: 125000 (leaves some bandwdith), 133333 (IPU max on MX51)
// arbitrarily chosen to be 117MHz just because I heard someone at Freescale
// mention this as the best value to leave enough for the VPU and so on..
#define PIXCLK_LIMIT KHZ2PICOS(117000)
#endif /* __MX51_EFIKAMX_H__ */

View File

@@ -61,12 +61,7 @@ int __initdata mxc_debug = { 1 };
int __initdata extsync = { 1 };
int __initdata sink_dvi = { 0 }; /* default is HDMI */
int __initdata sink_monitor = { 0 }; /* default is TV */
int __initdata pixclk_limit = { 8000 }; /* 125MHz */
int __initdata video_max_res = { 0 }; /* use supported max resolution in edid modelist */
int __initdata video_1080p = { 0 };
/* if video_1080p is true, pixclk_limit will set to 6000, up to 1920x1080.
* otherwise pixclk_limit is set to 8000
*/
u8 edid[256];
@@ -262,7 +257,7 @@ void mxcfb_videomode_to_modelist(const struct fb_info *info, const struct fb_vid
del = 0;
if ( modedb[i].pixclock < pixclk_limit ) {
if ( modedb[i].pixclock < PIXCLK_LIMIT ) {
printk(KERN_INFO "%ux%u%s%u pclk=%u removed (exceed limit)\n",
modedb[i].xres, modedb[i].yres,
(modedb[i].vmode & FB_VMODE_INTERLACED ) ? "i@" : "@",
@@ -540,13 +535,8 @@ int mxc_init_fb(void)
mxcfb_initialized = 1;
if ( video_1080p ) {
pixclk_limit = KHZ2PICOS(149250);
video_max_res = 1;
}
printk("*** %s vmode=%s video-mode=%d clock_auto=%d pixclk_limit=%d video_1080p=%d\n",
__func__, vmode, video_mode, clock_auto, pixclk_limit, video_1080p );
printk("*** %s vmode=%s video-mode=%d clock_auto=%d\n",
__func__, vmode, video_mode, clock_auto);
if( video_output == VIDEO_OUT_STATIC_HDMI )
{
@@ -666,17 +656,6 @@ static int __init video_max_res_setup(char *options)
return 1;
}
static int __init video_1080p_setup(char *options)
{
if (!options || !*options)
return 1;
video_1080p = simple_strtol(options, NULL, 10);
printk("video_1080p=%d\n", video_1080p);
return 1;
}
__setup("vga", vga_setup);
__setup("hdmi", hdmi_setup);
__setup("spdif", hdmi_spdif_setup);
@@ -685,4 +664,3 @@ __setup("video_mode=", video_mode_setup);
__setup("clock_auto=", clock_setup);
__setup("vmode=", vmode_setup);
__setup("video_max_res=", video_max_res_setup);
__setup("video_1080p=", video_1080p_setup);

View File

@@ -60,7 +60,6 @@
extern int mxc_debug;
extern int clock_auto;
extern int extsync;
extern int pixclk_limit;
extern void mxcfb_adjust(struct fb_var_screeninfo *var );
#endif
@@ -170,8 +169,8 @@ static int mxcfb_set_fix(struct fb_info *info)
#if defined(CONFIG_MACH_MX51_EFIKAMX)
if (machine_is_mx51_efikamx()) {
if( clock_auto && extsync ) {
if ( var->pixclock < pixclk_limit ) {
printk(KERN_INFO "exceed pixel clock limit %d, auto adjust to 720p\n", pixclk_limit );
if ( var->pixclock < PIXCLK_LIMIT ) {
printk(KERN_INFO "exceed pixel clock limit %ld, auto adjust to 720p\n", PIXCLK_LIMIT );
if (MXCFB_DEFAULT_BPP == 32)
fb_find_mode( var, info, "1280x720-32@60", NULL, 0, NULL, 0 );
else