Commit 2cfad4b0 authored by Ben Skeggs's avatar Ben Skeggs Committed by Dave Airlie

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

- disable GPIO completely when GSP-RM detected
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230918202149.4343-13-skeggsb@gmail.com
parent c41aebc9
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
*/ */
#include "priv.h" #include "priv.h"
#include <subdev/gsp.h>
static void static void
ga102_gpio_reset(struct nvkm_gpio *gpio, u8 match) ga102_gpio_reset(struct nvkm_gpio *gpio, u8 match)
{ {
...@@ -115,5 +117,8 @@ int ...@@ -115,5 +117,8 @@ int
ga102_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, ga102_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_gpio **pgpio) struct nvkm_gpio **pgpio)
{ {
if (nvkm_gsp_rm(device->gsp))
return -ENODEV;
return nvkm_gpio_new_(&ga102_gpio, device, type, inst, pgpio); return nvkm_gpio_new_(&ga102_gpio, device, type, inst, pgpio);
} }
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
*/ */
#include "priv.h" #include "priv.h"
#include <subdev/gsp.h>
static void static void
gk104_gpio_intr_stat(struct nvkm_gpio *gpio, u32 *hi, u32 *lo) gk104_gpio_intr_stat(struct nvkm_gpio *gpio, u32 *hi, u32 *lo)
{ {
...@@ -71,5 +73,8 @@ int ...@@ -71,5 +73,8 @@ int
gk104_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, gk104_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_gpio **pgpio) struct nvkm_gpio **pgpio)
{ {
if (nvkm_gsp_rm(device->gsp))
return -ENODEV;
return nvkm_gpio_new_(&gk104_gpio, device, type, inst, pgpio); return nvkm_gpio_new_(&gk104_gpio, device, type, inst, pgpio);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment