aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2018-07-18 02:10:58 -0400
committerBen Skeggs <bskeggs@redhat.com>2018-07-19 00:36:51 -0400
commit2f958e8240be28acee26085ba1686b4321ba4306 (patch)
tree92f8e2046065e472fecfcb2e73844054c6634789
parenteb493fbc150f4a28151ae1ee84f24395989f3600 (diff)
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: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c3
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c9
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp102.c1
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h2
4 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
index 73b5d46104bd..434d2fc5bb1c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
@@ -140,6 +140,9 @@ nvkm_fb_init(struct nvkm_subdev *subdev)
140 if (fb->func->init) 140 if (fb->func->init)
141 fb->func->init(fb); 141 fb->func->init(fb);
142 142
143 if (fb->func->init_remapper)
144 fb->func->init_remapper(fb);
145
143 if (fb->func->init_page) { 146 if (fb->func->init_page) {
144 ret = fb->func->init_page(fb); 147 ret = fb->func->init_page(fb);
145 if (WARN_ON(ret)) 148 if (WARN_ON(ret))
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c
index dffe1f5e1071..8205ce436b3e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c
@@ -37,6 +37,14 @@ gp100_fb_init_unkn(struct nvkm_fb *base)
37} 37}
38 38
39void 39void
40gp100_fb_init_remapper(struct nvkm_fb *fb)
41{
42 struct nvkm_device *device = fb->subdev.device;
43 /* Disable address remapper. */
44 nvkm_mask(device, 0x100c14, 0x00040000, 0x00000000);
45}
46
47void
40gp100_fb_init(struct nvkm_fb *base) 48gp100_fb_init(struct nvkm_fb *base)
41{ 49{
42 struct gf100_fb *fb = gf100_fb(base); 50 struct gf100_fb *fb = gf100_fb(base);
@@ -56,6 +64,7 @@ gp100_fb = {
56 .dtor = gf100_fb_dtor, 64 .dtor = gf100_fb_dtor,
57 .oneinit = gf100_fb_oneinit, 65 .oneinit = gf100_fb_oneinit,
58 .init = gp100_fb_init, 66 .init = gp100_fb_init,
67 .init_remapper = gp100_fb_init_remapper,
59 .init_page = gm200_fb_init_page, 68 .init_page = gm200_fb_init_page,
60 .init_unkn = gp100_fb_init_unkn, 69 .init_unkn = gp100_fb_init_unkn,
61 .ram_new = gp100_ram_new, 70 .ram_new = gp100_ram_new,
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp102.c
index b84b9861ef26..b4d74e815674 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp102.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp102.c
@@ -31,6 +31,7 @@ gp102_fb = {
31 .dtor = gf100_fb_dtor, 31 .dtor = gf100_fb_dtor,
32 .oneinit = gf100_fb_oneinit, 32 .oneinit = gf100_fb_oneinit,
33 .init = gp100_fb_init, 33 .init = gp100_fb_init,
34 .init_remapper = gp100_fb_init_remapper,
34 .init_page = gm200_fb_init_page, 35 .init_page = gm200_fb_init_page,
35 .ram_new = gp100_ram_new, 36 .ram_new = gp100_ram_new,
36}; 37};
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
index 2857f31466bf..1e4ad61c19e1 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
@@ -11,6 +11,7 @@ struct nvkm_fb_func {
11 u32 (*tags)(struct nvkm_fb *); 11 u32 (*tags)(struct nvkm_fb *);
12 int (*oneinit)(struct nvkm_fb *); 12 int (*oneinit)(struct nvkm_fb *);
13 void (*init)(struct nvkm_fb *); 13 void (*init)(struct nvkm_fb *);
14 void (*init_remapper)(struct nvkm_fb *);
14 int (*init_page)(struct nvkm_fb *); 15 int (*init_page)(struct nvkm_fb *);
15 void (*init_unkn)(struct nvkm_fb *); 16 void (*init_unkn)(struct nvkm_fb *);
16 void (*intr)(struct nvkm_fb *); 17 void (*intr)(struct nvkm_fb *);
@@ -69,5 +70,6 @@ int gf100_fb_init_page(struct nvkm_fb *);
69 70
70int gm200_fb_init_page(struct nvkm_fb *); 71int gm200_fb_init_page(struct nvkm_fb *);
71 72
73void gp100_fb_init_remapper(struct nvkm_fb *);
72void gp100_fb_init_unkn(struct nvkm_fb *); 74void gp100_fb_init_unkn(struct nvkm_fb *);
73#endif 75#endif