Commit f60707a6 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/bios/dp: support DP Info Table 2.0

Reported-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 34112bf4
...@@ -36,6 +36,7 @@ nvbios_dp_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) ...@@ -36,6 +36,7 @@ nvbios_dp_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
if (data) { if (data) {
*ver = nvbios_rd08(bios, data + 0x00); *ver = nvbios_rd08(bios, data + 0x00);
switch (*ver) { switch (*ver) {
case 0x20:
case 0x21: case 0x21:
case 0x30: case 0x30:
case 0x40: case 0x40:
...@@ -63,6 +64,7 @@ nvbios_dpout_entry(struct nvkm_bios *bios, u8 idx, ...@@ -63,6 +64,7 @@ nvbios_dpout_entry(struct nvkm_bios *bios, u8 idx,
if (data && idx < *cnt) { if (data && idx < *cnt) {
u16 outp = nvbios_rd16(bios, data + *hdr + idx * *len); u16 outp = nvbios_rd16(bios, data + *hdr + idx * *len);
switch (*ver * !!outp) { switch (*ver * !!outp) {
case 0x20:
case 0x21: case 0x21:
case 0x30: case 0x30:
*hdr = nvbios_rd08(bios, data + 0x04); *hdr = nvbios_rd08(bios, data + 0x04);
...@@ -96,12 +98,16 @@ nvbios_dpout_parse(struct nvkm_bios *bios, u8 idx, ...@@ -96,12 +98,16 @@ nvbios_dpout_parse(struct nvkm_bios *bios, u8 idx,
info->type = nvbios_rd16(bios, data + 0x00); info->type = nvbios_rd16(bios, data + 0x00);
info->mask = nvbios_rd16(bios, data + 0x02); info->mask = nvbios_rd16(bios, data + 0x02);
switch (*ver) { switch (*ver) {
case 0x20:
info->mask |= 0x00c0; /* match any link */
/* fall-through */
case 0x21: case 0x21:
case 0x30: case 0x30:
info->flags = nvbios_rd08(bios, data + 0x05); info->flags = nvbios_rd08(bios, data + 0x05);
info->script[0] = nvbios_rd16(bios, data + 0x06); info->script[0] = nvbios_rd16(bios, data + 0x06);
info->script[1] = nvbios_rd16(bios, data + 0x08); info->script[1] = nvbios_rd16(bios, data + 0x08);
info->lnkcmp = nvbios_rd16(bios, data + 0x0a); if (*len >= 0x0c)
info->lnkcmp = nvbios_rd16(bios, data + 0x0a);
if (*len >= 0x0f) { if (*len >= 0x0f) {
info->script[2] = nvbios_rd16(bios, data + 0x0c); info->script[2] = nvbios_rd16(bios, data + 0x0c);
info->script[3] = nvbios_rd16(bios, data + 0x0e); info->script[3] = nvbios_rd16(bios, data + 0x0e);
...@@ -170,6 +176,7 @@ nvbios_dpcfg_parse(struct nvkm_bios *bios, u16 outp, u8 idx, ...@@ -170,6 +176,7 @@ nvbios_dpcfg_parse(struct nvkm_bios *bios, u16 outp, u8 idx,
memset(info, 0x00, sizeof(*info)); memset(info, 0x00, sizeof(*info));
if (data) { if (data) {
switch (*ver) { switch (*ver) {
case 0x20:
case 0x21: case 0x21:
info->dc = nvbios_rd08(bios, data + 0x02); info->dc = nvbios_rd08(bios, data + 0x02);
info->pe = nvbios_rd08(bios, data + 0x03); info->pe = nvbios_rd08(bios, data + 0x03);
......
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