提交 d1e183c8 编写于 作者: G Geert Uytterhoeven

console/font: Refactor font support code selection logic

The current Makefile rules to build font support are messy and buggy.
Replace them by Kconfig rules:
  - Introduce CONFIG_FONT_SUPPORT, which controls the building of all font
    code,
  - Select CONFIG_FONT_SUPPORT for all drivers that use fonts,
  - Select CONFIG_FONT_8x16 for all drivers that default to the VGA8x16
    font,
  - Drop the bogus console dependency for CONFIG_VIDEO_VIVI,
  - Always process drivers/video/console/Makefile, as some drivers need
    fonts even if CONFIG_VT is not set.

This fixes (if CONFIG_SOLO6X10=y and there are no built-in console
drivers):

drivers/built-in.o: In function `solo_osd_print':
drivers/staging/media/solo6x10/solo6x10-enc.c:144: undefined reference to `.find_font'

This fixes (if CONFIG_VT=n):

drivers/built-in.o: In function `vivi_init':
vivi.c:(.init.text+0x1a3da): undefined reference to `find_font'
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com> [original part]
Acked-by: Randy Dunlap <rdunlap@infradead.org> [drivers/video/Makefile]
上级 866f3213
...@@ -220,7 +220,7 @@ if V4L_TEST_DRIVERS ...@@ -220,7 +220,7 @@ if V4L_TEST_DRIVERS
config VIDEO_VIVI config VIDEO_VIVI
tristate "Virtual Video Driver" tristate "Virtual Video Driver"
depends on VIDEO_DEV && VIDEO_V4L2 && !SPARC32 && !SPARC64 depends on VIDEO_DEV && VIDEO_V4L2 && !SPARC32 && !SPARC64
depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE select FONT_SUPPORT
select FONT_8x16 select FONT_8x16
select VIDEOBUF2_VMALLOC select VIDEOBUF2_VMALLOC
default n default n
......
config SOLO6X10 config SOLO6X10
tristate "Softlogic 6x10 MPEG codec cards" tristate "Softlogic 6x10 MPEG codec cards"
depends on PCI && VIDEO_DEV && SND && I2C depends on PCI && VIDEO_DEV && SND && I2C
select FONT_SUPPORT
select FONT_8x16
select VIDEOBUF2_DMA_SG select VIDEOBUF2_DMA_SG
select VIDEOBUF2_DMA_CONTIG select VIDEOBUF2_DMA_CONTIG
select SND_PCM select SND_PCM
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
config USB_SISUSBVGA config USB_SISUSBVGA
tristate "USB 2.0 SVGA dongle support (Net2280/SiS315)" tristate "USB 2.0 SVGA dongle support (Net2280/SiS315)"
depends on (USB_MUSB_HDRC || USB_EHCI_HCD) depends on (USB_MUSB_HDRC || USB_EHCI_HCD)
select FONT_SUPPORT if USB_SISUSBVGA_CON
---help--- ---help---
Say Y here if you intend to attach a USB2VGA dongle based on a Say Y here if you intend to attach a USB2VGA dongle based on a
Net2280 and a SiS315 chip. Net2280 and a SiS315 chip.
......
...@@ -12,7 +12,7 @@ fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ ...@@ -12,7 +12,7 @@ fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
modedb.o fbcvt.o modedb.o fbcvt.o
fb-objs := $(fb-y) fb-objs := $(fb-y)
obj-$(CONFIG_VT) += console/ obj-y += console/
obj-$(CONFIG_LOGO) += logo/ obj-$(CONFIG_LOGO) += logo/
obj-y += backlight/ obj-y += backlight/
......
...@@ -64,6 +64,7 @@ config MDA_CONSOLE ...@@ -64,6 +64,7 @@ config MDA_CONSOLE
config SGI_NEWPORT_CONSOLE config SGI_NEWPORT_CONSOLE
tristate "SGI Newport Console support" tristate "SGI Newport Console support"
depends on SGI_IP22 depends on SGI_IP22
select FONT_SUPPORT
help help
Say Y here if you want the console on the Newport aka XL graphics Say Y here if you want the console on the Newport aka XL graphics
card of your Indy. Most people say Y here. card of your Indy. Most people say Y here.
...@@ -93,6 +94,7 @@ config FRAMEBUFFER_CONSOLE ...@@ -93,6 +94,7 @@ config FRAMEBUFFER_CONSOLE
tristate "Framebuffer Console support" tristate "Framebuffer Console support"
depends on FB depends on FB
select CRC32 select CRC32
select FONT_SUPPORT
help help
Low-level framebuffer-based console driver. Low-level framebuffer-based console driver.
...@@ -125,12 +127,18 @@ config FRAMEBUFFER_CONSOLE_ROTATION ...@@ -125,12 +127,18 @@ config FRAMEBUFFER_CONSOLE_ROTATION
config STI_CONSOLE config STI_CONSOLE
bool "STI text console" bool "STI text console"
depends on PARISC depends on PARISC
select FONT_SUPPORT
default y default y
help help
The STI console is the builtin display/keyboard on HP-PARISC The STI console is the builtin display/keyboard on HP-PARISC
machines. Say Y here to build support for it into your kernel. machines. Say Y here to build support for it into your kernel.
The alternative is to use your primary serial port as a console. The alternative is to use your primary serial port as a console.
config FONT_SUPPORT
tristate
if FONT_SUPPORT
config FONTS config FONTS
bool "Select compiled-in fonts" bool "Select compiled-in fonts"
depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE
...@@ -160,7 +168,6 @@ config FONT_8x8 ...@@ -160,7 +168,6 @@ config FONT_8x8
config FONT_8x16 config FONT_8x16
bool "VGA 8x16 font" if FONTS bool "VGA 8x16 font" if FONTS
depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE || STI_CONSOLE || USB_SISUSBVGA_CON
default y if !SPARC && !FONTS default y if !SPARC && !FONTS
help help
This is the "high resolution" font for the VGA frame buffer (the one This is the "high resolution" font for the VGA frame buffer (the one
...@@ -228,7 +235,6 @@ config FONT_10x18 ...@@ -228,7 +235,6 @@ config FONT_10x18
config FONT_AUTOSELECT config FONT_AUTOSELECT
def_bool y def_bool y
depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE || STI_CONSOLE || USB_SISUSBVGA_CON
depends on !FONT_8x8 depends on !FONT_8x8
depends on !FONT_6x11 depends on !FONT_6x11
depends on !FONT_7x14 depends on !FONT_7x14
...@@ -240,5 +246,7 @@ config FONT_AUTOSELECT ...@@ -240,5 +246,7 @@ config FONT_AUTOSELECT
depends on !FONT_10x18 depends on !FONT_10x18
select FONT_8x16 select FONT_8x16
endif # FONT_SUPPORT
endmenu endmenu
...@@ -18,14 +18,14 @@ font-objs-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o ...@@ -18,14 +18,14 @@ font-objs-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o
font-objs += $(font-objs-y) font-objs += $(font-objs-y)
# Each configuration option enables a list of files. obj-$(CONFIG_FONT_SUPPORT) += font.o
obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o
obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o font.o obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o
obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o font.o obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o
obj-$(CONFIG_VGA_CONSOLE) += vgacon.o obj-$(CONFIG_VGA_CONSOLE) += vgacon.o
obj-$(CONFIG_MDA_CONSOLE) += mdacon.o obj-$(CONFIG_MDA_CONSOLE) += mdacon.o
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o font.o softcursor.o obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o softcursor.o
ifeq ($(CONFIG_FB_TILEBLITTING),y) ifeq ($(CONFIG_FB_TILEBLITTING),y)
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += tileblit.o obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += tileblit.o
endif endif
...@@ -34,8 +34,4 @@ obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \ ...@@ -34,8 +34,4 @@ obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \
fbcon_ccw.o fbcon_ccw.o
endif endif
obj-$(CONFIG_FB_STI) += sticore.o font.o obj-$(CONFIG_FB_STI) += sticore.o
ifeq ($(CONFIG_USB_SISUSBVGA_CON),y)
obj-$(CONFIG_USB_SISUSBVGA) += font.o
endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册