diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bios.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 7b7b1e27ed0b..8fc2ba164ef2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -5809,7 +5809,7 @@ parse_dcb_gpio_table(struct nvbios *bios) | |||
5809 | entries = gpio[2]; | 5809 | entries = gpio[2]; |
5810 | recordlen = gpio[3]; | 5810 | recordlen = gpio[3]; |
5811 | } else | 5811 | } else |
5812 | if (dcb[0] >= 0x22) { | 5812 | if (dcb[0] >= 0x22 && dcb[-1] >= 0x13) { |
5813 | gpio = ROMPTR(bios, dcb[-15]); | 5813 | gpio = ROMPTR(bios, dcb[-15]); |
5814 | if (!gpio) | 5814 | if (!gpio) |
5815 | goto no_table; | 5815 | goto no_table; |
@@ -5817,6 +5817,19 @@ parse_dcb_gpio_table(struct nvbios *bios) | |||
5817 | headerlen = 3; | 5817 | headerlen = 3; |
5818 | entries = gpio[2]; | 5818 | entries = gpio[2]; |
5819 | recordlen = gpio[1]; | 5819 | recordlen = gpio[1]; |
5820 | } else | ||
5821 | if (dcb[0] >= 0x22) { | ||
5822 | /* No GPIO table present, parse the TVDAC GPIO data. */ | ||
5823 | uint8_t *tvdac_gpio = &dcb[-5]; | ||
5824 | |||
5825 | if (tvdac_gpio[0] & 1) { | ||
5826 | e = new_gpio_entry(bios); | ||
5827 | e->tag = DCB_GPIO_TVDAC0; | ||
5828 | e->line = tvdac_gpio[1] >> 4; | ||
5829 | e->invert = tvdac_gpio[0] & 2; | ||
5830 | } | ||
5831 | |||
5832 | goto no_table; | ||
5820 | } else { | 5833 | } else { |
5821 | NV_DEBUG(dev, "no/unknown gpio table on DCB 0x%02x\n", dcb[0]); | 5834 | NV_DEBUG(dev, "no/unknown gpio table on DCB 0x%02x\n", dcb[0]); |
5822 | goto no_table; | 5835 | goto no_table; |