Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f958e82 authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/fb/gp100-: disable address remapper



This was causing problems on a system with a large amount of RAM, where
display push buffers were being fetched incorrectly when placed in high
system memory addresses.

While this commit will resolve the issue on that particular system, the
issue will be avoided completely with another patch to more fully solve
problems with display and large amounts of system memory on Pascal.

It's still probably a good idea to disable this to prevent weird issues
in the future.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent eb493fbc
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -140,6 +140,9 @@ nvkm_fb_init(struct nvkm_subdev *subdev)
	if (fb->func->init)
		fb->func->init(fb);

	if (fb->func->init_remapper)
		fb->func->init_remapper(fb);

	if (fb->func->init_page) {
		ret = fb->func->init_page(fb);
		if (WARN_ON(ret))
+9 −0
Original line number Diff line number Diff line
@@ -36,6 +36,14 @@ gp100_fb_init_unkn(struct nvkm_fb *base)
	nvkm_wr32(device, 0x1faccc, nvkm_rd32(device, 0x100ccc));
}

void
gp100_fb_init_remapper(struct nvkm_fb *fb)
{
	struct nvkm_device *device = fb->subdev.device;
	/* Disable address remapper. */
	nvkm_mask(device, 0x100c14, 0x00040000, 0x00000000);
}

void
gp100_fb_init(struct nvkm_fb *base)
{
@@ -56,6 +64,7 @@ gp100_fb = {
	.dtor = gf100_fb_dtor,
	.oneinit = gf100_fb_oneinit,
	.init = gp100_fb_init,
	.init_remapper = gp100_fb_init_remapper,
	.init_page = gm200_fb_init_page,
	.init_unkn = gp100_fb_init_unkn,
	.ram_new = gp100_ram_new,
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ gp102_fb = {
	.dtor = gf100_fb_dtor,
	.oneinit = gf100_fb_oneinit,
	.init = gp100_fb_init,
	.init_remapper = gp100_fb_init_remapper,
	.init_page = gm200_fb_init_page,
	.ram_new = gp100_ram_new,
};
+2 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ struct nvkm_fb_func {
	u32 (*tags)(struct nvkm_fb *);
	int (*oneinit)(struct nvkm_fb *);
	void (*init)(struct nvkm_fb *);
	void (*init_remapper)(struct nvkm_fb *);
	int (*init_page)(struct nvkm_fb *);
	void (*init_unkn)(struct nvkm_fb *);
	void (*intr)(struct nvkm_fb *);
@@ -69,5 +70,6 @@ int gf100_fb_init_page(struct nvkm_fb *);

int gm200_fb_init_page(struct nvkm_fb *);

void gp100_fb_init_remapper(struct nvkm_fb *);
void gp100_fb_init_unkn(struct nvkm_fb *);
#endif