Commit fc162088 authored by Ben Skeggs's avatar Ben Skeggs

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

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 5495e39f
...@@ -278,7 +278,6 @@ nouveau_display_create(struct drm_device *dev) ...@@ -278,7 +278,6 @@ nouveau_display_create(struct drm_device *dev)
{ {
struct nouveau_drm *drm = nouveau_drm(dev); struct nouveau_drm *drm = nouveau_drm(dev);
struct nouveau_display *disp; struct nouveau_display *disp;
u32 pclass = dev->pdev->class >> 8;
int ret, gen; int ret, gen;
disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL); disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL);
...@@ -340,29 +339,25 @@ nouveau_display_create(struct drm_device *dev) ...@@ -340,29 +339,25 @@ nouveau_display_create(struct drm_device *dev)
drm_kms_helper_poll_init(dev); drm_kms_helper_poll_init(dev);
drm_kms_helper_poll_disable(dev); drm_kms_helper_poll_disable(dev);
if (nouveau_modeset == 1 || if (drm->vbios.dcb.entries) {
(nouveau_modeset < 0 && pclass == PCI_CLASS_DISPLAY_VGA)) { if (nv_device(drm->device)->card_type < NV_50)
if (drm->vbios.dcb.entries) { ret = nv04_display_create(dev);
if (nv_device(drm->device)->card_type < NV_50) else
ret = nv04_display_create(dev); ret = nv50_display_create(dev);
else } else {
ret = nv50_display_create(dev); ret = 0;
} else { }
ret = 0;
}
if (ret)
goto disp_create_err;
if (dev->mode_config.num_crtc) { if (ret)
ret = drm_vblank_init(dev, dev->mode_config.num_crtc); goto disp_create_err;
if (ret)
goto vblank_err;
}
nouveau_backlight_init(dev); if (dev->mode_config.num_crtc) {
ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
if (ret)
goto vblank_err;
} }
nouveau_backlight_init(dev);
return 0; return 0;
vblank_err: vblank_err:
......
...@@ -454,7 +454,8 @@ nouveau_fbcon_init(struct drm_device *dev) ...@@ -454,7 +454,8 @@ nouveau_fbcon_init(struct drm_device *dev)
int preferred_bpp; int preferred_bpp;
int ret; int ret;
if (!dev->mode_config.num_crtc) if (!dev->mode_config.num_crtc ||
(dev->pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
return 0; return 0;
fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL); fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL);
......
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