summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2023-09-18 23:21:12 +0300
committerDave Airlie <airlied@redhat.com>2023-10-31 08:08:10 +0300
commit6a0fd03a23fd833c98277701bedb6e7f25df22bd (patch)
treee255842c17cf2a5eddb57f6f9dcc6482ffcac5d8
parent45655ff0848040f09e4a4f812fe4aa79e1363624 (diff)
downloadlinux-6a0fd03a23fd833c98277701bedb6e7f25df22bd.tar.xz
drm/nouveau/bus/tu102-: prepare for GSP-RM
- disable BUS 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-8-skeggsb@gmail.com
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c
index 80b5aaceeaad..8e1e0b057a0b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c
@@ -24,6 +24,8 @@
*/
#include "priv.h"
+#include <subdev/gsp.h>
+
static void
gf100_bus_intr(struct nvkm_bus *bus)
{
@@ -72,5 +74,8 @@ int
gf100_bus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_bus **pbus)
{
+ if (nvkm_gsp_rm(device->gsp))
+ return -ENODEV;
+
return nvkm_bus_new_(&gf100_bus, device, type, inst, pbus);
}