drm/nvd0/disp: enable support for older display classes
authorBen Skeggs <bskeggs@redhat.com>
Fri, 16 Nov 2012 01:44:14 +0000 (11:44 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 28 Nov 2012 23:57:56 +0000 (09:57 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvd0_display.c

index 9d001c994d11f66a164255af01b477ae8341c2c5..d0920acea741708ddddf688bfee307e91f97786e 100644 (file)
@@ -1896,6 +1896,11 @@ nvd0_display_create(struct drm_device *dev)
        static const u16 oclass[] = {
                NVE0_DISP_CLASS,
                NVD0_DISP_CLASS,
+               NVA3_DISP_CLASS,
+               NV94_DISP_CLASS,
+               NVA0_DISP_CLASS,
+               NV84_DISP_CLASS,
+               NV50_DISP_CLASS,
        };
        struct nouveau_device *device = nouveau_dev(dev);
        struct nouveau_drm *drm = nouveau_drm(dev);
@@ -1949,7 +1954,11 @@ nvd0_display_create(struct drm_device *dev)
                goto out;
 
        /* create crtc objects to represent the hw heads */
-       crtcs = nv_rd32(device, 0x022448);
+       if (nv_mclass(disp->core) >= NVD0_DISP_CLASS)
+               crtcs = nv_rd32(device, 0x022448);
+       else
+               crtcs = 2;
+
        for (i = 0; i < crtcs; i++) {
                ret = nvd0_crtc_create(dev, disp->core, i);
                if (ret)