Commit 7c11c99b authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/bios/dcb: accept "maxwell" lane count values for dcb 4.0

We previously assumed that the values "2" and "4" were new in DCB 4.1,
however, there's at least one GM107 DCB 4.0 board (Quadro K620) that
uses the newer values.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 895fb8e6
...@@ -1481,19 +1481,18 @@ parse_dcb20_entry(struct drm_device *dev, struct dcb_table *dcb, ...@@ -1481,19 +1481,18 @@ parse_dcb20_entry(struct drm_device *dev, struct dcb_table *dcb,
entry->dpconf.link_bw = 540000; entry->dpconf.link_bw = 540000;
break; break;
} }
entry->dpconf.link_nr = (conf & 0x0f000000) >> 24; switch ((conf & 0x0f000000) >> 24) {
if (dcb->version < 0x41) { case 0xf:
switch (entry->dpconf.link_nr) { case 0x4:
case 0xf: entry->dpconf.link_nr = 4;
entry->dpconf.link_nr = 4; break;
break; case 0x3:
case 0x3: case 0x2:
entry->dpconf.link_nr = 2; entry->dpconf.link_nr = 2;
break; break;
default: default:
entry->dpconf.link_nr = 1; entry->dpconf.link_nr = 1;
break; break;
}
} }
link = entry->dpconf.sor.link; link = entry->dpconf.sor.link;
entry->i2c_index += NV_I2C_AUX(0); entry->i2c_index += NV_I2C_AUX(0);
......
...@@ -156,20 +156,19 @@ dcb_outp_parse(struct nvkm_bios *bios, u8 idx, u8 *ver, u8 *len, ...@@ -156,20 +156,19 @@ dcb_outp_parse(struct nvkm_bios *bios, u8 idx, u8 *ver, u8 *len,
break; break;
} }
outp->dpconf.link_nr = (conf & 0x0f000000) >> 24; switch ((conf & 0x0f000000) >> 24) {
if (*ver < 0x41) { case 0xf:
switch (outp->dpconf.link_nr) { case 0x4:
case 0x0f: outp->dpconf.link_nr = 4;
outp->dpconf.link_nr = 4; break;
break; case 0x3:
case 0x03: case 0x2:
outp->dpconf.link_nr = 2; outp->dpconf.link_nr = 2;
break; break;
case 0x01: case 0x1:
default: default:
outp->dpconf.link_nr = 1; outp->dpconf.link_nr = 1;
break; break;
}
} }
/* fall-through... */ /* fall-through... */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment