mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
sysfb: Move edid_info into sysfb_primary_display
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. 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@suse.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
parent
08e583ad68
commit
4fcae63588
6 changed files with 16 additions and 18 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue