drm/nouveau/gpio/tu102-: prepare for GSP-RM

- disable GPIO completely when GSP-RM detected

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230918202149.4343-13-skeggsb@gmail.com
This commit is contained in:
Ben Skeggs 2023-09-19 06:21:17 +10:00 committed by Dave Airlie
parent c41aebc9ac
commit 2cfad4b048
2 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,8 @@
*/
#include "priv.h"
#include <subdev/gsp.h>
static void
ga102_gpio_reset(struct nvkm_gpio *gpio, u8 match)
{
@ -115,5 +117,8 @@ int
ga102_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_gpio **pgpio)
{
if (nvkm_gsp_rm(device->gsp))
return -ENODEV;
return nvkm_gpio_new_(&ga102_gpio, device, type, inst, pgpio);
}

View File

@ -23,6 +23,8 @@
*/
#include "priv.h"
#include <subdev/gsp.h>
static void
gk104_gpio_intr_stat(struct nvkm_gpio *gpio, u32 *hi, u32 *lo)
{
@ -71,5 +73,8 @@ int
gk104_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_gpio **pgpio)
{
if (nvkm_gsp_rm(device->gsp))
return -ENODEV;
return nvkm_gpio_new_(&gk104_gpio, device, type, inst, pgpio);
}