Commit 9a8dc834 authored by Ben Skeggs's avatar Ben Skeggs Committed by Ben Hutchings

drm/nouveau: headless mode by default if pci class != vga display

commit e412e95a upstream.

This is to prevent nouveau from taking over the console on headless boards
such as Tesla.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 9b945af8
......@@ -474,9 +474,7 @@ static int __init nouveau_init(void)
#ifdef CONFIG_VGA_CONSOLE
if (vgacon_text_force())
nouveau_modeset = 0;
else
#endif
nouveau_modeset = 1;
}
if (!nouveau_modeset)
......
......@@ -46,6 +46,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_engine *engine = &dev_priv->engine;
u32 pclass = dev->pdev->class >> 8;
switch (dev_priv->chipset & 0xf0) {
case 0x00:
......@@ -481,7 +482,8 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
}
/* headless mode */
if (nouveau_modeset == 2) {
if (nouveau_modeset == 2 ||
(nouveau_modeset < 0 && pclass != PCI_CLASS_DISPLAY_VGA)) {
engine->display.early_init = nouveau_stub_init;
engine->display.late_takedown = nouveau_stub_takedown;
engine->display.create = nouveau_stub_init;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment