drm/nv50: DCB table quirks for another busted XFX board
authorBen Skeggs <bskeggs@redhat.com>
Mon, 30 May 2011 02:53:37 +0000 (12:53 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 23 Jun 2011 05:58:04 +0000 (15:58 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bios.c

index 729d5fd..e93e314 100644 (file)
@@ -6377,6 +6377,37 @@ apply_dcb_encoder_quirks(struct drm_device *dev, int idx, u32 *conn, u32 *conf)
                }
        }
 
+       /* Some other twisted XFX board (rhbz#694914)
+        *
+        * The DVI/VGA encoder combo that's supposed to represent the
+        * DVI-I connector actually point at two different ones, and
+        * the HDMI connector ends up paired with the VGA instead.
+        *
+        * Connector table is missing anything for VGA at all, pointing it
+        * an invalid conntab entry 2 so we figure it out ourself.
+        */
+       if (nv_match_device(dev, 0x0615, 0x1682, 0x2605)) {
+               if (idx == 0) {
+                       *conn = 0x02002300; /* VGA, connector 2 */
+                       *conf = 0x00000028;
+               } else
+               if (idx == 1) {
+                       *conn = 0x01010312; /* DVI, connector 0 */
+                       *conf = 0x00020030;
+               } else
+               if (idx == 2) {
+                       *conn = 0x04020310; /* VGA, connector 0 */
+                       *conf = 0x00000028;
+               } else
+               if (idx == 3) {
+                       *conn = 0x02021322; /* HDMI, connector 1 */
+                       *conf = 0x00020010;
+               } else {
+                       *conn = 0x0000000e; /* EOL */
+                       *conf = 0x00000000;
+               }
+       }
+
        return true;
 }