linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch: x86: make video init optional (expert)
@ 2020-12-07 21:20 Enrico Weigelt, metux IT consult
  2020-12-07 21:57 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2020-12-07 21:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, mingo, bp, x86, hpa

As x86 is becoming more widespread in embedded devices, that don't have
any video adapter at all, make it possible to opt out from video init on
bootup (expert option). Also useful for minimized paravirtualized kernels.

Most users wanna leave this enabled and shouldn't touch it, thus defaulting
to y and hiding behind CONFIG_EXPERT.

Signed-off-by: Enrico Weigelt <info@metux.net>
---
 arch/x86/Kconfig       |  7 +++++++
 arch/x86/boot/Makefile | 10 +++++-----
 arch/x86/boot/main.c   |  2 ++
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index fbf26e0f7a6a..43b4b2cca2b0 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -913,6 +913,13 @@ config DMI
 	  affected by entries in the DMI blacklist. Required by PNP
 	  BIOS code.
 
+config X86_BOOT_VIDEO
+	default y
+	bool "Setup video on boot" if EXPERT
+	help
+	  Enable setting video mode on boot. Say Y here unless your machine
+	  doesn't have any video adapter. (eg. embedded systems or VMs)
+
 config GART_IOMMU
 	bool "Old AMD GART IOMMU support"
 	select DMA_OPS
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index fe605205b4ce..7f67e1118a99 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -34,17 +34,17 @@ subdir-		:= compressed
 
 setup-y		+= a20.o bioscall.o cmdline.o copy.o cpu.o cpuflags.o cpucheck.o
 setup-y		+= early_serial_console.o edd.o header.o main.o memory.o
-setup-y		+= pm.o pmjump.o printf.o regs.o string.o tty.o video.o
-setup-y		+= video-mode.o version.o
+setup-y		+= pm.o pmjump.o printf.o regs.o string.o tty.o version.o
 setup-$(CONFIG_X86_APM_BOOT) += apm.o
+setup-$(CONFIG_X86_BOOT_VIDEO) += video.o video-mode.o
 
 # The link order of the video-*.o modules can matter.  In particular,
 # video-vga.o *must* be listed first, followed by video-vesa.o.
 # Hardware-specific drivers should follow in the order they should be
 # probed, and video-bios.o should typically be last.
-setup-y		+= video-vga.o
-setup-y		+= video-vesa.o
-setup-y		+= video-bios.o
+setup-$(CONFIG_X86_BOOT_VIDEO)	+= video-vga.o
+setup-$(CONFIG_X86_BOOT_VIDEO)	+= video-vesa.o
+setup-$(CONFIG_X86_BOOT_VIDEO)	+= video-bios.o
 
 targets		+= $(setup-y)
 hostprogs	:= tools/build
diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c
index e3add857c2c9..61cab92f9a8e 100644
--- a/arch/x86/boot/main.c
+++ b/arch/x86/boot/main.c
@@ -174,7 +174,9 @@ void main(void)
 #endif
 
 	/* Set the video mode */
+#if defined(CONFIG_X86_BOOT_VIDEO)
 	set_video();
+#endif
 
 	/* Do the last things and invoke protected mode */
 	go_to_protected_mode();
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arch: x86: make video init optional (expert)
  2020-12-07 21:20 [PATCH] arch: x86: make video init optional (expert) Enrico Weigelt, metux IT consult
@ 2020-12-07 21:57 ` Randy Dunlap
  2020-12-15 19:08   ` Enrico Weigelt, metux IT consult
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2020-12-07 21:57 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult, linux-kernel; +Cc: tglx, mingo, bp, x86, hpa

On 12/7/20 1:20 PM, Enrico Weigelt, metux IT consult wrote:
> As x86 is becoming more widespread in embedded devices, that don't have
> any video adapter at all, make it possible to opt out from video init on
> bootup (expert option). Also useful for minimized paravirtualized kernels.
> 
> Most users wanna leave this enabled and shouldn't touch it, thus defaulting

             want to

> to y and hiding behind CONFIG_EXPERT.
> 
> Signed-off-by: Enrico Weigelt <info@metux.net>
> ---
>  arch/x86/Kconfig       |  7 +++++++
>  arch/x86/boot/Makefile | 10 +++++-----
>  arch/x86/boot/main.c   |  2 ++
>  3 files changed, 14 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index fbf26e0f7a6a..43b4b2cca2b0 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -913,6 +913,13 @@ config DMI
>  	  affected by entries in the DMI blacklist. Required by PNP
>  	  BIOS code.
>  
> +config X86_BOOT_VIDEO
> +	default y
> +	bool "Setup video on boot" if EXPERT
> +	help
> +	  Enable setting video mode on boot. Say Y here unless your machine
> +	  doesn't have any video adapter. (eg. embedded systems or VMs)

	                                  (e.g., embedded systems or VMs)

> +
>  config GART_IOMMU
>  	bool "Old AMD GART IOMMU support"
>  	select DMA_OPS


-- 
~Randy


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arch: x86: make video init optional (expert)
  2020-12-07 21:57 ` Randy Dunlap
@ 2020-12-15 19:08   ` Enrico Weigelt, metux IT consult
  0 siblings, 0 replies; 3+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2020-12-15 19:08 UTC (permalink / raw)
  To: Randy Dunlap, Enrico Weigelt, metux IT consult, linux-kernel
  Cc: tglx, mingo, bp, x86, hpa

On 07.12.20 22:57, Randy Dunlap wrote:

<snip>

thanks, fixed it.
sending a v2 in a few minutes.


--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-15 19:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-07 21:20 [PATCH] arch: x86: make video init optional (expert) Enrico Weigelt, metux IT consult
2020-12-07 21:57 ` Randy Dunlap
2020-12-15 19:08   ` Enrico Weigelt, metux IT consult

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).