linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/5] fbdev: Make BIOS EDID reading configurable
@ 2006-02-23 12:00 Antonino A. Daplas
  2006-02-24  0:34 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Antonino A. Daplas @ 2006-02-23 12:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Fbdev development list

DDC reading via the Video BIOS may take several tens of seconds with
some combination of display cards and monitors.

Make this option configurable and select only for drivers that need it.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
---

 arch/i386/boot/video.S |    2 ++
 drivers/video/Kconfig  |   12 ++++++++++++
 drivers/video/fbmon.c  |    6 +++---
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S
index 2ac40c8..0000a26 100644
--- a/arch/i386/boot/video.S
+++ b/arch/i386/boot/video.S
@@ -1924,6 +1924,7 @@ skip10:	movb	%ah, %al
 	ret
 
 store_edid:
+#ifdef CONFIG_FB_FIRMWARE_EDID
 	pushw	%es				# just save all registers
 	pushw	%ax
 	pushw	%bx
@@ -1954,6 +1955,7 @@ store_edid:
 	popw	%bx
 	popw	%ax
 	popw	%es
+#endif
 	ret
 
 # VIDEO_SELECT-only variables
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index e31390a..87384d3 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -70,6 +70,18 @@ config FB_MACMODES
        depends on FB
        default n
 
+config FB_FIRMWARE_EDID
+       bool "Enable firmware EDID"
+       depends on FB
+       default n
+       ---help---
+         This enables access to the EDID transferred from the firmware.
+	 On the i386, this is from the Video BIOS. Enable this if DDC/I2C
+	 transfers do not work for your driver and if you are using
+	 nvidiafb, i810fb or savagefb.
+
+	 If unsure, say N.
+
 config FB_MODE_HELPERS
         bool "Enable Video Mode Handling Helpers"
         depends on FB
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
index 7c74e73..53beeb4 100644
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -1281,7 +1281,7 @@ int fb_validate_mode(const struct fb_var
 		-EINVAL : 0;
 }
 
-#if defined(__i386__)
+#if defined(CONFIG_FB_FIRMWARE_EDID) && defined(__i386__)
 #include <linux/pci.h>
 
 /*
@@ -1311,11 +1311,11 @@ const unsigned char *fb_firmware_edid(st
 {
 	return NULL;
 }
-#endif /* _i386_ */
+#endif
+EXPORT_SYMBOL(fb_firmware_edid);
 
 EXPORT_SYMBOL(fb_parse_edid);
 EXPORT_SYMBOL(fb_edid_to_monspecs);
-EXPORT_SYMBOL(fb_firmware_edid);
 EXPORT_SYMBOL(fb_get_mode);
 EXPORT_SYMBOL(fb_validate_mode);
 EXPORT_SYMBOL(fb_destroy_modedb);



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* Re: [PATCH 4/5] fbdev: Make BIOS EDID reading configurable
  2006-02-23 12:00 [PATCH 4/5] fbdev: Make BIOS EDID reading configurable Antonino A. Daplas
@ 2006-02-24  0:34 ` Andrew Morton
  2006-02-24  3:56   ` Antonino A. Daplas
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2006-02-24  0:34 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: linux-fbdev-devel

"Antonino A. Daplas" <adaplas@gmail.com> wrote:
>
> DDC reading via the Video BIOS may take several tens of seconds with
>  some combination of display cards and monitors.
> 
>  Make this option configurable and select only for drivers that need it.

But that's not what the patch actually does - it requires that the user
select the option.

Also, is it not possible to defer this operation until we've parsed the
command line, control it with a kernel boot parameter?


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* Re: [PATCH 4/5] fbdev: Make BIOS EDID reading configurable
  2006-02-24  0:34 ` Andrew Morton
@ 2006-02-24  3:56   ` Antonino A. Daplas
  2006-02-24  4:10     ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Antonino A. Daplas @ 2006-02-24  3:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-fbdev-devel

Andrew Morton wrote:
> "Antonino A. Daplas" <adaplas@gmail.com> wrote:
>> DDC reading via the Video BIOS may take several tens of seconds with
>>  some combination of display cards and monitors.
>>
>>  Make this option configurable and select only for drivers that need it.
> 
> But that's not what the patch actually does - it requires that the user
> select the option.

You got me there :-).  Initially, I had:

select FB_FIRMWARE_EDID if ...

in Kconfig on selected drivers, but in the end removed it.  And, I forgot
to change the changelog.

The reason I removed the "select ..." part is because the user won't be
able to deselect this option.
 
> 
> Also, is it not possible to defer this operation until we've parsed the
> command line, control it with a kernel boot parameter?
> 

I thought of that, but it seems a bit complicated to me to parse boot
options in assembly so I left this for another time.

The firmware EDID is only used as fallback, or if drivers have no DDC/I2C
support. Currently, all drivers that use the firmware EDID also have I2C
support in place. And chances are, if DDC transfers failed, the firmware
EDID will also be absent.

Tony


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* Re: [PATCH 4/5] fbdev: Make BIOS EDID reading configurable
  2006-02-24  3:56   ` Antonino A. Daplas
@ 2006-02-24  4:10     ` Andrew Morton
  2006-02-24  5:24       ` Antonino A. Daplas
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2006-02-24  4:10 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: linux-fbdev-devel

"Antonino A. Daplas" <adaplas@gmail.com> wrote:
>
> > 
> > Also, is it not possible to defer this operation until we've parsed the
> > command line, control it with a kernel boot parameter?
> > 
> 
> I thought of that, but it seems a bit complicated to me to parse boot
> options in assembly so I left this for another time.

Well I'm wondering whether we can instead do this query later on, after
we've entered start_kernel().

> The firmware EDID is only used as fallback, or if drivers have no DDC/I2C
> support. Currently, all drivers that use the firmware EDID also have I2C
> support in place. And chances are, if DDC transfers failed, the firmware
> EDID will also be absent.

hm.  Don't you think `default y' would be better?  As it is, people's stuff
will mysteriously stop working.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* Re: [PATCH 4/5] fbdev: Make BIOS EDID reading configurable
  2006-02-24  4:10     ` Andrew Morton
@ 2006-02-24  5:24       ` Antonino A. Daplas
  2006-02-24  5:29         ` Andrew Morton
  2006-02-24  5:44         ` [PATCH] fbdev: Make config firmware EDID default to yes Antonino A. Daplas
  0 siblings, 2 replies; 7+ messages in thread
From: Antonino A. Daplas @ 2006-02-24  5:24 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-fbdev-devel

Andrew Morton wrote:
> "Antonino A. Daplas" <adaplas@gmail.com> wrote:
>>> Also, is it not possible to defer this operation until we've parsed the
>>> command line, control it with a kernel boot parameter?
>>>
>> I thought of that, but it seems a bit complicated to me to parse boot
>> options in assembly so I left this for another time.
> 
> Well I'm wondering whether we can instead do this query later on, after
> we've entered start_kernel().

The query is done while machine is in real mode (in arch/i386/boot/video.S).

> 
>> The firmware EDID is only used as fallback, or if drivers have no DDC/I2C
>> support. Currently, all drivers that use the firmware EDID also have I2C
>> support in place. And chances are, if DDC transfers failed, the firmware
>> EDID will also be absent.
> 
> hm.  Don't you think `default y' would be better?  As it is, people's stuff
> will mysteriously stop working.

Hmm.  You're right, 'default y' looks better. Would you like me to send you
a patch, or would you rather take care of it?

Tony



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* Re: [PATCH 4/5] fbdev: Make BIOS EDID reading configurable
  2006-02-24  5:24       ` Antonino A. Daplas
@ 2006-02-24  5:29         ` Andrew Morton
  2006-02-24  5:44         ` [PATCH] fbdev: Make config firmware EDID default to yes Antonino A. Daplas
  1 sibling, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2006-02-24  5:29 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: linux-fbdev-devel

"Antonino A. Daplas" <adaplas@gmail.com> wrote:
>
> Hmm.  You're right, 'default y' looks better. Would you like me to send you
>  a patch, or would you rather take care of it?

Is OK, I'll diddle the diff.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* [PATCH] fbdev: Make config firmware EDID default to yes
  2006-02-24  5:24       ` Antonino A. Daplas
  2006-02-24  5:29         ` Andrew Morton
@ 2006-02-24  5:44         ` Antonino A. Daplas
  1 sibling, 0 replies; 7+ messages in thread
From: Antonino A. Daplas @ 2006-02-24  5:44 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-fbdev-devel

- Make CONFIG_FB_FIRMWARE_EDID default to yes
- Add more info to Kconfig help section on when to select N for this option

Signed-off-by: Antonino Daplas <adaplas@pol.net>
---

Antonino A. Daplas wrote:
> Andrew Morton wrote:
>> "Antonino A. Daplas" <adaplas@gmail.com> wrote:
>> Hmm.  You're right, 'default y' looks better. Would you like me to send you
> a patch, or would you rather take care of it?

On second thought, I'll just send you an update.

Tony

 drivers/video/Kconfig |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index e6a02d6..e9b5045 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -73,14 +73,18 @@ config FB_MACMODES
 config FB_FIRMWARE_EDID
        bool "Enable firmware EDID"
        depends on FB
-       default n
+       default y
        ---help---
          This enables access to the EDID transferred from the firmware.
 	 On the i386, this is from the Video BIOS. Enable this if DDC/I2C
 	 transfers do not work for your driver and if you are using
 	 nvidiafb, i810fb or savagefb.
 
-	 If unsure, say N.
+	 In general, choosing Y for this option is safe.  If you 
+	 experience extremely long delays while booting before you get
+	 something on your display, try setting this to N.  Matrox cards in
+	 combination with certain motherboards and monitors are known to
+	 suffer from this problem.
 
 config FB_MODE_HELPERS
         bool "Enable Video Mode Handling Helpers"


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

end of thread, other threads:[~2006-02-25  3:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-23 12:00 [PATCH 4/5] fbdev: Make BIOS EDID reading configurable Antonino A. Daplas
2006-02-24  0:34 ` Andrew Morton
2006-02-24  3:56   ` Antonino A. Daplas
2006-02-24  4:10     ` Andrew Morton
2006-02-24  5:24       ` Antonino A. Daplas
2006-02-24  5:29         ` Andrew Morton
2006-02-24  5:44         ` [PATCH] fbdev: Make config firmware EDID default to yes Antonino A. Daplas

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).