Commit 66bb7e1d authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/gpio: place upper limit on using old-school tvdac bios data

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 9da49599
...@@ -101,8 +101,8 @@ dcb_gpio_parse(struct nouveau_bios *bios, int idx, u8 func, u8 line, ...@@ -101,8 +101,8 @@ dcb_gpio_parse(struct nouveau_bios *bios, int idx, u8 func, u8 line,
} }
/* DCB 2.2, fixed TVDAC GPIO data */ /* DCB 2.2, fixed TVDAC GPIO data */
if ((entry = dcb_table(bios, &ver, &hdr, &cnt, &len)) && ver >= 0x22) { if ((entry = dcb_table(bios, &ver, &hdr, &cnt, &len))) {
if (func == DCB_GPIO_TVDAC0) { if (ver >= 0x22 && ver < 0x30 && func == DCB_GPIO_TVDAC0) {
u8 conf = nv_ro08(bios, entry - 5); u8 conf = nv_ro08(bios, entry - 5);
u8 addr = nv_ro08(bios, entry - 4); u8 addr = nv_ro08(bios, entry - 4);
if (conf & 0x01) { if (conf & 0x01) {
......
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