Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Thomas Zimmermann and committed by
Ard Biesheuvel
4fcae635 08e583ad

+16 -18
+1 -5
arch/x86/kernel/setup.c
··· 215 215 216 216 struct sysfb_display_info sysfb_primary_display; 217 217 EXPORT_SYMBOL(sysfb_primary_display); 218 - #if defined(CONFIG_FIRMWARE_EDID) 219 - struct edid_info edid_info; 220 - EXPORT_SYMBOL_GPL(edid_info); 221 - #endif 222 218 223 219 extern int root_mountflags; 224 220 ··· 526 530 ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); 527 531 sysfb_primary_display.screen = boot_params.screen_info; 528 532 #if defined(CONFIG_FIRMWARE_EDID) 529 - edid_info = boot_params.edid_info; 533 + sysfb_primary_display.edid = boot_params.edid_info; 530 534 #endif 531 535 #ifdef CONFIG_X86_32 532 536 apm_info.bios = boot_params.apm_bios_info;
+2 -3
drivers/gpu/drm/sysfb/efidrm.c
··· 24 24 #include <drm/drm_print.h> 25 25 #include <drm/drm_probe_helper.h> 26 26 27 - #include <video/edid.h> 28 27 #include <video/pixel_format.h> 29 28 30 29 #include "drm_sysfb_helper.h" ··· 206 207 &format->format, width, height, stride); 207 208 208 209 #if defined(CONFIG_FIRMWARE_EDID) 209 - if (drm_edid_header_is_valid(edid_info.dummy) == 8) 210 - sysfb->edid = edid_info.dummy; 210 + if (drm_edid_header_is_valid(dpy->edid.dummy) == 8) 211 + sysfb->edid = dpy->edid.dummy; 211 212 #endif 212 213 sysfb->fb_mode = drm_sysfb_mode(width, height, 0, 0); 213 214 sysfb->fb_format = format;
+2 -3
drivers/gpu/drm/sysfb/vesadrm.c
··· 25 25 #include <drm/drm_print.h> 26 26 #include <drm/drm_probe_helper.h> 27 27 28 - #include <video/edid.h> 29 28 #include <video/pixel_format.h> 30 29 #include <video/vga.h> 31 30 ··· 473 474 } 474 475 475 476 #if defined(CONFIG_FIRMWARE_EDID) 476 - if (drm_edid_header_is_valid(edid_info.dummy) == 8) 477 - sysfb->edid = edid_info.dummy; 477 + if (drm_edid_header_is_valid(dpy->edid.dummy) == 8) 478 + sysfb->edid = dpy->edid.dummy; 478 479 #endif 479 480 sysfb->fb_mode = drm_sysfb_mode(width, height, 0, 0); 480 481 sysfb->fb_format = format;
+5 -3
drivers/video/fbdev/core/fbmon.c
··· 32 32 #include <linux/module.h> 33 33 #include <linux/pci.h> 34 34 #include <linux/slab.h> 35 - #include <video/edid.h> 35 + #include <linux/string_choices.h> 36 + #include <linux/sysfb.h> 37 + 36 38 #include <video/of_videomode.h> 37 39 #include <video/videomode.h> 40 + 38 41 #include "../edid.h" 39 - #include <linux/string_choices.h> 40 42 41 43 /* 42 44 * EDID parser ··· 1506 1504 res = &dev->resource[PCI_ROM_RESOURCE]; 1507 1505 1508 1506 if (res && res->flags & IORESOURCE_ROM_SHADOW) 1509 - edid = edid_info.dummy; 1507 + edid = sysfb_primary_display.edid.dummy; 1510 1508 1511 1509 return edid; 1512 1510 }
+6
include/linux/sysfb.h
··· 12 12 #include <linux/screen_info.h> 13 13 #include <linux/types.h> 14 14 15 + #include <video/edid.h> 16 + 15 17 struct device; 16 18 struct platform_device; 17 19 struct screen_info; ··· 64 62 65 63 struct sysfb_display_info { 66 64 struct screen_info screen; 65 + 66 + #if defined(CONFIG_FIRMWARE_EDID) 67 + struct edid_info edid; 68 + #endif 67 69 }; 68 70 69 71 extern struct sysfb_display_info sysfb_primary_display;
-4
include/video/edid.h
··· 4 4 5 5 #include <uapi/video/edid.h> 6 6 7 - #if defined(CONFIG_FIRMWARE_EDID) 8 - extern struct edid_info edid_info; 9 - #endif 10 - 11 7 #endif /* __linux_video_edid_h__ */