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

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
...@@ -140,6 +140,9 @@ nvkm_fb_init(struct nvkm_subdev *subdev) ...@@ -140,6 +140,9 @@ nvkm_fb_init(struct nvkm_subdev *subdev)
if (fb->func->init) if (fb->func->init)
fb->func->init(fb); fb->func->init(fb);
if (fb->func->init_remapper)
fb->func->init_remapper(fb);
if (fb->func->init_page) { if (fb->func->init_page) {
ret = fb->func->init_page(fb); ret = fb->func->init_page(fb);
if (WARN_ON(ret)) if (WARN_ON(ret))
......
...@@ -36,6 +36,14 @@ gp100_fb_init_unkn(struct nvkm_fb *base) ...@@ -36,6 +36,14 @@ gp100_fb_init_unkn(struct nvkm_fb *base)
nvkm_wr32(device, 0x1faccc, nvkm_rd32(device, 0x100ccc)); 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 void
gp100_fb_init(struct nvkm_fb *base) gp100_fb_init(struct nvkm_fb *base)
{ {
...@@ -56,6 +64,7 @@ gp100_fb = { ...@@ -56,6 +64,7 @@ gp100_fb = {
.dtor = gf100_fb_dtor, .dtor = gf100_fb_dtor,
.oneinit = gf100_fb_oneinit, .oneinit = gf100_fb_oneinit,
.init = gp100_fb_init, .init = gp100_fb_init,
.init_remapper = gp100_fb_init_remapper,
.init_page = gm200_fb_init_page, .init_page = gm200_fb_init_page,
.init_unkn = gp100_fb_init_unkn, .init_unkn = gp100_fb_init_unkn,
.ram_new = gp100_ram_new, .ram_new = gp100_ram_new,
......
...@@ -31,6 +31,7 @@ gp102_fb = { ...@@ -31,6 +31,7 @@ gp102_fb = {
.dtor = gf100_fb_dtor, .dtor = gf100_fb_dtor,
.oneinit = gf100_fb_oneinit, .oneinit = gf100_fb_oneinit,
.init = gp100_fb_init, .init = gp100_fb_init,
.init_remapper = gp100_fb_init_remapper,
.init_page = gm200_fb_init_page, .init_page = gm200_fb_init_page,
.ram_new = gp100_ram_new, .ram_new = gp100_ram_new,
}; };
......
...@@ -11,6 +11,7 @@ struct nvkm_fb_func { ...@@ -11,6 +11,7 @@ struct nvkm_fb_func {
u32 (*tags)(struct nvkm_fb *); u32 (*tags)(struct nvkm_fb *);
int (*oneinit)(struct nvkm_fb *); int (*oneinit)(struct nvkm_fb *);
void (*init)(struct nvkm_fb *); void (*init)(struct nvkm_fb *);
void (*init_remapper)(struct nvkm_fb *);
int (*init_page)(struct nvkm_fb *); int (*init_page)(struct nvkm_fb *);
void (*init_unkn)(struct nvkm_fb *); void (*init_unkn)(struct nvkm_fb *);
void (*intr)(struct nvkm_fb *); void (*intr)(struct nvkm_fb *);
...@@ -69,5 +70,6 @@ int gf100_fb_init_page(struct nvkm_fb *); ...@@ -69,5 +70,6 @@ int gf100_fb_init_page(struct nvkm_fb *);
int gm200_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 *); void gp100_fb_init_unkn(struct nvkm_fb *);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment