drm/nouveau/bios: fix regression on some nv4x board
authorBen Skeggs <bskeggs@redhat.com>
Fri, 13 Apr 2012 09:22:30 +0000 (19:22 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 30 Apr 2012 05:55:22 +0000 (15:55 +1000)
We started using the connector table on nv4x a while back, and this VBIOS
has bad connector indices which causes the wrong encoders to get paired
with connectors.

Add a quirk to fix this...

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

index 80963d0..0be4a81 100644 (file)
@@ -6156,10 +6156,14 @@ dcb_fake_connectors(struct nvbios *bios)
 
        /* heuristic: if we ever get a non-zero connector field, assume
         * that all the indices are valid and we don't need fake them.
+        *
+        * and, as usual, a blacklist of boards with bad bios data..
         */
-       for (i = 0; i < dcbt->entries; i++) {
-               if (dcbt->entry[i].connector)
-                       return;
+       if (!nv_match_device(bios->dev, 0x0392, 0x107d, 0x20a2)) {
+               for (i = 0; i < dcbt->entries; i++) {
+                       if (dcbt->entry[i].connector)
+                               return;
+               }
        }
 
        /* no useful connector info available, we need to make it up