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
This commit is contained in:
Ben Skeggs 2023-09-19 06:21:14 +10:00 committed by Dave Airlie
parent 15740541e8
commit a613e7f3fe

View File

@ -22,6 +22,7 @@
#include "priv.h"
#include <core/memory.h>
#include <subdev/gsp.h>
#include <subdev/mc.h>
#include <subdev/mmu.h>
#include <subdev/vfn.h>
@ -175,7 +176,12 @@ int
tu102_fault_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_fault **pfault)
{
int ret = nvkm_fault_new_(&tu102_fault, device, type, inst, pfault);
int ret;
if (nvkm_gsp_rm(device->gsp))
return -ENODEV;
ret = nvkm_fault_new_(&tu102_fault, device, type, inst, pfault);
if (ret)
return ret;