drm/nouveau/gpio: fail if gpu external power is missing
authorMark Menzynski <mmenzyns@redhat.com>
Thu, 18 Jul 2019 08:07:39 +0000 (10:07 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 23 Aug 2019 02:55:33 +0000 (12:55 +1000)
commit72251fac062c0b4fe98670ec9e3db3f0702c50ae
tree3a6475b93a7d8806d0673867106189be2842be26
parente79ef1c0076ad82bab6915ada633a9d0efcb73fa
drm/nouveau/gpio: fail if gpu external power is missing

Currently, nouveau doesn't check if GPU is missing power. This
patch makes nouveau fail when this happens on latest GPUs.

It checks GPIO function 121 (External Power Emergency), which
should detect power problems on GPU initialization.

This can be disabled with nouveau.config=NvPowerChecks=1

Tested on TU104, GP106 and GF100.

v3:
*  Add config override for disabling power checks

Signed-off-by: Mark Menzynski <mmenzyns@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/gpio.h
drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c