diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-05-15 07:26:20 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-06-23 09:55:16 -0400 |
commit | d1e183c8dd38bfdd07e38a79577fe78124e63ab1 (patch) | |
tree | 7c0b201ff93d0c0d632cfb44d201135d18d5382f /drivers | |
parent | 866f321339988293a5bb3ec6634c2c9d8396bf54 (diff) |
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: Geert 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]
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/Kconfig | 2 | ||||
-rw-r--r-- | drivers/staging/media/solo6x10/Kconfig | 2 | ||||
-rw-r--r-- | drivers/usb/misc/sisusbvga/Kconfig | 1 | ||||
-rw-r--r-- | drivers/video/Makefile | 2 | ||||
-rw-r--r-- | drivers/video/console/Kconfig | 12 | ||||
-rw-r--r-- | drivers/video/console/Makefile | 14 |
6 files changed, 20 insertions, 13 deletions
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 0494d2769fd7..9f795b583480 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig | |||
@@ -220,7 +220,7 @@ if V4L_TEST_DRIVERS | |||
220 | config VIDEO_VIVI | 220 | config VIDEO_VIVI |
221 | tristate "Virtual Video Driver" | 221 | tristate "Virtual Video Driver" |
222 | depends on VIDEO_DEV && VIDEO_V4L2 && !SPARC32 && !SPARC64 | 222 | depends on VIDEO_DEV && VIDEO_V4L2 && !SPARC32 && !SPARC64 |
223 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE | 223 | select FONT_SUPPORT |
224 | select FONT_8x16 | 224 | select FONT_8x16 |
225 | select VIDEOBUF2_VMALLOC | 225 | select VIDEOBUF2_VMALLOC |
226 | default n | 226 | default n |
diff --git a/drivers/staging/media/solo6x10/Kconfig b/drivers/staging/media/solo6x10/Kconfig index ec32776ff547..b34bb6c1cafe 100644 --- a/drivers/staging/media/solo6x10/Kconfig +++ b/drivers/staging/media/solo6x10/Kconfig | |||
@@ -1,6 +1,8 @@ | |||
1 | config SOLO6X10 | 1 | config SOLO6X10 |
2 | tristate "Softlogic 6x10 MPEG codec cards" | 2 | tristate "Softlogic 6x10 MPEG codec cards" |
3 | depends on PCI && VIDEO_DEV && SND && I2C | 3 | depends on PCI && VIDEO_DEV && SND && I2C |
4 | select FONT_SUPPORT | ||
5 | select FONT_8x16 | ||
4 | select VIDEOBUF2_DMA_SG | 6 | select VIDEOBUF2_DMA_SG |
5 | select VIDEOBUF2_DMA_CONTIG | 7 | select VIDEOBUF2_DMA_CONTIG |
6 | select SND_PCM | 8 | select SND_PCM |
diff --git a/drivers/usb/misc/sisusbvga/Kconfig b/drivers/usb/misc/sisusbvga/Kconfig index 0d03a5200482..36bc28c884ad 100644 --- a/drivers/usb/misc/sisusbvga/Kconfig +++ b/drivers/usb/misc/sisusbvga/Kconfig | |||
@@ -2,6 +2,7 @@ | |||
2 | config USB_SISUSBVGA | 2 | config USB_SISUSBVGA |
3 | tristate "USB 2.0 SVGA dongle support (Net2280/SiS315)" | 3 | tristate "USB 2.0 SVGA dongle support (Net2280/SiS315)" |
4 | depends on (USB_MUSB_HDRC || USB_EHCI_HCD) | 4 | depends on (USB_MUSB_HDRC || USB_EHCI_HCD) |
5 | select FONT_SUPPORT if USB_SISUSBVGA_CON | ||
5 | ---help--- | 6 | ---help--- |
6 | Say Y here if you intend to attach a USB2VGA dongle based on a | 7 | Say Y here if you intend to attach a USB2VGA dongle based on a |
7 | Net2280 and a SiS315 chip. | 8 | Net2280 and a SiS315 chip. |
diff --git a/drivers/video/Makefile b/drivers/video/Makefile index e8bae8dd4804..8c8be7e15f9c 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile | |||
@@ -12,7 +12,7 @@ fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ | |||
12 | modedb.o fbcvt.o | 12 | modedb.o fbcvt.o |
13 | fb-objs := $(fb-y) | 13 | fb-objs := $(fb-y) |
14 | 14 | ||
15 | obj-$(CONFIG_VT) += console/ | 15 | obj-y += console/ |
16 | obj-$(CONFIG_LOGO) += logo/ | 16 | obj-$(CONFIG_LOGO) += logo/ |
17 | obj-y += backlight/ | 17 | obj-y += backlight/ |
18 | 18 | ||
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index 84f04d9461a9..8af6ad3f1323 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig | |||
@@ -64,6 +64,7 @@ config MDA_CONSOLE | |||
64 | config SGI_NEWPORT_CONSOLE | 64 | config SGI_NEWPORT_CONSOLE |
65 | tristate "SGI Newport Console support" | 65 | tristate "SGI Newport Console support" |
66 | depends on SGI_IP22 | 66 | depends on SGI_IP22 |
67 | select FONT_SUPPORT | ||
67 | help | 68 | help |
68 | Say Y here if you want the console on the Newport aka XL graphics | 69 | Say Y here if you want the console on the Newport aka XL graphics |
69 | card of your Indy. Most people say Y here. | 70 | card of your Indy. Most people say Y here. |
@@ -93,6 +94,7 @@ config FRAMEBUFFER_CONSOLE | |||
93 | tristate "Framebuffer Console support" | 94 | tristate "Framebuffer Console support" |
94 | depends on FB | 95 | depends on FB |
95 | select CRC32 | 96 | select CRC32 |
97 | select FONT_SUPPORT | ||
96 | help | 98 | help |
97 | Low-level framebuffer-based console driver. | 99 | Low-level framebuffer-based console driver. |
98 | 100 | ||
@@ -125,12 +127,18 @@ config FRAMEBUFFER_CONSOLE_ROTATION | |||
125 | config STI_CONSOLE | 127 | config STI_CONSOLE |
126 | bool "STI text console" | 128 | bool "STI text console" |
127 | depends on PARISC | 129 | depends on PARISC |
130 | select FONT_SUPPORT | ||
128 | default y | 131 | default y |
129 | help | 132 | help |
130 | The STI console is the builtin display/keyboard on HP-PARISC | 133 | The STI console is the builtin display/keyboard on HP-PARISC |
131 | machines. Say Y here to build support for it into your kernel. | 134 | machines. Say Y here to build support for it into your kernel. |
132 | The alternative is to use your primary serial port as a console. | 135 | The alternative is to use your primary serial port as a console. |
133 | 136 | ||
137 | config FONT_SUPPORT | ||
138 | tristate | ||
139 | |||
140 | if FONT_SUPPORT | ||
141 | |||
134 | config FONTS | 142 | config FONTS |
135 | bool "Select compiled-in fonts" | 143 | bool "Select compiled-in fonts" |
136 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE | 144 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE |
@@ -160,7 +168,6 @@ config FONT_8x8 | |||
160 | 168 | ||
161 | config FONT_8x16 | 169 | config FONT_8x16 |
162 | bool "VGA 8x16 font" if FONTS | 170 | bool "VGA 8x16 font" if FONTS |
163 | depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE || STI_CONSOLE || USB_SISUSBVGA_CON | ||
164 | default y if !SPARC && !FONTS | 171 | default y if !SPARC && !FONTS |
165 | help | 172 | help |
166 | This is the "high resolution" font for the VGA frame buffer (the one | 173 | This is the "high resolution" font for the VGA frame buffer (the one |
@@ -228,7 +235,6 @@ config FONT_10x18 | |||
228 | 235 | ||
229 | config FONT_AUTOSELECT | 236 | config FONT_AUTOSELECT |
230 | def_bool y | 237 | def_bool y |
231 | depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE || STI_CONSOLE || USB_SISUSBVGA_CON | ||
232 | depends on !FONT_8x8 | 238 | depends on !FONT_8x8 |
233 | depends on !FONT_6x11 | 239 | depends on !FONT_6x11 |
234 | depends on !FONT_7x14 | 240 | depends on !FONT_7x14 |
@@ -240,5 +246,7 @@ config FONT_AUTOSELECT | |||
240 | depends on !FONT_10x18 | 246 | depends on !FONT_10x18 |
241 | select FONT_8x16 | 247 | select FONT_8x16 |
242 | 248 | ||
249 | endif # FONT_SUPPORT | ||
250 | |||
243 | endmenu | 251 | endmenu |
244 | 252 | ||
diff --git a/drivers/video/console/Makefile b/drivers/video/console/Makefile index a862e9173ebe..3a11b635b4da 100644 --- a/drivers/video/console/Makefile +++ b/drivers/video/console/Makefile | |||
@@ -18,14 +18,14 @@ font-objs-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o | |||
18 | 18 | ||
19 | font-objs += $(font-objs-y) | 19 | font-objs += $(font-objs-y) |
20 | 20 | ||
21 | # Each configuration option enables a list of files. | 21 | obj-$(CONFIG_FONT_SUPPORT) += font.o |
22 | 22 | ||
23 | obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o | 23 | obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o |
24 | obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o font.o | 24 | obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o |
25 | obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o font.o | 25 | obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o |
26 | obj-$(CONFIG_VGA_CONSOLE) += vgacon.o | 26 | obj-$(CONFIG_VGA_CONSOLE) += vgacon.o |
27 | obj-$(CONFIG_MDA_CONSOLE) += mdacon.o | 27 | obj-$(CONFIG_MDA_CONSOLE) += mdacon.o |
28 | obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o font.o softcursor.o | 28 | obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o softcursor.o |
29 | ifeq ($(CONFIG_FB_TILEBLITTING),y) | 29 | ifeq ($(CONFIG_FB_TILEBLITTING),y) |
30 | obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += tileblit.o | 30 | obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += tileblit.o |
31 | endif | 31 | endif |
@@ -34,8 +34,4 @@ obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \ | |||
34 | fbcon_ccw.o | 34 | fbcon_ccw.o |
35 | endif | 35 | endif |
36 | 36 | ||
37 | obj-$(CONFIG_FB_STI) += sticore.o font.o | 37 | obj-$(CONFIG_FB_STI) += sticore.o |
38 | |||
39 | ifeq ($(CONFIG_USB_SISUSBVGA_CON),y) | ||
40 | obj-$(CONFIG_USB_SISUSBVGA) += font.o | ||
41 | endif | ||