video: Make edid_info generally available in x86
Subsystems (6)
Thomas Zimmermann
maintainercover video: Make edid_info generally available in x86
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(-)
Signature · 1 line
2.49.0
Thomas Zimmermann
maintainerPATCH 1/2 video: Make CONFIG_FIRMWARE_EDID generally available
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.
--- drivers/video/Kconfig | 18 +++++++++++++++++- drivers/video/fbdev/core/Kconfig | 15 --------------- drivers/video/fbdev/core/fbmon.c | 3 +-- 3 files changed, 18 insertions(+), 18 deletions(-)
drivers/video/Kconfig +17 -1
@@ -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
drivers/video/fbdev/core/Kconfig +0 -15
@@ -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
drivers/video/fbdev/core/fbmon.c +1 -2
@@ -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 ;
Signature · 1 line
2.49.0
Re: [PATCH 1/2] video: Make CONFIG_FIRMWARE_EDID generally available
Quoted 11 lines · Thomas Zimmermann
DRM drivers such as efidrm and vesadrm can export firmware EDID data to userspace. Make the related option
CONFIG_FIRMWARE_EDIDavailable withoutCONFIG_FB. Make it depend on X86, which is currently the only architecture providing EDID information.Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/video/Kconfig | 18 +++++++++++++++++- drivers/video/fbdev/core/Kconfig | 15 --------------- drivers/video/fbdev/core/fbmon.c | 3 +-- 3 files changed, 18 insertions(+), 18 deletions(-)
Thomas Zimmermann
maintainerPATCH 2/2 video: Make global edid_info depend on CONFIG_FIRMWARE_EDID
In reply to Thomas ZimmermannProtect 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.
--- 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(-)
arch/x86/kernel/setup.c +4 -0
@@ -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;
drivers/gpu/drm/sysfb/efidrm.c +1 -1
@@ -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
drivers/gpu/drm/sysfb/vesadrm.c +1 -1
@@ -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
include/video/edid.h +2 -1
@@ -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__ */
Signature · 1 line
2.49.0
Re: [PATCH 2/2] video: Make global edid_info depend on CONFIG_FIRMWARE_EDID
Quoted 11 lines · Thomas Zimmermann
Protect global
edid_infobehindCONFIG_FIRMWARE_EDIDand remove the config tests forCONFIG_X86. Makesedid_infoavailable iff its option has been enabled.Signed-off-by Thomas Zimmermann <[email protected]>--- 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(-)
Thomas Zimmermann
maintainerRe: [PATCH 2/2] video: Make global edid_info depend on CONFIG_FIRMWARE_EDID
Hi
Am 03.06.25 um 18:08 schrieb Helge Deller:
Quoted 13 lines · Thomas Zimmermann
Quoted 11 lines
Protect global
edid_infobehindCONFIG_FIRMWARE_EDIDand remove the config tests forCONFIG_X86. Makesedid_infoavailable iff its option has been enabled.Signed-off-by Thomas Zimmermann <[email protected]>---
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(-)
Quoted 1 line
Reviewed-by Helge Deller <[email protected]>
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
Signature · 7 lines
-- 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)
Helge Deller
maintainerRe: [PATCH 2/2] video: Make global edid_info depend on CONFIG_FIRMWARE_EDID
Quoted 16 lines · Thomas Zimmermann
Hi
Am 03.06.25 um 18:08 schrieb Helge Deller:
Quoted 13 lines · Thomas Zimmermann
Quoted 11 lines
Protect global
edid_infobehindCONFIG_FIRMWARE_EDIDand remove the config tests forCONFIG_X86. Makesedid_infoavailable iff its option has been enabled.Signed-off-by Thomas Zimmermann <[email protected]>---
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(-)
Quoted 3 lines
Quoted 1 line
Reviewed-by Helge Deller <[email protected]>Thanks for reviewing. I'd like to merge the series via drm-misc for some other patches I have for DRM. Ok?
Sure.
Helge