Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/nouveau/kms: enable for non-vga pci classes

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

+19 -23
+17 -22
drivers/gpu/drm/nouveau/nouveau_display.c
··· 278 278 { 279 279 struct nouveau_drm *drm = nouveau_drm(dev); 280 280 struct nouveau_display *disp; 281 - u32 pclass = dev->pdev->class >> 8; 282 281 int ret, gen; 283 282 284 283 disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL); ··· 339 340 drm_kms_helper_poll_init(dev); 340 341 drm_kms_helper_poll_disable(dev); 341 342 342 - if (nouveau_modeset == 1 || 343 - (nouveau_modeset < 0 && pclass == PCI_CLASS_DISPLAY_VGA)) { 344 - if (drm->vbios.dcb.entries) { 345 - if (nv_device(drm->device)->card_type < NV_50) 346 - ret = nv04_display_create(dev); 347 - else 348 - ret = nv50_display_create(dev); 349 - } else { 350 - ret = 0; 351 - } 352 - 353 - if (ret) 354 - goto disp_create_err; 355 - 356 - if (dev->mode_config.num_crtc) { 357 - ret = drm_vblank_init(dev, dev->mode_config.num_crtc); 358 - if (ret) 359 - goto vblank_err; 360 - } 361 - 362 - nouveau_backlight_init(dev); 343 + if (drm->vbios.dcb.entries) { 344 + if (nv_device(drm->device)->card_type < NV_50) 345 + ret = nv04_display_create(dev); 346 + else 347 + ret = nv50_display_create(dev); 348 + } else { 349 + ret = 0; 363 350 } 364 351 352 + if (ret) 353 + goto disp_create_err; 354 + 355 + if (dev->mode_config.num_crtc) { 356 + ret = drm_vblank_init(dev, dev->mode_config.num_crtc); 357 + if (ret) 358 + goto vblank_err; 359 + } 360 + 361 + nouveau_backlight_init(dev); 365 362 return 0; 366 363 367 364 vblank_err:
+2 -1
drivers/gpu/drm/nouveau/nouveau_fbcon.c
··· 454 454 int preferred_bpp; 455 455 int ret; 456 456 457 - if (!dev->mode_config.num_crtc) 457 + if (!dev->mode_config.num_crtc || 458 + (dev->pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) 458 459 return 0; 459 460 460 461 fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL);