diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2013-06-24 22:26:42 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-06-30 23:50:46 -0400 |
commit | d2898713fbd6431d7c09a52eb5e814805fcf8194 (patch) | |
tree | 6a35d347e7fa3a476eeab527c596d562a6ee6751 /drivers/gpu/drm | |
parent | 79442c3af0525e81d4598e272abe5db60c489c62 (diff) |
drm/nouveau/kms: don't fail if there's no dcb table entries
Fixes module not loading on Tesla K20.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bios.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_display.c | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 6aa2137e093a..e09817df7934 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -1878,9 +1878,6 @@ parse_dcb_table(struct drm_device *dev, struct nvbios *bios) | |||
1878 | if (dcb->version < 0x21) | 1878 | if (dcb->version < 0x21) |
1879 | merge_like_dcb_entries(dev, dcb); | 1879 | merge_like_dcb_entries(dev, dcb); |
1880 | 1880 | ||
1881 | if (!dcb->entries) | ||
1882 | return -ENXIO; | ||
1883 | |||
1884 | /* dump connector table entries to log, if any exist */ | 1881 | /* dump connector table entries to log, if any exist */ |
1885 | idx = -1; | 1882 | idx = -1; |
1886 | while ((conn = olddcb_conn(dev, ++idx))) { | 1883 | while ((conn = olddcb_conn(dev, ++idx))) { |
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index f17dc2ab03ec..0b6c296e6ef3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c | |||
@@ -332,10 +332,15 @@ nouveau_display_create(struct drm_device *dev) | |||
332 | 332 | ||
333 | if (nouveau_modeset == 1 || | 333 | if (nouveau_modeset == 1 || |
334 | (nouveau_modeset < 0 && pclass == PCI_CLASS_DISPLAY_VGA)) { | 334 | (nouveau_modeset < 0 && pclass == PCI_CLASS_DISPLAY_VGA)) { |
335 | if (nv_device(drm->device)->card_type < NV_50) | 335 | if (drm->vbios.dcb.entries) { |
336 | ret = nv04_display_create(dev); | 336 | if (nv_device(drm->device)->card_type < NV_50) |
337 | else | 337 | ret = nv04_display_create(dev); |
338 | ret = nv50_display_create(dev); | 338 | else |
339 | ret = nv50_display_create(dev); | ||
340 | } else { | ||
341 | ret = 0; | ||
342 | } | ||
343 | |||
339 | if (ret) | 344 | if (ret) |
340 | goto disp_create_err; | 345 | goto disp_create_err; |
341 | 346 | ||