linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i810fb: make probe of DDC3 optional
@ 2006-01-25  7:17 Manuel Lauss
  2006-01-25  7:23 ` Antonino A. Daplas
  0 siblings, 1 reply; 7+ messages in thread
From: Manuel Lauss @ 2006-01-25  7:17 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: adaplas


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.

Introduce a config option to disable the probe on ddc channel 3.
Reduces boot time on my i815 laptop by 10 seconds.


diff -Naurp linux-2.6.15/drivers/video/Kconfig linux-2.6.15-b/drivers/video/Kconfig
--- linux-2.6.15/drivers/video/Kconfig	2006-01-03 04:21:10.000000000 +0100
+++ linux-2.6.15-b/drivers/video/Kconfig	2006-01-25 08:02:54.772567000 +0100
@@ -728,6 +728,16 @@ config FB_I810_I2C
 	select I2C_ALGOBIT
 	help
 
+config FB_I810_I2C_NODDC3
+	bool "Disable probing on DDC3"
+	depends on FB_I810_I2C
+	default y
+	help
+	  Select this if you want to skip the probe of DDC3. On I810 where
+	  the DDC3 pins are not connected, probing will take a very long time,
+	  enabling this option will skip this probe altogether, shortening
+	  boot/module-load time by about 10 seconds.
+
 config FB_INTEL
 	tristate "Intel 830M/845G/852GM/855GM/865G support (EXPERIMENTAL)"
 	depends on FB && EXPERIMENTAL && PCI && X86_32
diff -Naurp linux-2.6.15/drivers/video/i810/i810-i2c.c linux-2.6.15-b/drivers/video/i810/i810-i2c.c
--- linux-2.6.15/drivers/video/i810/i810-i2c.c	2006-01-03 04:21:10.000000000 +0100
+++ linux-2.6.15-b/drivers/video/i810/i810-i2c.c	2006-01-25 08:00:20.822567000 +0100
@@ -190,6 +190,11 @@ int i810_probe_i2c_connector(struct fb_i
         u8 *edid = NULL;
         int i;
 
+#ifdef CONFIG_FB_I810_I2C_NODDC3
+	if (conn == 3)
+		return 1;
+#endif
+
 	DPRINTK("i810-i2c: Probe DDC%i Bus\n", conn);
 	if (conn < 4) {
 		for (i = 0; i < 3; i++) {


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] i810fb: make probe of DDC3 optional
  2006-01-25  7:17 [PATCH] i810fb: make probe of DDC3 optional Manuel Lauss
@ 2006-01-25  7:23 ` Antonino A. Daplas
  2006-01-25  7:30   ` Manuel Lauss
  0 siblings, 1 reply; 7+ messages in thread
From: Antonino A. Daplas @ 2006-01-25  7:23 UTC (permalink / raw)
  To: Manuel Lauss; +Cc: linux-fbdev-devel

Manuel Lauss wrote:
> 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.
> 
> Introduce a config option to disable the probe on ddc channel 3.
> Reduces boot time on my i815 laptop by 10 seconds.

Thanks.  Would a boot option be preferable than config?  Default would
be to skip probing the 3rd bus.

If you agree, I'll do the patch myself.

Tony


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] i810fb: make probe of DDC3 optional
  2006-01-25  7:23 ` Antonino A. Daplas
@ 2006-01-25  7:30   ` Manuel Lauss
  2006-01-25  7:49     ` Antonino A. Daplas
  0 siblings, 1 reply; 7+ messages in thread
From: Manuel Lauss @ 2006-01-25  7:30 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: linux-fbdev-devel

On Wed, Jan 25, 2006 at 03:23:58PM +0800, Antonino A. Daplas wrote:
> Manuel Lauss wrote:
> > 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.
> > 
> > Introduce a config option to disable the probe on ddc channel 3.
> > Reduces boot time on my i815 laptop by 10 seconds.
> 
> Thanks.  Would a boot option be preferable than config?  Default would
> be to skip probing the 3rd bus.

of course.
 
> If you agree, I'll do the patch myself.

fine with me, thanks.

> Tony

-- 
 Manuel Lauss


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] i810fb: make probe of DDC3 optional
  2006-01-25  7:30   ` Manuel Lauss
@ 2006-01-25  7:49     ` Antonino A. Daplas
  2006-01-26  6:03       ` Manuel Lauss
  0 siblings, 1 reply; 7+ messages in thread
From: Antonino A. Daplas @ 2006-01-25  7:49 UTC (permalink / raw)
  To: Manuel Lauss; +Cc: linux-fbdev-devel

Manuel Lauss wrote:
> On Wed, Jan 25, 2006 at 03:23:58PM +0800, Antonino A. Daplas wrote:
>> Manuel Lauss wrote:
>>> 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.
>>>
>>> Introduce a config option to disable the probe on ddc channel 3.
>>> Reduces boot time on my i815 laptop by 10 seconds.
>> Thanks.  Would a boot option be preferable than config?  Default would
>> be to skip probing the 3rd bus.
> 
> of course.
>  
>> If you agree, I'll do the patch myself.
> 
> fine with me, thanks.

Can you test this patch?

Probing for the 3rd bus needs to be done explicitly:

video=i810fb:ddc3; or

modprobe i810fb i810fb.ddc3=1

Tony 

diff --git a/drivers/video/i810/i810-i2c.c b/drivers/video/i810/i810-i2c.c
index e22d56e..231fe90 100644
--- a/drivers/video/i810/i810-i2c.c
+++ b/drivers/video/i810/i810-i2c.c
@@ -191,11 +191,11 @@ int i810_probe_i2c_connector(struct fb_i
         u8 *edid = NULL;
         int i;
 
-	DPRINTK("i810-i2c: Probe DDC%i Bus\n", conn);
-	if (conn < 4) {
+	DPRINTK("i810-i2c: Probe DDC%i Bus\n", conn+1);
+	if (conn < par->ddc_num) {
 		for (i = 0; i < 3; i++) {
 			/* 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) 
 				break;
 		}
diff --git a/drivers/video/i810/i810.h b/drivers/video/i810/i810.h
index 6c187d5..579195c 100644
--- a/drivers/video/i810/i810.h
+++ b/drivers/video/i810/i810.h
@@ -280,6 +280,7 @@ struct i810fb_par {
 	u32 blit_bpp;
 	u32 ovract;
 	u32 cur_state;
+	u32 ddc_num;
 	int mtrr_reg;
 	u16 bltcntl;
 	u8 interlace;
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index 266d0ab..d8467c0 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -149,6 +149,7 @@ static int vyres      __devinitdata;
 static int sync       __devinitdata;
 static int extvga     __devinitdata;
 static int dcolor     __devinitdata;
+static int ddc3       __devinitdata = 2;
 
 /*------------------------------------------------------------*/
 
@@ -1763,6 +1764,8 @@ static void __devinit i810_init_defaults
 	if (sync) 
 		par->dev_flags |= ALWAYS_SYNC;
 
+	par->ddc_num = ddc3;
+
 	if (bpp < 8)
 		bpp = 8;
 	
@@ -1885,7 +1888,7 @@ static void __devinit i810fb_find_init_m
 	int found = 0;
 #ifdef CONFIG_FB_I810_I2C
 	int i;
-	int err;
+	int err = 1;
 	struct i810fb_par *par = info->par;
 #endif
 
@@ -1895,8 +1898,8 @@ static void __devinit i810fb_find_init_m
 #ifdef CONFIG_FB_I810_I2C
 	i810_create_i2c_busses(par);
 
-	for (i = 0; i < 4; i++) {
-		err = i810_probe_i2c_connector(info, &par->edid, i+1);
+	for (i = 0; i < par->ddc_num + 1; i++) {
+		err = i810_probe_i2c_connector(info, &par->edid, i);
 		if (!err)
 			break;
 	}
@@ -1983,6 +1986,8 @@ static int __devinit i810fb_setup(char *
 			vsync2 = simple_strtoul(this_opt+7, NULL, 0);
 		else if (!strncmp(this_opt, "dcolor", 6))
 			dcolor = 1;
+		else if (!strncmp(this_opt, "ddc3", 4))
+			ddc3 = 3;
 		else
 			mode_option = this_opt;
 	}
@@ -2190,6 +2195,8 @@ MODULE_PARM_DESC(sync, "wait for accel e
 module_param(dcolor, bool, 0);
 MODULE_PARM_DESC(dcolor, "use DirectColor visuals"
 		 " (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_PARM_DESC(mode_option, "Specify initial video mode");
 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] i810fb: make probe of DDC3 optional
  2006-01-25  7:49     ` Antonino A. Daplas
@ 2006-01-26  6:03       ` Manuel Lauss
  2006-01-26  6:37         ` Antonino A. Daplas
  0 siblings, 1 reply; 7+ messages in thread
From: Manuel Lauss @ 2006-01-26  6:03 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: linux-fbdev-devel

On Wed, Jan 25, 2006 at 03:49:34PM +0800, Antonino A. Daplas wrote:
> Manuel Lauss wrote:
> > On Wed, Jan 25, 2006 at 03:23:58PM +0800, Antonino A. Daplas wrote:
> >> Manuel Lauss wrote:
> >>> 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.
> >>>
> >>> Introduce a config option to disable the probe on ddc channel 3.
> >>> Reduces boot time on my i815 laptop by 10 seconds.
> >> Thanks.  Would a boot option be preferable than config?  Default would
> >> be to skip probing the 3rd bus.
> > 
> > of course.
> >  
> >> If you agree, I'll do the patch myself.
> > 
> > fine with me, thanks.
> 
> Can you test this patch?
> 
> Probing for the 3rd bus needs to be done explicitly:
> 
> video=i810fb:ddc3; or
> 
> modprobe i810fb i810fb.ddc3=1

Works as expected. Only built-in tested, though.

-- 
 Manuel Lauss


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] i810fb: make probe of DDC3 optional
  2006-01-26  6:03       ` Manuel Lauss
@ 2006-01-26  6:37         ` Antonino A. Daplas
  2006-01-26  7:00           ` switching betwwen LCD and CRT display ramprasad
  0 siblings, 1 reply; 7+ messages in thread
From: Antonino A. Daplas @ 2006-01-26  6:37 UTC (permalink / raw)
  To: Manuel Lauss; +Cc: linux-fbdev-devel

Manuel Lauss wrote:
> On Wed, Jan 25, 2006 at 03:49:34PM +0800, Antonino A. Daplas wrote:
>> Manuel Lauss wrote:
>>> On Wed, Jan 25, 2006 at 03:23:58PM +0800, Antonino A. Daplas wrote:
>>>> Manuel Lauss wrote:
>> Can you test this patch?
>>
>> Probing for the 3rd bus needs to be done explicitly:
>>
>> video=i810fb:ddc3; or
>>
>> modprobe i810fb i810fb.ddc3=1
> 
> Works as expected. Only built-in tested, though.
> 

Thanks.

Tony


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 7+ messages in thread

* switching  betwwen  LCD and CRT display
  2006-01-26  6:37         ` Antonino A. Daplas
@ 2006-01-26  7:00           ` ramprasad
  0 siblings, 0 replies; 7+ messages in thread
From: ramprasad @ 2006-01-26  7:00 UTC (permalink / raw)
  To: linux-fbdev-devel

Hi ,
    I am using 8Bpp LCD panel and i also have VGA( 16BPP) out on my 
device.I want to switch between these.How can i do this with out 
 restarting the device. I am using pxa (255) processor for this.

Thanks in advance,
Ramprasad




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-01-26  6:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-25  7:17 [PATCH] i810fb: make probe of DDC3 optional Manuel Lauss
2006-01-25  7:23 ` Antonino A. Daplas
2006-01-25  7:30   ` Manuel Lauss
2006-01-25  7:49     ` Antonino A. Daplas
2006-01-26  6:03       ` Manuel Lauss
2006-01-26  6:37         ` Antonino A. Daplas
2006-01-26  7:00           ` switching betwwen LCD and CRT display ramprasad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).