diff options
| -rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c b/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c index 718267d84c7b..1ae23b328bbd 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c | |||
| @@ -100,13 +100,17 @@ dcb_gpio_parse(struct nouveau_bios *bios, int idx, u8 func, u8 line, | |||
| 100 | /* DCB 2.2, fixed TVDAC GPIO data */ | 100 | /* DCB 2.2, fixed TVDAC GPIO data */ |
| 101 | if ((entry = dcb_table(bios, &ver, &hdr, &cnt, &len)) && ver >= 0x22) { | 101 | if ((entry = dcb_table(bios, &ver, &hdr, &cnt, &len)) && ver >= 0x22) { |
| 102 | if (func == DCB_GPIO_TVDAC0) { | 102 | if (func == DCB_GPIO_TVDAC0) { |
| 103 | *gpio = (struct dcb_gpio_func) { | 103 | u8 conf = nv_ro08(bios, entry - 5); |
| 104 | .func = DCB_GPIO_TVDAC0, | 104 | u8 addr = nv_ro08(bios, entry - 4); |
| 105 | .line = nv_ro08(bios, entry - 4) >> 4, | 105 | if (conf & 0x01) { |
| 106 | .log[0] = !!(nv_ro08(bios, entry - 5) & 2), | 106 | *gpio = (struct dcb_gpio_func) { |
| 107 | .log[1] = !(nv_ro08(bios, entry - 5) & 2), | 107 | .func = DCB_GPIO_TVDAC0, |
| 108 | }; | 108 | .line = addr >> 4, |
| 109 | return 0; | 109 | .log[0] = !!(conf & 0x02), |
| 110 | .log[1] = !(conf & 0x02), | ||
| 111 | }; | ||
| 112 | return 0; | ||
| 113 | } | ||
| 110 | } | 114 | } |
| 111 | } | 115 | } |
| 112 | 116 | ||
