diff options
-rw-r--r-- | arch/x86/boot/video-vesa.c | 9 | ||||
-rw-r--r-- | drivers/video/Kconfig | 11 |
2 files changed, 15 insertions, 5 deletions
diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c index 1e6fe0214c85..99b3079dc6ab 100644 --- a/arch/x86/boot/video-vesa.c +++ b/arch/x86/boot/video-vesa.c | |||
@@ -88,14 +88,11 @@ static int vesa_probe(void) | |||
88 | (vminfo.memory_layout == 4 || | 88 | (vminfo.memory_layout == 4 || |
89 | vminfo.memory_layout == 6) && | 89 | vminfo.memory_layout == 6) && |
90 | vminfo.memory_planes == 1) { | 90 | vminfo.memory_planes == 1) { |
91 | #ifdef CONFIG_FB | 91 | #ifdef CONFIG_FB_BOOT_VESA_SUPPORT |
92 | /* Graphics mode, color, linear frame buffer | 92 | /* Graphics mode, color, linear frame buffer |
93 | supported. Only register the mode if | 93 | supported. Only register the mode if |
94 | if framebuffer is configured, however, | 94 | if framebuffer is configured, however, |
95 | otherwise the user will be left without a screen. | 95 | otherwise the user will be left without a screen. */ |
96 | We don't require CONFIG_FB_VESA, however, since | ||
97 | some of the other framebuffer drivers can use | ||
98 | this mode-setting, too. */ | ||
99 | mi = GET_HEAP(struct mode_info, 1); | 96 | mi = GET_HEAP(struct mode_info, 1); |
100 | mi->mode = mode + VIDEO_FIRST_VESA; | 97 | mi->mode = mode + VIDEO_FIRST_VESA; |
101 | mi->depth = vminfo.bpp; | 98 | mi->depth = vminfo.bpp; |
@@ -133,10 +130,12 @@ static int vesa_set_mode(struct mode_info *mode) | |||
133 | if ((vminfo.mode_attr & 0x15) == 0x05) { | 130 | if ((vminfo.mode_attr & 0x15) == 0x05) { |
134 | /* It's a supported text mode */ | 131 | /* It's a supported text mode */ |
135 | is_graphic = 0; | 132 | is_graphic = 0; |
133 | #ifdef CONFIG_FB_BOOT_VESA_SUPPORT | ||
136 | } else if ((vminfo.mode_attr & 0x99) == 0x99) { | 134 | } else if ((vminfo.mode_attr & 0x99) == 0x99) { |
137 | /* It's a graphics mode with linear frame buffer */ | 135 | /* It's a graphics mode with linear frame buffer */ |
138 | is_graphic = 1; | 136 | is_graphic = 1; |
139 | vesa_mode |= 0x4000; /* Request linear frame buffer */ | 137 | vesa_mode |= 0x4000; /* Request linear frame buffer */ |
138 | #endif | ||
140 | } else { | 139 | } else { |
141 | return -1; /* Invalid mode */ | 140 | return -1; /* Invalid mode */ |
142 | } | 141 | } |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 3b296e410f91..6210755cf6ab 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -76,6 +76,14 @@ config FB_DDC | |||
76 | select I2C | 76 | select I2C |
77 | default n | 77 | default n |
78 | 78 | ||
79 | config FB_BOOT_VESA_SUPPORT | ||
80 | bool | ||
81 | depends on FB | ||
82 | default n | ||
83 | ---help--- | ||
84 | If true, at least one selected framebuffer driver can take advantage | ||
85 | of VESA video modes set at an early boot stage via the vga= parameter. | ||
86 | |||
79 | config FB_CFB_FILLRECT | 87 | config FB_CFB_FILLRECT |
80 | tristate | 88 | tristate |
81 | depends on FB | 89 | depends on FB |
@@ -681,6 +689,7 @@ config FB_VESA | |||
681 | select FB_CFB_FILLRECT | 689 | select FB_CFB_FILLRECT |
682 | select FB_CFB_COPYAREA | 690 | select FB_CFB_COPYAREA |
683 | select FB_CFB_IMAGEBLIT | 691 | select FB_CFB_IMAGEBLIT |
692 | select FB_BOOT_VESA_SUPPORT | ||
684 | help | 693 | help |
685 | This is the frame buffer device driver for generic VESA 2.0 | 694 | This is the frame buffer device driver for generic VESA 2.0 |
686 | compliant graphic cards. The older VESA 1.2 cards are not supported. | 695 | compliant graphic cards. The older VESA 1.2 cards are not supported. |
@@ -1117,6 +1126,7 @@ config FB_INTEL | |||
1117 | select FB_CFB_FILLRECT | 1126 | select FB_CFB_FILLRECT |
1118 | select FB_CFB_COPYAREA | 1127 | select FB_CFB_COPYAREA |
1119 | select FB_CFB_IMAGEBLIT | 1128 | select FB_CFB_IMAGEBLIT |
1129 | select FB_BOOT_VESA_SUPPORT | ||
1120 | help | 1130 | help |
1121 | This driver supports the on-board graphics built in to the Intel | 1131 | This driver supports the on-board graphics built in to the Intel |
1122 | 830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/965G/965GM chipsets. | 1132 | 830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/965G/965GM chipsets. |
@@ -1469,6 +1479,7 @@ config FB_SIS | |||
1469 | select FB_CFB_FILLRECT | 1479 | select FB_CFB_FILLRECT |
1470 | select FB_CFB_COPYAREA | 1480 | select FB_CFB_COPYAREA |
1471 | select FB_CFB_IMAGEBLIT | 1481 | select FB_CFB_IMAGEBLIT |
1482 | select FB_BOOT_VESA_SUPPORT | ||
1472 | help | 1483 | help |
1473 | This is the frame buffer device driver for the SiS 300, 315, 330 | 1484 | This is the frame buffer device driver for the SiS 300, 315, 330 |
1474 | and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets. | 1485 | and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets. |