drm/nouveau/bios: parse external transmitter type if off-chip
authorBen Skeggs <bskeggs@redhat.com>
Tue, 12 Feb 2013 00:16:31 +0000 (10:16 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 20 Feb 2013 06:00:57 +0000 (16:00 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/include/subdev/bios/dcb.h
drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c

index b79025da581ef5b8ea50cadb563313c70a6cd781..9e54678a17289354c0027c171d1a7bb314d048ed 100644 (file)
@@ -25,6 +25,7 @@ struct dcb_output {
        uint8_t or;
        uint8_t link;
        bool duallink_possible;
+       uint8_t extdev;
        union {
                struct sor_conf {
                        int link;
index 0fd87df99dd650a1abb1df42ac99fe0cf5724d75..73a29da0415f36db732be3a682154d1b5fee18b5 100644 (file)
@@ -135,6 +135,9 @@ dcb_outp_parse(struct nouveau_bios *bios, u8 idx, u8 *ver, u8 *len,
                        case DCB_OUTPUT_DP:
                                outp->link = (conf & 0x00000030) >> 4;
                                outp->sorconf.link = outp->link; /*XXX*/
+                               outp->extdev = 0x00;
+                               if (outp->location != 0)
+                                       outp->extdev = (conf & 0x0000ff00) >> 8;
                                break;
                        default:
                                break;
@@ -147,7 +150,7 @@ dcb_outp_parse(struct nouveau_bios *bios, u8 idx, u8 *ver, u8 *len,
 static inline u16
 dcb_outp_hasht(struct dcb_output *outp)
 {
-       return outp->type;
+       return (outp->location << 4) | outp->type;
 }
 
 static inline u16