Skip to content

Commit e412e95

Browse files
author
Ben Skeggs
committed
drm/nouveau: headless mode by default if pci class != vga display
This is to prevent nouveau from taking over the console on headless boards such as Tesla. Signed-off-by: Ben Skeggs <[email protected]>
1 parent 9430738 commit e412e95

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/gpu/drm/nouveau/nouveau_display.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ nouveau_display_create(struct drm_device *dev)
290290
struct nouveau_drm *drm = nouveau_drm(dev);
291291
struct nouveau_disp *pdisp = nouveau_disp(drm->device);
292292
struct nouveau_display *disp;
293+
u32 pclass = dev->pdev->class >> 8;
293294
int ret, gen;
294295

295296
disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL);
@@ -360,7 +361,8 @@ nouveau_display_create(struct drm_device *dev)
360361
drm_kms_helper_poll_init(dev);
361362
drm_kms_helper_poll_disable(dev);
362363

363-
if (nouveau_modeset == 1) {
364+
if (nouveau_modeset == 1 ||
365+
(nouveau_modeset < 0 && pclass == PCI_CLASS_DISPLAY_VGA)) {
364366
if (nv_device(drm->device)->card_type < NV_50)
365367
ret = nv04_display_create(dev);
366368
else

drivers/gpu/drm/nouveau/nouveau_drm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,9 +670,7 @@ nouveau_drm_init(void)
670670
#ifdef CONFIG_VGA_CONSOLE
671671
if (vgacon_text_force())
672672
nouveau_modeset = 0;
673-
else
674673
#endif
675-
nouveau_modeset = 1;
676674
}
677675

678676
if (!nouveau_modeset)

0 commit comments

Comments
 (0)