summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-11-21 15:04:51 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-11-29 09:56:36 +1000
commit66bb7e1d670f57ffd17ffbfddf049167f97d2d74 (patch)
treeb5fc587c1a3c2c237a366910d1de68e104206d93
parent9da49599a70eceac405287f34485ed57fe035393 (diff)
downloadlinux-stable-66bb7e1d670f57ffd17ffbfddf049167f97d2d74.tar.gz
linux-stable-66bb7e1d670f57ffd17ffbfddf049167f97d2d74.tar.bz2
linux-stable-66bb7e1d670f57ffd17ffbfddf049167f97d2d74.zip
drm/nouveau/gpio: place upper limit on using old-school tvdac bios data
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c b/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c
index 4c9f1e508165..c90d4aa3ae4f 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c
@@ -101,8 +101,8 @@ dcb_gpio_parse(struct nouveau_bios *bios, int idx, u8 func, u8 line,
}
/* DCB 2.2, fixed TVDAC GPIO data */
- if ((entry = dcb_table(bios, &ver, &hdr, &cnt, &len)) && ver >= 0x22) {
- if (func == DCB_GPIO_TVDAC0) {
+ if ((entry = dcb_table(bios, &ver, &hdr, &cnt, &len))) {
+ if (ver >= 0x22 && ver < 0x30 && func == DCB_GPIO_TVDAC0) {
u8 conf = nv_ro08(bios, entry - 5);
u8 addr = nv_ro08(bios, entry - 4);
if (conf & 0x01) {