[4/4] gpio: added power check for another GPIO

Submitted by Mark Menzynski on July 11, 2019, 2:11 p.m.

Details

Message ID 20190711141153.7723-5-mmenzyns@redhat.com
State New
Headers show
Series "Refuse to load if the power cable are not connected" ( rev: 1 ) in Nouveau

Not browsing as part of any series.

Commit Message

Mark Menzynski July 11, 2019, 2:11 p.m.
this one is mainly used on Tesla and somtimes on Fermi GPUs

untested, wrote according to documentation

Signed-off-by: Mark Menzynski <mmenzyns@redhat.com>
---
 drm/nouveau/include/nvkm/subdev/bios/gpio.h | 1 +
 drm/nouveau/nvkm/subdev/gpio/base.c         | 1 +
 2 files changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drm/nouveau/include/nvkm/subdev/bios/gpio.h b/drm/nouveau/include/nvkm/subdev/bios/gpio.h
index fc2b5fb0..784c5f22 100644
--- a/drm/nouveau/include/nvkm/subdev/bios/gpio.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/gpio.h
@@ -8,6 +8,7 @@  enum dcb_gpio_func_name {
 	DCB_GPIO_THERM_EXT_POWER_EVENT = 0x10,
 	DCB_GPIO_TVDAC1 = 0x2d,
 	DCB_GPIO_FAN_SENSE = 0x3d,
+	DCB_GPIO_POWER_ALERT = 0x4c,
 	DCB_GPIO_EXT_POWER_LOW = 0x79,
 	DCB_GPIO_LOGO_LED_PWM = 0x84,
 	DCB_GPIO_UNUSED = 0xff,
diff --git a/drm/nouveau/nvkm/subdev/gpio/base.c b/drm/nouveau/nvkm/subdev/gpio/base.c
index 0c886543..755f016f 100644
--- a/drm/nouveau/nvkm/subdev/gpio/base.c
+++ b/drm/nouveau/nvkm/subdev/gpio/base.c
@@ -184,6 +184,7 @@  static const struct dmi_system_id gpio_reset_ids[] = {
 
 static enum dcb_gpio_func_name power_checks[] = {
 	DCB_GPIO_THERM_EXT_POWER_EVENT,
+	DCB_GPIO_POWER_ALERT,
 	DCB_GPIO_EXT_POWER_LOW,
 };