Skip to content

Commit a613e7f

Browse files
Ben Skeggsairlied
authored andcommitted
drm/nouveau/fault/tu102-: prepare for GSP-RM
- disable FAULT completely when GSP-RM detected - SVM support will be disabled when running on RM because of this 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-10-skeggsb@gmail.com
1 parent 1574054 commit a613e7f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • drivers/gpu/drm/nouveau/nvkm/subdev/fault

drivers/gpu/drm/nouveau/nvkm/subdev/fault/tu102.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "priv.h"
2323

2424
#include <core/memory.h>
25+
#include <subdev/gsp.h>
2526
#include <subdev/mc.h>
2627
#include <subdev/mmu.h>
2728
#include <subdev/vfn.h>
@@ -175,7 +176,12 @@ int
175176
tu102_fault_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
176177
struct nvkm_fault **pfault)
177178
{
178-
int ret = nvkm_fault_new_(&tu102_fault, device, type, inst, pfault);
179+
int ret;
180+
181+
if (nvkm_gsp_rm(device->gsp))
182+
return -ENODEV;
183+
184+
ret = nvkm_fault_new_(&tu102_fault, device, type, inst, pfault);
179185
if (ret)
180186
return ret;
181187

0 commit comments

Comments
 (0)