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

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



- (temporarily) disable if GSP-RM detected, will be added later
- provide empty class list for non-GSP paths
- split tu102 from gm107, it will provide host classes later

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-29-skeggsb@gmail.com
parent 796928c6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,4 +12,5 @@ struct nvkm_nvenc {
};

int gm107_nvenc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_nvenc **);
int tu102_nvenc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_nvenc **);
#endif
+5 −5
Original line number Diff line number Diff line
@@ -2427,7 +2427,7 @@ nv162_chipset = {
	.fifo     = { 0x00000001, tu102_fifo_new },
	.gr       = { 0x00000001, tu102_gr_new },
	.nvdec    = { 0x00000001, tu102_nvdec_new },
	.nvenc    = { 0x00000001, gm107_nvenc_new },
	.nvenc    = { 0x00000001, tu102_nvenc_new },
	.sec2     = { 0x00000001, tu102_sec2_new },
};

@@ -2462,7 +2462,7 @@ nv164_chipset = {
	.fifo     = { 0x00000001, tu102_fifo_new },
	.gr       = { 0x00000001, tu102_gr_new },
	.nvdec    = { 0x00000003, tu102_nvdec_new },
	.nvenc    = { 0x00000001, gm107_nvenc_new },
	.nvenc    = { 0x00000001, tu102_nvenc_new },
	.sec2     = { 0x00000001, tu102_sec2_new },
};

@@ -2497,7 +2497,7 @@ nv166_chipset = {
	.fifo     = { 0x00000001, tu102_fifo_new },
	.gr       = { 0x00000001, tu102_gr_new },
	.nvdec    = { 0x00000007, tu102_nvdec_new },
	.nvenc    = { 0x00000001, gm107_nvenc_new },
	.nvenc    = { 0x00000001, tu102_nvenc_new },
	.sec2     = { 0x00000001, tu102_sec2_new },
};

@@ -2532,7 +2532,7 @@ nv167_chipset = {
	.fifo     = { 0x00000001, tu102_fifo_new },
	.gr       = { 0x00000001, tu102_gr_new },
	.nvdec    = { 0x00000001, tu102_nvdec_new },
	.nvenc    = { 0x00000001, gm107_nvenc_new },
	.nvenc    = { 0x00000001, tu102_nvenc_new },
	.sec2     = { 0x00000001, tu102_sec2_new },
};

@@ -2567,7 +2567,7 @@ nv168_chipset = {
	.fifo     = { 0x00000001, tu102_fifo_new },
	.gr       = { 0x00000001, tu102_gr_new },
	.nvdec    = { 0x00000001, tu102_nvdec_new },
	.nvenc    = { 0x00000001, gm107_nvenc_new },
	.nvenc    = { 0x00000001, tu102_nvenc_new },
	.sec2     = { 0x00000001, tu102_sec2_new },
};

+1 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: MIT
nvkm-y += nvkm/engine/nvenc/base.o
nvkm-y += nvkm/engine/nvenc/gm107.o
nvkm-y += nvkm/engine/nvenc/tu102.o
+2 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ nvkm_nvenc_dtor(struct nvkm_engine *engine)
static const struct nvkm_engine_func
nvkm_nvenc = {
	.dtor = nvkm_nvenc_dtor,
	.sclass = { {} },
};

int
@@ -59,4 +60,4 @@ nvkm_nvenc_new_(const struct nvkm_nvenc_fwif *fwif, struct nvkm_device *device,

	return nvkm_falcon_ctor(nvenc->func->flcn, &nvenc->engine.subdev,
				nvenc->engine.subdev.name, 0, &nvenc->falcon);
};
}
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ gm107_nvenc_nofw(struct nvkm_nvenc *nvenc, int ver,
	return 0;
}

static const struct nvkm_nvenc_fwif
const struct nvkm_nvenc_fwif
gm107_nvenc_fwif[] = {
	{ -1, gm107_nvenc_nofw, &gm107_nvenc },
	{}
Loading