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

- disable MC 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-17-skeggsb@gmail.com
This commit is contained in:
Ben Skeggs 2023-09-19 06:21:21 +10:00 committed by Dave Airlie
parent 1dc750dab1
commit 3cd7924e0e
2 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,8 @@
*/
#include "priv.h"
#include <subdev/gsp.h>
static void
ga100_mc_device_disable(struct nvkm_mc *mc, u32 mask)
{
@ -72,5 +74,8 @@ ga100_mc = {
int
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);
}

View File

@ -23,6 +23,8 @@
*/
#include "priv.h"
#include <subdev/gsp.h>
const struct nvkm_intr_data
gp100_mc_intrs[] = {
{ NVKM_ENGINE_DISP , 0, 0, 0x04000000, true },
@ -98,5 +100,8 @@ gp100_mc = {
int
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);
}