diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-21 13:19:13 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:37:26 +1000 |
commit | 4bea8a6e7749f7745d7f1c9de4907e7fa6ec8975 (patch) | |
tree | e6c26edf4f3116d6e64db7512f1e5bbc5a384f70 | |
parent | 0a263e8e121d597e6a13b7fa20630e0f25967648 (diff) |
bios/dp: use alternate set of drvctl values where necessary
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drm/nouveau/nvkm/subdev/bios/dp.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drm/nouveau/nvkm/subdev/bios/dp.c b/drm/nouveau/nvkm/subdev/bios/dp.c index 95970faa..20975d38 100644 --- a/drm/nouveau/nvkm/subdev/bios/dp.c +++ b/drm/nouveau/nvkm/subdev/bios/dp.c @@ -148,7 +148,8 @@ nvbios_dpcfg_entry(struct nvkm_bios *bios, u16 outp, u8 idx, outp = nvbios_dp_table(bios, ver, hdr, cnt, len); *hdr = *hdr + (*len * * cnt); *len = nv_ro08(bios, outp + 0x06); - *cnt = nv_ro08(bios, outp + 0x07); + *cnt = nv_ro08(bios, outp + 0x07) * + nv_ro08(bios, outp + 0x05); } if (idx < *cnt) @@ -196,12 +197,10 @@ nvbios_dpcfg_match(struct nvkm_bios *bios, u16 outp, u8 pc, u8 vs, u8 pe, u16 data; if (*ver >= 0x30) { - /*XXX: there's a second set of these on at least 4.1, that - * i've witnessed nvidia using instead of the first - * on gm204. figure out what/why - */ const u8 vsoff[] = { 0, 4, 7, 9 }; idx = (pc * 10) + vsoff[vs] + pe; + if (*ver >= 0x40 && *hdr >= 0x12) + idx += nv_ro08(bios, outp + 0x11) * 40; } else { while ((data = nvbios_dpcfg_entry(bios, outp, ++idx, ver, hdr, cnt, len))) { |