lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b626f958-36e6-4dc3-a82b-9656275c3bb0@suse.de>
Date: Fri, 21 Nov 2025 16:56:27 +0100
From: Thomas Zimmermann <tzimmermann@...e.de>
To: ardb@...nel.org, javierm@...hat.com, arnd@...db.de
Cc: x86@...nel.org, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org, linux-efi@...r.kernel.org,
 loongarch@...ts.linux.dev, linux-riscv@...ts.infradead.org,
 dri-devel@...ts.freedesktop.org, linux-hyperv@...r.kernel.org,
 linux-pci@...r.kernel.org, linux-fbdev@...r.kernel.org
Subject: Re: [PATCH 6/6] sysfb: Move edid_info into sysfb_primary_display



Am 21.11.25 um 14:36 schrieb Thomas Zimmermann:
> Move x86's edid_info into sysfb_primary_display as a new field named
> edid. Adapt all users.
>
> An instance of edid_info has only been defined on x86. With the move
> into sysfb_primary_display, it becomes available on all architectures.
> Therefore remove this contraint from CONFIG_FIRMWARE_EDID.

s/contraint/constraint/

>
> x86 fills the EDID data from boot_params.edid_info. DRM drivers pick
> up the raw data and make it available to DRM clients. Replace the
> drivers' references to edid_info and instead use the sysfb_display_info
> as passed from sysfb.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@...e.de>
> ---
>   arch/x86/kernel/setup.c          | 6 +-----
>   drivers/gpu/drm/sysfb/efidrm.c   | 5 ++---
>   drivers/gpu/drm/sysfb/vesadrm.c  | 5 ++---
>   drivers/video/Kconfig            | 1 -
>   drivers/video/fbdev/core/fbmon.c | 8 +++++---
>   include/linux/sysfb.h            | 6 ++++++
>   include/video/edid.h             | 4 ----
>   7 files changed, 16 insertions(+), 19 deletions(-)
>
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 675e4b9deb1f..d9bfe2032cd9 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -215,10 +215,6 @@ arch_initcall(init_x86_sysctl);
>   
>   struct sysfb_display_info sysfb_primary_display;
>   EXPORT_SYMBOL(sysfb_primary_display);
> -#if defined(CONFIG_FIRMWARE_EDID)
> -struct edid_info edid_info;
> -EXPORT_SYMBOL_GPL(edid_info);
> -#endif
>   
>   extern int root_mountflags;
>   
> @@ -530,7 +526,7 @@ static void __init parse_boot_params(void)
>   	ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev);
>   	sysfb_primary_display.screen = boot_params.screen_info;
>   #if defined(CONFIG_FIRMWARE_EDID)
> -	edid_info = boot_params.edid_info;
> +	sysfb_primary_display.edid = boot_params.edid_info;
>   #endif
>   #ifdef CONFIG_X86_32
>   	apm_info.bios = boot_params.apm_bios_info;
> diff --git a/drivers/gpu/drm/sysfb/efidrm.c b/drivers/gpu/drm/sysfb/efidrm.c
> index 29533ae8fbbf..50e0aeef709c 100644
> --- a/drivers/gpu/drm/sysfb/efidrm.c
> +++ b/drivers/gpu/drm/sysfb/efidrm.c
> @@ -24,7 +24,6 @@
>   #include <drm/drm_print.h>
>   #include <drm/drm_probe_helper.h>
>   
> -#include <video/edid.h>
>   #include <video/pixel_format.h>
>   
>   #include "drm_sysfb_helper.h"
> @@ -207,8 +206,8 @@ static struct efidrm_device *efidrm_device_create(struct drm_driver *drv,
>   		&format->format, width, height, stride);
>   
>   #if defined(CONFIG_FIRMWARE_EDID)
> -	if (drm_edid_header_is_valid(edid_info.dummy) == 8)
> -		sysfb->edid = edid_info.dummy;
> +	if (drm_edid_header_is_valid(dpy->edid.dummy) == 8)
> +		sysfb->edid = dpy->edid.dummy;
>   #endif
>   	sysfb->fb_mode = drm_sysfb_mode(width, height, 0, 0);
>   	sysfb->fb_format = format;
> diff --git a/drivers/gpu/drm/sysfb/vesadrm.c b/drivers/gpu/drm/sysfb/vesadrm.c
> index 16fc223f8c5b..0680638b8131 100644
> --- a/drivers/gpu/drm/sysfb/vesadrm.c
> +++ b/drivers/gpu/drm/sysfb/vesadrm.c
> @@ -25,7 +25,6 @@
>   #include <drm/drm_print.h>
>   #include <drm/drm_probe_helper.h>
>   
> -#include <video/edid.h>
>   #include <video/pixel_format.h>
>   #include <video/vga.h>
>   
> @@ -474,8 +473,8 @@ static struct vesadrm_device *vesadrm_device_create(struct drm_driver *drv,
>   	}
>   
>   #if defined(CONFIG_FIRMWARE_EDID)
> -	if (drm_edid_header_is_valid(edid_info.dummy) == 8)
> -		sysfb->edid = edid_info.dummy;
> +	if (drm_edid_header_is_valid(dpy->edid.dummy) == 8)
> +		sysfb->edid = dpy->edid.dummy;
>   #endif
>   	sysfb->fb_mode = drm_sysfb_mode(width, height, 0, 0);
>   	sysfb->fb_format = format;
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index d51777df12d1..ad55e7d62159 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -63,7 +63,6 @@ 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
> diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
> index 0a65bef01e3c..07df7e98f8a3 100644
> --- a/drivers/video/fbdev/core/fbmon.c
> +++ b/drivers/video/fbdev/core/fbmon.c
> @@ -32,11 +32,13 @@
>   #include <linux/module.h>
>   #include <linux/pci.h>
>   #include <linux/slab.h>
> -#include <video/edid.h>
> +#include <linux/string_choices.h>
> +#include <linux/sysfb.h>
> +
>   #include <video/of_videomode.h>
>   #include <video/videomode.h>
> +
>   #include "../edid.h"
> -#include <linux/string_choices.h>
>   
>   /*
>    * EDID parser
> @@ -1504,7 +1506,7 @@ const unsigned char *fb_firmware_edid(struct device *device)
>   		res = &dev->resource[PCI_ROM_RESOURCE];
>   
>   	if (res && res->flags & IORESOURCE_ROM_SHADOW)
> -		edid = edid_info.dummy;
> +		edid = sysfb_primary_display.edid.dummy;
>   
>   	return edid;
>   }
> diff --git a/include/linux/sysfb.h b/include/linux/sysfb.h
> index e8bde392c690..5226efde9ad4 100644
> --- a/include/linux/sysfb.h
> +++ b/include/linux/sysfb.h
> @@ -12,6 +12,8 @@
>   #include <linux/screen_info.h>
>   #include <linux/types.h>
>   
> +#include <video/edid.h>
> +
>   struct device;
>   struct platform_device;
>   struct screen_info;
> @@ -62,6 +64,10 @@ struct efifb_dmi_info {
>   
>   struct sysfb_display_info {
>   	struct screen_info screen;
> +
> +#if defined(CONFIG_FIRMWARE_EDID)
> +	struct edid_info edid;
> +#endif
>   };
>   
>   extern struct sysfb_display_info sysfb_primary_display;
> diff --git a/include/video/edid.h b/include/video/edid.h
> index c2b186b1933a..52aabb706032 100644
> --- a/include/video/edid.h
> +++ b/include/video/edid.h
> @@ -4,8 +4,4 @@
>   
>   #include <uapi/video/edid.h>
>   
> -#if defined(CONFIG_FIRMWARE_EDID)
> -extern struct edid_info edid_info;
> -#endif
> -
>   #endif /* __linux_video_edid_h__ */

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ