This small series aims at making EFI earlycon a better debugging tool. Currently, when earlycon=efifb us requested, there are two options. (1) By default, earlycon is unregistered as soon as real console comes up, before devices init. Sometimes, "real" device is VT with dummycon, resulting in no console output untile framebuffer/drm console takes over. (2) When keep_bootcon option is used, earlycon never unregisters. This solves the issue of (1), but results in display corruption when both EFI earlycon and framebuffer/drm drivers write to the same aperture.
The approach here is to take the best from (1) and (2): EFI earlycon unregisters exactly when the frambuffer/drm driver claims aperture. This new behavior is gated with 'earlycon=efifb,handoff' option, so the default case does not change. Patch 1 aligns EFI earlycon framebuffer unmapping time with actual console unregistration. Patch 2 moves aperture ackquisition in efifb and simplefb before mapping the framebuffer. Also it moves resource size checks before aperture ackquisition in simpledrm. Finally, patch 3 implements "handoff" option for efifb, and wires conditional EFI earlycon unregistration to devm_aperture_acquire_for_platform_device(), aperture_remove_conflicting_devices() and aperture_remove_conflicting_pci_devices(). Signed-off-by: Mikhail Rudenko <[email protected]> --- Mikhail Rudenko (3): efi: earlycon: unmap framebuffer when the console is unregistered video: acquire firmware framebuffer apertures before mapping video: aperture: hand off EFI earlycon on aperture ackquisition Documentation/admin-guide/kernel-parameters.txt | 5 ++- drivers/firmware/efi/earlycon.c | 49 ++++++++++++++++++++++--- drivers/gpu/drm/sysfb/simpledrm.c | 28 +++++++------- drivers/video/aperture.c | 13 ++++++- drivers/video/fbdev/efifb.c | 12 +++--- drivers/video/fbdev/simplefb.c | 11 +++--- include/linux/efi.h | 7 ++++ 7 files changed, 93 insertions(+), 32 deletions(-) --- base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 change-id: 20261125-efi-earlycon-51cd4be4e8d3 Best regards, -- Mikhail Rudenko <[email protected]>
