* [PATCH 0/2] video: Make edid_info generally available in x86
@ 2025-06-02 7:51 Thomas Zimmermann
2025-06-02 7:51 ` [PATCH 1/2] video: Make CONFIG_FIRMWARE_EDID generally available Thomas Zimmermann
2025-06-02 7:51 ` [PATCH 2/2] video: Make global edid_info depend on CONFIG_FIRMWARE_EDID Thomas Zimmermann
0 siblings, 2 replies; 7+ messages in thread
From: Thomas Zimmermann @ 2025-06-02 7:51 UTC (permalink / raw)
To: arnd, javierm, deller; +Cc: dri-devel, linux-fbdev, Thomas Zimmermann
The global variable edid_info provides the system framebuffer's EDID
information, if any. Make it available on x86 without dependencies on
fbdev. DRM drivers for system framebuffers export the information to
userspace.
Besides cleaning up, this series prepares support for firmware EDID on
EFI-based systems.
Thomas Zimmermann (2):
video: Make CONFIG_FIRMWARE_EDID generally available
video: Make global edid_info depend on CONFIG_FIRMWARE_EDID
arch/x86/kernel/setup.c | 4 ++++
drivers/gpu/drm/sysfb/efidrm.c | 2 +-
drivers/gpu/drm/sysfb/vesadrm.c | 2 +-
drivers/video/Kconfig | 18 +++++++++++++++++-
drivers/video/fbdev/core/Kconfig | 15 ---------------
drivers/video/fbdev/core/fbmon.c | 3 +--
include/video/edid.h | 3 ++-
7 files changed, 26 insertions(+), 21 deletions(-)
--
2.49.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] video: Make CONFIG_FIRMWARE_EDID generally available
2025-06-02 7:51 [PATCH 0/2] video: Make edid_info generally available in x86 Thomas Zimmermann
@ 2025-06-02 7:51 ` Thomas Zimmermann
2025-06-03 16:08 ` Helge Deller
2025-06-02 7:51 ` [PATCH 2/2] video: Make global edid_info depend on CONFIG_FIRMWARE_EDID Thomas Zimmermann
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Zimmermann @ 2025-06-02 7:51 UTC (permalink / raw)
To: arnd, javierm, deller; +Cc: dri-devel, linux-fbdev, Thomas Zimmermann
DRM drivers such as efidrm and vesadrm can export firmware EDID
data to userspace. Make the related option CONFIG_FIRMWARE_EDID
available without CONFIG_FB. Make it depend on X86, which is
currently the only architecture providing EDID information.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/Kconfig | 18 +++++++++++++++++-
drivers/video/fbdev/core/Kconfig | 15 ---------------
drivers/video/fbdev/core/fbmon.c | 3 +--
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 5df981920a94..c3da6c0bfca6 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -61,6 +61,23 @@ config HDMI
endif # HAS_IOMEM
+config FIRMWARE_EDID
+ bool "Enable firmware EDID"
+ depends on X86
+ help
+ This enables access to the EDID transferred from the firmware.
+ On x86, this is from the VESA BIOS. DRM display drivers will
+ be able to export the information to userspace.
+
+ Also enable this if DDC/I2C transfers do not work for your driver
+ and if you are using nvidiafb, i810fb or savagefb.
+
+ 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.
+
if VT
source "drivers/video/console/Kconfig"
endif
@@ -70,5 +87,4 @@ if FB_CORE || SGI_NEWPORT_CONSOLE
endif
-
endmenu
diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig
index 4abe12db7594..b38c3b776bce 100644
--- a/drivers/video/fbdev/core/Kconfig
+++ b/drivers/video/fbdev/core/Kconfig
@@ -10,21 +10,6 @@ config FB_CORE
config FB_NOTIFY
bool
-config FIRMWARE_EDID
- bool "Enable firmware EDID"
- depends on FB
- 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.
-
- 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_DEVICE
bool "Provide legacy /dev/fb* device"
depends on FB_CORE
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 0a26399dbc89..7762ad0284fa 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -1482,13 +1482,12 @@ int fb_validate_mode(const struct fb_var_screeninfo *var, struct fb_info *info)
-EINVAL : 0;
}
-#if defined(CONFIG_FIRMWARE_EDID) && defined(CONFIG_X86)
-
/*
* We need to ensure that the EDID block is only returned for
* the primary graphics adapter.
*/
+#if defined(CONFIG_FIRMWARE_EDID)
const unsigned char *fb_firmware_edid(struct device *device)
{
struct pci_dev *dev = NULL;
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] video: Make global edid_info depend on CONFIG_FIRMWARE_EDID
2025-06-02 7:51 [PATCH 0/2] video: Make edid_info generally available in x86 Thomas Zimmermann
2025-06-02 7:51 ` [PATCH 1/2] video: Make CONFIG_FIRMWARE_EDID generally available Thomas Zimmermann
@ 2025-06-02 7:51 ` Thomas Zimmermann
2025-06-03 16:08 ` Helge Deller
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Zimmermann @ 2025-06-02 7:51 UTC (permalink / raw)
To: arnd, javierm, deller; +Cc: dri-devel, linux-fbdev, Thomas Zimmermann
Protect global edid_info behind CONFIG_FIRMWARE_EDID and remove
the config tests for CONFIG_X86. Makes edid_info available iff
its option has been enabled.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
arch/x86/kernel/setup.c | 4 ++++
drivers/gpu/drm/sysfb/efidrm.c | 2 +-
drivers/gpu/drm/sysfb/vesadrm.c | 2 +-
include/video/edid.h | 3 ++-
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 9d2a13b37833..cfe501d323d5 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -217,8 +217,10 @@ arch_initcall(init_x86_sysctl);
*/
struct screen_info screen_info;
EXPORT_SYMBOL(screen_info);
+#if defined(CONFIG_FIRMWARE_EDID)
struct edid_info edid_info;
EXPORT_SYMBOL_GPL(edid_info);
+#endif
extern int root_mountflags;
@@ -503,7 +505,9 @@ static void __init parse_boot_params(void)
{
ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev);
screen_info = boot_params.screen_info;
+#if defined(CONFIG_FIRMWARE_EDID)
edid_info = boot_params.edid_info;
+#endif
#ifdef CONFIG_X86_32
apm_info.bios = boot_params.apm_bios_info;
ist_info = boot_params.ist_info;
diff --git a/drivers/gpu/drm/sysfb/efidrm.c b/drivers/gpu/drm/sysfb/efidrm.c
index 46912924636a..a8b1305b6e13 100644
--- a/drivers/gpu/drm/sysfb/efidrm.c
+++ b/drivers/gpu/drm/sysfb/efidrm.c
@@ -202,7 +202,7 @@ static struct efidrm_device *efidrm_device_create(struct drm_driver *drv,
drm_dbg(dev, "framebuffer format=%p4cc, size=%dx%d, stride=%d bytes\n",
&format->format, width, height, stride);
-#ifdef CONFIG_X86
+#if defined(CONFIG_FIRMWARE_EDID)
if (drm_edid_header_is_valid(edid_info.dummy) == 8)
sysfb->edid = edid_info.dummy;
#endif
diff --git a/drivers/gpu/drm/sysfb/vesadrm.c b/drivers/gpu/drm/sysfb/vesadrm.c
index 7945544ba73e..c5216dbe21ec 100644
--- a/drivers/gpu/drm/sysfb/vesadrm.c
+++ b/drivers/gpu/drm/sysfb/vesadrm.c
@@ -344,7 +344,7 @@ static struct vesadrm_device *vesadrm_device_create(struct drm_driver *drv,
#endif
}
-#ifdef CONFIG_X86
+#if defined(CONFIG_FIRMWARE_EDID)
if (drm_edid_header_is_valid(edid_info.dummy) == 8)
sysfb->edid = edid_info.dummy;
#endif
diff --git a/include/video/edid.h b/include/video/edid.h
index f614371e9116..c2b186b1933a 100644
--- a/include/video/edid.h
+++ b/include/video/edid.h
@@ -4,7 +4,8 @@
#include <uapi/video/edid.h>
-#ifdef CONFIG_X86
+#if defined(CONFIG_FIRMWARE_EDID)
extern struct edid_info edid_info;
#endif
+
#endif /* __linux_video_edid_h__ */
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] video: Make CONFIG_FIRMWARE_EDID generally available
2025-06-02 7:51 ` [PATCH 1/2] video: Make CONFIG_FIRMWARE_EDID generally available Thomas Zimmermann
@ 2025-06-03 16:08 ` Helge Deller
0 siblings, 0 replies; 7+ messages in thread
From: Helge Deller @ 2025-06-03 16:08 UTC (permalink / raw)
To: Thomas Zimmermann, arnd, javierm; +Cc: dri-devel, linux-fbdev
On 6/2/25 09:51, Thomas Zimmermann wrote:
> DRM drivers such as efidrm and vesadrm can export firmware EDID
> data to userspace. Make the related option CONFIG_FIRMWARE_EDID
> available without CONFIG_FB. Make it depend on X86, which is
> currently the only architecture providing EDID information.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/video/Kconfig | 18 +++++++++++++++++-
> drivers/video/fbdev/core/Kconfig | 15 ---------------
> drivers/video/fbdev/core/fbmon.c | 3 +--
> 3 files changed, 18 insertions(+), 18 deletions(-)
Reviewed-by: Helge Deller <deller@gmx.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] video: Make global edid_info depend on CONFIG_FIRMWARE_EDID
2025-06-02 7:51 ` [PATCH 2/2] video: Make global edid_info depend on CONFIG_FIRMWARE_EDID Thomas Zimmermann
@ 2025-06-03 16:08 ` Helge Deller
2025-06-03 16:18 ` Thomas Zimmermann
0 siblings, 1 reply; 7+ messages in thread
From: Helge Deller @ 2025-06-03 16:08 UTC (permalink / raw)
To: Thomas Zimmermann, arnd, javierm; +Cc: dri-devel, linux-fbdev
On 6/2/25 09:51, Thomas Zimmermann wrote:
> Protect global edid_info behind CONFIG_FIRMWARE_EDID and remove
> the config tests for CONFIG_X86. Makes edid_info available iff
> its option has been enabled.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> arch/x86/kernel/setup.c | 4 ++++
> drivers/gpu/drm/sysfb/efidrm.c | 2 +-
> drivers/gpu/drm/sysfb/vesadrm.c | 2 +-
> include/video/edid.h | 3 ++-
> 4 files changed, 8 insertions(+), 3 deletions(-)
Reviewed-by: Helge Deller <deller@gmx.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] video: Make global edid_info depend on CONFIG_FIRMWARE_EDID
2025-06-03 16:08 ` Helge Deller
@ 2025-06-03 16:18 ` Thomas Zimmermann
2025-06-03 16:42 ` Helge Deller
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Zimmermann @ 2025-06-03 16:18 UTC (permalink / raw)
To: Helge Deller, arnd, javierm; +Cc: dri-devel, linux-fbdev
Hi
Am 03.06.25 um 18:08 schrieb Helge Deller:
> On 6/2/25 09:51, Thomas Zimmermann wrote:
>> Protect global edid_info behind CONFIG_FIRMWARE_EDID and remove
>> the config tests for CONFIG_X86. Makes edid_info available iff
>> its option has been enabled.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>> arch/x86/kernel/setup.c | 4 ++++
>> drivers/gpu/drm/sysfb/efidrm.c | 2 +-
>> drivers/gpu/drm/sysfb/vesadrm.c | 2 +-
>> include/video/edid.h | 3 ++-
>> 4 files changed, 8 insertions(+), 3 deletions(-)
>
> Reviewed-by: Helge Deller <deller@gmx.de>
Thanks for reviewing. I'd like to merge the series via drm-misc for some
other patches I have for DRM. Ok?
Best regards
Thomas
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] video: Make global edid_info depend on CONFIG_FIRMWARE_EDID
2025-06-03 16:18 ` Thomas Zimmermann
@ 2025-06-03 16:42 ` Helge Deller
0 siblings, 0 replies; 7+ messages in thread
From: Helge Deller @ 2025-06-03 16:42 UTC (permalink / raw)
To: Thomas Zimmermann, arnd, javierm; +Cc: dri-devel, linux-fbdev
On 6/3/25 18:18, Thomas Zimmermann wrote:
> Hi
>
> Am 03.06.25 um 18:08 schrieb Helge Deller:
>> On 6/2/25 09:51, Thomas Zimmermann wrote:
>>> Protect global edid_info behind CONFIG_FIRMWARE_EDID and remove
>>> the config tests for CONFIG_X86. Makes edid_info available iff
>>> its option has been enabled.
>>>
>>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>>> ---
>>> arch/x86/kernel/setup.c | 4 ++++
>>> drivers/gpu/drm/sysfb/efidrm.c | 2 +-
>>> drivers/gpu/drm/sysfb/vesadrm.c | 2 +-
>>> include/video/edid.h | 3 ++-
>>> 4 files changed, 8 insertions(+), 3 deletions(-)
>>
>> Reviewed-by: Helge Deller <deller@gmx.de>
>
> Thanks for reviewing. I'd like to merge the series via drm-misc for some other patches I have for DRM. Ok?
Sure.
Helge
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-06-03 16:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-02 7:51 [PATCH 0/2] video: Make edid_info generally available in x86 Thomas Zimmermann
2025-06-02 7:51 ` [PATCH 1/2] video: Make CONFIG_FIRMWARE_EDID generally available Thomas Zimmermann
2025-06-03 16:08 ` Helge Deller
2025-06-02 7:51 ` [PATCH 2/2] video: Make global edid_info depend on CONFIG_FIRMWARE_EDID Thomas Zimmermann
2025-06-03 16:08 ` Helge Deller
2025-06-03 16:18 ` Thomas Zimmermann
2025-06-03 16:42 ` Helge Deller
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).