Commit 3cd7924e authored by Ben Skeggs's avatar Ben Skeggs Committed by Dave Airlie

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

- disable MC 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-17-skeggsb@gmail.com
parent 1dc750da
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
*/ */
#include "priv.h" #include "priv.h"
#include <subdev/gsp.h>
static void static void
ga100_mc_device_disable(struct nvkm_mc *mc, u32 mask) ga100_mc_device_disable(struct nvkm_mc *mc, u32 mask)
{ {
...@@ -72,5 +74,8 @@ ga100_mc = { ...@@ -72,5 +74,8 @@ ga100_mc = {
int int
ga100_mc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_mc **pmc) ga100_mc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_mc **pmc)
{ {
if (nvkm_gsp_rm(device->gsp))
return -ENODEV;
return nvkm_mc_new_(&ga100_mc, device, type, inst, pmc); return nvkm_mc_new_(&ga100_mc, device, type, inst, pmc);
} }
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
*/ */
#include "priv.h" #include "priv.h"
#include <subdev/gsp.h>
const struct nvkm_intr_data const struct nvkm_intr_data
gp100_mc_intrs[] = { gp100_mc_intrs[] = {
{ NVKM_ENGINE_DISP , 0, 0, 0x04000000, true }, { NVKM_ENGINE_DISP , 0, 0, 0x04000000, true },
...@@ -98,5 +100,8 @@ gp100_mc = { ...@@ -98,5 +100,8 @@ gp100_mc = {
int int
gp100_mc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_mc **pmc) gp100_mc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_mc **pmc)
{ {
if (nvkm_gsp_rm(device->gsp))
return -ENODEV;
return nvkm_mc_new_(&gp100_mc, device, type, inst, pmc); return nvkm_mc_new_(&gp100_mc, device, type, inst, pmc);
} }
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