linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/bochs: Implement nomodeset
@ 2017-01-18 18:10 Max Staudt
  2017-01-19  7:54 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Max Staudt @ 2017-01-18 18:10 UTC (permalink / raw)
  To: kraxel; +Cc: mstaudt, David Airlie, Daniel Vetter, dri-devel, linux-kernel

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.

Signed-off-by: Max Staudt <mstaudt@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/gpu/drm/bochs/bochs_drv.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c
index 15a293e..443374b 100644
--- a/drivers/gpu/drm/bochs/bochs_drv.c
+++ b/drivers/gpu/drm/bochs/bochs_drv.c
@@ -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);
 }
 
-- 
2.6.6

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/bochs: Implement nomodeset
  2017-01-18 18:10 [PATCH] drm/bochs: Implement nomodeset Max Staudt
@ 2017-01-19  7:54 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2017-01-19  7:54 UTC (permalink / raw)
  To: Max Staudt; +Cc: David Airlie, Daniel Vetter, dri-devel, linux-kernel

On Mi, 2017-01-18 at 19:10 +0100, Max Staudt wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-19  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 18:10 [PATCH] drm/bochs: Implement nomodeset Max Staudt
2017-01-19  7:54 ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).