Skip to contentSkip to conversation

drm/bochs: Implement nomodeset

PATCH In review Max Staudt 2 participants 2 messages Jan 18, 2017 – Jan 19, 2017

Subsystems (2)
lore
Share & tools
lore

Max Staudt

author
#0 lore raw

PATCH 1/1 drm/bochs: Implement nomodeset

Up until now, the bochsdrm driver didn't handle the nomodeset option at boot, and didn't provide a "modeset" module option either.

This patch implements both.

The new parameter can be used by specifying bochs-drm.modeset=0 at boot time.

---
 drivers/gpu/drm/bochs/bochs_drv.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/gpu/drm/bochs/bochs_drv.c +10 -0
index 15a293e..443374b 100644
@@ -12,6 +12,10 @@
 
 #include "bochs.h"
 
+static int bochs_modeset = -1;
+module_param_named(modeset, bochs_modeset, int, 0444);
+MODULE_PARM_DESC(modeset, "enable/disable kernel modesetting");
+
 static bool enable_fbdev = true;
 module_param_named(fbdev, enable_fbdev, bool, 0444);
 MODULE_PARM_DESC(fbdev, "register fbdev device");
@@ -215,6 +219,12 @@ static struct pci_driver bochs_pci_driver = {
 
 static int __init bochs_init(void)
 {
+	if (vgacon_text_force() && bochs_modeset == -1)
+		return -EINVAL;
+
+	if (bochs_modeset == 0)
+		return -EINVAL;
+
 	return drm_pci_init(&bochs_driver, &bochs_pci_driver);
 }
 
Signature · 6 lines
2.6.6

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 7 lines · Max Staudt

Up until now, the bochsdrm driver didn't handle the nomodeset option at boot, and didn't provide a "modeset" module option either.

This patch implements both.

The new parameter can be used by specifying bochs-drm.modeset=0 at boot time.

Added to drm-qemu queue.

thanks,
Gerd

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel