Commit b4806009 authored by Ben Skeggs's avatar Ben Skeggs Committed by Lyude Paul
Browse files

drm/nouveau/fb/tu102-: fix register used to determine scrub status



Turing apparently needs to use the same register we use on Ampere.

Not executing the scrubber ucode when required would result in large
areas of VRAM being inaccessible to the driver.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230130223715.1831509-2-bskeggs@redhat.com
parent d22915d2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ int gp100_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct n
int gp102_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
int gp10b_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
int gv100_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
int tu102_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
int ga100_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
int ga102_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);

+5 −5
Original line number Diff line number Diff line
@@ -2405,7 +2405,7 @@ nv162_chipset = {
	.bus      = { 0x00000001, gf100_bus_new },
	.devinit  = { 0x00000001, tu102_devinit_new },
	.fault    = { 0x00000001, tu102_fault_new },
	.fb       = { 0x00000001, gv100_fb_new },
	.fb       = { 0x00000001, tu102_fb_new },
	.fuse     = { 0x00000001, gm107_fuse_new },
	.gpio     = { 0x00000001, gk104_gpio_new },
	.gsp      = { 0x00000001, gv100_gsp_new },
@@ -2440,7 +2440,7 @@ nv164_chipset = {
	.bus      = { 0x00000001, gf100_bus_new },
	.devinit  = { 0x00000001, tu102_devinit_new },
	.fault    = { 0x00000001, tu102_fault_new },
	.fb       = { 0x00000001, gv100_fb_new },
	.fb       = { 0x00000001, tu102_fb_new },
	.fuse     = { 0x00000001, gm107_fuse_new },
	.gpio     = { 0x00000001, gk104_gpio_new },
	.gsp      = { 0x00000001, gv100_gsp_new },
@@ -2475,7 +2475,7 @@ nv166_chipset = {
	.bus      = { 0x00000001, gf100_bus_new },
	.devinit  = { 0x00000001, tu102_devinit_new },
	.fault    = { 0x00000001, tu102_fault_new },
	.fb       = { 0x00000001, gv100_fb_new },
	.fb       = { 0x00000001, tu102_fb_new },
	.fuse     = { 0x00000001, gm107_fuse_new },
	.gpio     = { 0x00000001, gk104_gpio_new },
	.gsp      = { 0x00000001, gv100_gsp_new },
@@ -2510,7 +2510,7 @@ nv167_chipset = {
	.bus      = { 0x00000001, gf100_bus_new },
	.devinit  = { 0x00000001, tu102_devinit_new },
	.fault    = { 0x00000001, tu102_fault_new },
	.fb       = { 0x00000001, gv100_fb_new },
	.fb       = { 0x00000001, tu102_fb_new },
	.fuse     = { 0x00000001, gm107_fuse_new },
	.gpio     = { 0x00000001, gk104_gpio_new },
	.gsp      = { 0x00000001, gv100_gsp_new },
@@ -2545,7 +2545,7 @@ nv168_chipset = {
	.bus      = { 0x00000001, gf100_bus_new },
	.devinit  = { 0x00000001, tu102_devinit_new },
	.fault    = { 0x00000001, tu102_fault_new },
	.fb       = { 0x00000001, gv100_fb_new },
	.fb       = { 0x00000001, tu102_fb_new },
	.fuse     = { 0x00000001, gm107_fuse_new },
	.gpio     = { 0x00000001, gk104_gpio_new },
	.gsp      = { 0x00000001, gv100_gsp_new },
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ nvkm-y += nvkm/subdev/fb/gp100.o
nvkm-y += nvkm/subdev/fb/gp102.o
nvkm-y += nvkm/subdev/fb/gp10b.o
nvkm-y += nvkm/subdev/fb/gv100.o
nvkm-y += nvkm/subdev/fb/tu102.o
nvkm-y += nvkm/subdev/fb/ga100.o
nvkm-y += nvkm/subdev/fb/ga102.o

+1 −7
Original line number Diff line number Diff line
@@ -40,12 +40,6 @@ ga102_fb_vpr_scrub(struct nvkm_fb *fb)
	return ret;
}

static bool
ga102_fb_vpr_scrub_required(struct nvkm_fb *fb)
{
	return (nvkm_rd32(fb->subdev.device, 0x1fa80c) & 0x00000010) != 0;
}

static const struct nvkm_fb_func
ga102_fb = {
	.dtor = gf100_fb_dtor,
@@ -56,7 +50,7 @@ ga102_fb = {
	.sysmem.flush_page_init = gf100_fb_sysmem_flush_page_init,
	.ram_new = ga102_ram_new,
	.default_bigpage = 16,
	.vpr.scrub_required = ga102_fb_vpr_scrub_required,
	.vpr.scrub_required = tu102_fb_vpr_scrub_required,
	.vpr.scrub = ga102_fb_vpr_scrub,
};

+0 −5
Original line number Diff line number Diff line
@@ -49,8 +49,3 @@ gv100_fb_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, s
}

MODULE_FIRMWARE("nvidia/gv100/nvdec/scrubber.bin");
MODULE_FIRMWARE("nvidia/tu102/nvdec/scrubber.bin");
MODULE_FIRMWARE("nvidia/tu104/nvdec/scrubber.bin");
MODULE_FIRMWARE("nvidia/tu106/nvdec/scrubber.bin");
MODULE_FIRMWARE("nvidia/tu116/nvdec/scrubber.bin");
MODULE_FIRMWARE("nvidia/tu117/nvdec/scrubber.bin");
Loading