Skip to content

Commit

Permalink
drm/nouveau: headless mode by default if pci class != vga display
Browse files Browse the repository at this point in the history
This is to prevent nouveau from taking over the console on headless boards
such as Tesla.

Backport of upstream commit: e412e95

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ben Skeggs authored and Greg Kroah-Hartman committed Nov 5, 2012
1 parent 83dc215 commit 8c1118a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions drivers/gpu/drm/nouveau/nouveau_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,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)
Expand Down
4 changes: 3 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,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:
Expand Down Expand Up @@ -428,7 +429,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;
Expand Down

0 comments on commit 8c1118a

Please sign in to comment.