Commit a6f992a8 authored by Ben Skeggs's avatar Ben Skeggs Committed by Dave Airlie
Browse files

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



- (temporarily) disable if GSP-RM detected, will be added later
- make init() optional

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-27-skeggsb@gmail.com
parent da1fbcc0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -160,7 +160,11 @@ static int
nvkm_gr_init(struct nvkm_engine *engine)
{
	struct nvkm_gr *gr = nvkm_gr(engine);

	if (gr->func->init)
		return gr->func->init(gr);

	return 0;
}

static int
+4 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include "ctxgf100.h"

#include <core/firmware.h>
#include <subdev/gsp.h>
#include <subdev/acr.h>
#include <subdev/timer.h>
#include <subdev/vfn.h>
@@ -350,5 +351,8 @@ ga102_gr_fwif[] = {
int
ga102_gr_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_gr **pgr)
{
	if (nvkm_gsp_rm(device->gsp))
		return -ENODEV;

	return gf100_gr_new_(ga102_gr_fwif, device, type, inst, pgr);
}
+5 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@
#include "gf100.h"
#include "ctxgf100.h"

#include <subdev/gsp.h>

#include <nvif/class.h>

void
@@ -216,5 +218,8 @@ tu102_gr_fwif[] = {
int
tu102_gr_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_gr **pgr)
{
	if (nvkm_gsp_rm(device->gsp))
		return -ENODEV;

	return gf100_gr_new_(tu102_gr_fwif, device, type, inst, pgr);
}