aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c2
-rw-r--r--drivers/gpu/drm/ast/ast_drv.c2
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_drv.c2
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c2
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_drv.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c2
-rw-r--r--drivers/gpu/drm/qxl/qxl_drv.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c2
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_drv.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.c2
-rw-r--r--include/linux/console.h2
11 files changed, 2 insertions, 20 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index ce79a8b605a0..fba20bd59cfa 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -539,12 +539,10 @@ static struct pci_driver amdgpu_kms_pci_driver = {
539 539
540static int __init amdgpu_init(void) 540static int __init amdgpu_init(void)
541{ 541{
542#ifdef CONFIG_VGA_CONSOLE
543 if (vgacon_text_force()) { 542 if (vgacon_text_force()) {
544 DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n"); 543 DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
545 return -EINVAL; 544 return -EINVAL;
546 } 545 }
547#endif
548 DRM_INFO("amdgpu kernel modesetting enabled.\n"); 546 DRM_INFO("amdgpu kernel modesetting enabled.\n");
549 driver = &kms_driver; 547 driver = &kms_driver;
550 pdriver = &amdgpu_kms_pci_driver; 548 pdriver = &amdgpu_kms_pci_driver;
diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c
index 9a32d9dfdd26..fcd9c0714836 100644
--- a/drivers/gpu/drm/ast/ast_drv.c
+++ b/drivers/gpu/drm/ast/ast_drv.c
@@ -218,10 +218,8 @@ static struct drm_driver driver = {
218 218
219static int __init ast_init(void) 219static int __init ast_init(void)
220{ 220{
221#ifdef CONFIG_VGA_CONSOLE
222 if (vgacon_text_force() && ast_modeset == -1) 221 if (vgacon_text_force() && ast_modeset == -1)
223 return -EINVAL; 222 return -EINVAL;
224#endif
225 223
226 if (ast_modeset == 0) 224 if (ast_modeset == 0)
227 return -EINVAL; 225 return -EINVAL;
diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.c b/drivers/gpu/drm/cirrus/cirrus_drv.c
index b1619e29a564..b394e6d8f01e 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.c
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.c
@@ -162,10 +162,8 @@ static struct pci_driver cirrus_pci_driver = {
162 162
163static int __init cirrus_init(void) 163static int __init cirrus_init(void)
164{ 164{
165#ifdef CONFIG_VGA_CONSOLE
166 if (vgacon_text_force() && cirrus_modeset == -1) 165 if (vgacon_text_force() && cirrus_modeset == -1)
167 return -EINVAL; 166 return -EINVAL;
168#endif
169 167
170 if (cirrus_modeset == 0) 168 if (cirrus_modeset == 0)
171 return -EINVAL; 169 return -EINVAL;
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 44912ecebc1a..8a62690e6513 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1750,10 +1750,8 @@ static int __init i915_init(void)
1750 if (i915.modeset == 0) 1750 if (i915.modeset == 0)
1751 driver.driver_features &= ~DRIVER_MODESET; 1751 driver.driver_features &= ~DRIVER_MODESET;
1752 1752
1753#ifdef CONFIG_VGA_CONSOLE
1754 if (vgacon_text_force() && i915.modeset == -1) 1753 if (vgacon_text_force() && i915.modeset == -1)
1755 driver.driver_features &= ~DRIVER_MODESET; 1754 driver.driver_features &= ~DRIVER_MODESET;
1756#endif
1757 1755
1758 if (!(driver.driver_features & DRIVER_MODESET)) { 1756 if (!(driver.driver_features & DRIVER_MODESET)) {
1759 /* Silently fail loading to not upset userspace. */ 1757 /* Silently fail loading to not upset userspace. */
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
index b0af77454d52..ebb470ff7200 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.c
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
@@ -116,10 +116,8 @@ static struct pci_driver mgag200_pci_driver = {
116 116
117static int __init mgag200_init(void) 117static int __init mgag200_init(void)
118{ 118{
119#ifdef CONFIG_VGA_CONSOLE
120 if (vgacon_text_force() && mgag200_modeset == -1) 119 if (vgacon_text_force() && mgag200_modeset == -1)
121 return -EINVAL; 120 return -EINVAL;
122#endif
123 121
124 if (mgag200_modeset == 0) 122 if (mgag200_modeset == 0)
125 return -EINVAL; 123 return -EINVAL;
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index bb8498c9b13e..731c5c2a8933 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -1082,10 +1082,8 @@ nouveau_drm_init(void)
1082 nouveau_display_options(); 1082 nouveau_display_options();
1083 1083
1084 if (nouveau_modeset == -1) { 1084 if (nouveau_modeset == -1) {
1085#ifdef CONFIG_VGA_CONSOLE
1086 if (vgacon_text_force()) 1085 if (vgacon_text_force())
1087 nouveau_modeset = 0; 1086 nouveau_modeset = 0;
1088#endif
1089 } 1087 }
1090 1088
1091 if (!nouveau_modeset) 1089 if (!nouveau_modeset)
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index 7307b07fe06b..dc9df5fe50ba 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.c
+++ b/drivers/gpu/drm/qxl/qxl_drv.c
@@ -272,10 +272,8 @@ static struct drm_driver qxl_driver = {
272 272
273static int __init qxl_init(void) 273static int __init qxl_init(void)
274{ 274{
275#ifdef CONFIG_VGA_CONSOLE
276 if (vgacon_text_force() && qxl_modeset == -1) 275 if (vgacon_text_force() && qxl_modeset == -1)
277 return -EINVAL; 276 return -EINVAL;
278#endif
279 277
280 if (qxl_modeset == 0) 278 if (qxl_modeset == 0)
281 return -EINVAL; 279 return -EINVAL;
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index cad25557650f..ad136fc081c8 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -558,12 +558,10 @@ static struct pci_driver radeon_kms_pci_driver = {
558 558
559static int __init radeon_init(void) 559static int __init radeon_init(void)
560{ 560{
561#ifdef CONFIG_VGA_CONSOLE
562 if (vgacon_text_force() && radeon_modeset == -1) { 561 if (vgacon_text_force() && radeon_modeset == -1) {
563 DRM_INFO("VGACON disable radeon kernel modesetting.\n"); 562 DRM_INFO("VGACON disable radeon kernel modesetting.\n");
564 radeon_modeset = 0; 563 radeon_modeset = 0;
565 } 564 }
566#endif
567 /* set to modesetting by default if not nomodeset */ 565 /* set to modesetting by default if not nomodeset */
568 if (radeon_modeset == -1) 566 if (radeon_modeset == -1)
569 radeon_modeset = 1; 567 radeon_modeset = 1;
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c
index 7f898cfdc746..3cc7afa77a35 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.c
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
@@ -42,10 +42,8 @@ module_param_named(modeset, virtio_gpu_modeset, int, 0400);
42 42
43static int virtio_gpu_probe(struct virtio_device *vdev) 43static int virtio_gpu_probe(struct virtio_device *vdev)
44{ 44{
45#ifdef CONFIG_VGA_CONSOLE
46 if (vgacon_text_force() && virtio_gpu_modeset == -1) 45 if (vgacon_text_force() && virtio_gpu_modeset == -1)
47 return -EINVAL; 46 return -EINVAL;
48#endif
49 47
50 if (virtio_gpu_modeset == 0) 48 if (virtio_gpu_modeset == 0)
51 return -EINVAL; 49 return -EINVAL;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 0ee76e523a90..fa10395e2a18 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -1529,10 +1529,8 @@ static int __init vmwgfx_init(void)
1529{ 1529{
1530 int ret; 1530 int ret;
1531 1531
1532#ifdef CONFIG_VGA_CONSOLE
1533 if (vgacon_text_force()) 1532 if (vgacon_text_force())
1534 return -EINVAL; 1533 return -EINVAL;
1535#endif
1536 1534
1537 ret = drm_pci_init(&driver, &vmw_pci_driver); 1535 ret = drm_pci_init(&driver, &vmw_pci_driver);
1538 if (ret) 1536 if (ret)
diff --git a/include/linux/console.h b/include/linux/console.h
index ea731af2451e..e49cc1ef19be 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -191,6 +191,8 @@ void vcs_remove_sysfs(int index);
191 191
192#ifdef CONFIG_VGA_CONSOLE 192#ifdef CONFIG_VGA_CONSOLE
193extern bool vgacon_text_force(void); 193extern bool vgacon_text_force(void);
194#else
195static inline bool vgacon_text_force(void) { return false; }
194#endif 196#endif
195 197
196#endif /* _LINUX_CONSOLE_H */ 198#endif /* _LINUX_CONSOLE_H */