drm/nouveau/kms: don't fail if there's no dcb table entries
authorBen Skeggs <bskeggs@redhat.com>
Tue, 25 Jun 2013 02:26:42 +0000 (12:26 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 1 Jul 2013 03:50:46 +0000 (13:50 +1000)
Fixes module not loading on Tesla K20.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_display.c

index 6aa2137e093ab7770ae4ce31a135156a4c5f5d1f..e09817df7934ce861d92d2619fdc959dc48ec77f 100644 (file)
@@ -1878,9 +1878,6 @@ parse_dcb_table(struct drm_device *dev, struct nvbios *bios)
        if (dcb->version < 0x21)
                merge_like_dcb_entries(dev, dcb);
 
-       if (!dcb->entries)
-               return -ENXIO;
-
        /* dump connector table entries to log, if any exist */
        idx = -1;
        while ((conn = olddcb_conn(dev, ++idx))) {
index f17dc2ab03ecd25a762e52840f02b8f4652345d4..0b6c296e6ef377f8d9c0c54ab954f94e3c1be83a 100644 (file)
@@ -332,10 +332,15 @@ nouveau_display_create(struct drm_device *dev)
 
        if (nouveau_modeset == 1 ||
            (nouveau_modeset < 0 && pclass == PCI_CLASS_DISPLAY_VGA)) {
-               if (nv_device(drm->device)->card_type < NV_50)
-                       ret = nv04_display_create(dev);
-               else
-                       ret = nv50_display_create(dev);
+               if (drm->vbios.dcb.entries) {
+                       if (nv_device(drm->device)->card_type < NV_50)
+                               ret = nv04_display_create(dev);
+                       else
+                               ret = nv50_display_create(dev);
+               } else {
+                       ret = 0;
+               }
+
                if (ret)
                        goto disp_create_err;