Commit 00d340b9 authored by Manuel Lauss's avatar Manuel Lauss Committed by Linus Torvalds

[PATCH] i810fb: Do not probe the third i2c bus by default

Some time before 2.6.15, a third DDC channel was added to i810fb.  On
systems where these ddc pins are not connected, the probe takes about 10
seconds.

Add a boot/module option for i810fb to explicitly probe for the 3rd ddc bus
if needed.
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 06c6f900
...@@ -191,11 +191,11 @@ int i810_probe_i2c_connector(struct fb_info *info, u8 **out_edid, int conn) ...@@ -191,11 +191,11 @@ int i810_probe_i2c_connector(struct fb_info *info, u8 **out_edid, int conn)
u8 *edid = NULL; u8 *edid = NULL;
int i; int i;
DPRINTK("i810-i2c: Probe DDC%i Bus\n", conn); DPRINTK("i810-i2c: Probe DDC%i Bus\n", conn+1);
if (conn < 4) { if (conn < par->ddc_num) {
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
/* Do the real work */ /* Do the real work */
edid = i810_do_probe_i2c_edid(&par->chan[conn-1]); edid = i810_do_probe_i2c_edid(&par->chan[conn]);
if (edid) if (edid)
break; break;
} }
......
...@@ -280,6 +280,7 @@ struct i810fb_par { ...@@ -280,6 +280,7 @@ struct i810fb_par {
u32 blit_bpp; u32 blit_bpp;
u32 ovract; u32 ovract;
u32 cur_state; u32 cur_state;
u32 ddc_num;
int mtrr_reg; int mtrr_reg;
u16 bltcntl; u16 bltcntl;
u8 interlace; u8 interlace;
......
...@@ -149,6 +149,7 @@ static int vyres __devinitdata; ...@@ -149,6 +149,7 @@ static int vyres __devinitdata;
static int sync __devinitdata; static int sync __devinitdata;
static int extvga __devinitdata; static int extvga __devinitdata;
static int dcolor __devinitdata; static int dcolor __devinitdata;
static int ddc3 __devinitdata = 2;
/*------------------------------------------------------------*/ /*------------------------------------------------------------*/
...@@ -1763,6 +1764,8 @@ static void __devinit i810_init_defaults(struct i810fb_par *par, ...@@ -1763,6 +1764,8 @@ static void __devinit i810_init_defaults(struct i810fb_par *par,
if (sync) if (sync)
par->dev_flags |= ALWAYS_SYNC; par->dev_flags |= ALWAYS_SYNC;
par->ddc_num = ddc3;
if (bpp < 8) if (bpp < 8)
bpp = 8; bpp = 8;
...@@ -1885,7 +1888,7 @@ static void __devinit i810fb_find_init_mode(struct fb_info *info) ...@@ -1885,7 +1888,7 @@ static void __devinit i810fb_find_init_mode(struct fb_info *info)
int found = 0; int found = 0;
#ifdef CONFIG_FB_I810_I2C #ifdef CONFIG_FB_I810_I2C
int i; int i;
int err; int err = 1;
struct i810fb_par *par = info->par; struct i810fb_par *par = info->par;
#endif #endif
...@@ -1895,8 +1898,8 @@ static void __devinit i810fb_find_init_mode(struct fb_info *info) ...@@ -1895,8 +1898,8 @@ static void __devinit i810fb_find_init_mode(struct fb_info *info)
#ifdef CONFIG_FB_I810_I2C #ifdef CONFIG_FB_I810_I2C
i810_create_i2c_busses(par); i810_create_i2c_busses(par);
for (i = 0; i < 4; i++) { for (i = 0; i < par->ddc_num + 1; i++) {
err = i810_probe_i2c_connector(info, &par->edid, i+1); err = i810_probe_i2c_connector(info, &par->edid, i);
if (!err) if (!err)
break; break;
} }
...@@ -1983,6 +1986,8 @@ static int __devinit i810fb_setup(char *options) ...@@ -1983,6 +1986,8 @@ static int __devinit i810fb_setup(char *options)
vsync2 = simple_strtoul(this_opt+7, NULL, 0); vsync2 = simple_strtoul(this_opt+7, NULL, 0);
else if (!strncmp(this_opt, "dcolor", 6)) else if (!strncmp(this_opt, "dcolor", 6))
dcolor = 1; dcolor = 1;
else if (!strncmp(this_opt, "ddc3", 4))
ddc3 = 3;
else else
mode_option = this_opt; mode_option = this_opt;
} }
...@@ -2190,6 +2195,8 @@ MODULE_PARM_DESC(sync, "wait for accel engine to finish drawing" ...@@ -2190,6 +2195,8 @@ MODULE_PARM_DESC(sync, "wait for accel engine to finish drawing"
module_param(dcolor, bool, 0); module_param(dcolor, bool, 0);
MODULE_PARM_DESC(dcolor, "use DirectColor visuals" MODULE_PARM_DESC(dcolor, "use DirectColor visuals"
" (default = 0 = TrueColor)"); " (default = 0 = TrueColor)");
module_param(ddc3, bool, 0);
MODULE_PARM_DESC(ddc3, "Probe DDC bus 3 (default = 0 = no)");
module_param(mode_option, charp, 0); module_param(mode_option, charp, 0);
MODULE_PARM_DESC(mode_option, "Specify initial video mode"); MODULE_PARM_DESC(mode_option, "Specify initial video mode");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment