diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-07-09 10:41:01 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-07-14 11:53:25 +1000 |
commit | c73baa831fe5c035a41e52d75b763b3c942fa6d0 (patch) | |
tree | 70160b0fb2843bb94ecac101f79382bc424c4248 /drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c | |
parent | 2100292c95cc1ff0d9dfebcb34d447f0acad5dd1 (diff) | |
download | talos-obmc-linux-c73baa831fe5c035a41e52d75b763b3c942fa6d0.tar.gz talos-obmc-linux-c73baa831fe5c035a41e52d75b763b3c942fa6d0.zip |
drm/nouveau/fb/gf100-: allow selection of an alternate big page size
GFxxx/GM1xx support the selection of 64/128KiB big pages globally.
GM2xx supports the same, as well as another mode where the page size
can be selected per-instance.
We default to 128KiB pages (With per-instance for GM200, but the current
code selects 128KiB there already) as the MMU code isn't currently able
to handle otherwise.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c index 44f5716f64d8..6af3b724f07b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c @@ -27,6 +27,24 @@ #include <core/memory.h> static void +gm200_fb_init_page(struct nvkm_fb *fb) +{ + struct nvkm_device *device = fb->subdev.device; + switch (fb->page) { + case 16: + nvkm_mask(device, 0x100c80, 0x00000801, 0x00000001); + break; + case 17: + nvkm_mask(device, 0x100c80, 0x00000801, 0x00000000); + break; + default: + nvkm_mask(device, 0x100c80, 0x00000800, 0x00000800); + fb->page = 0; + break; + } +} + +static void gm200_fb_init(struct nvkm_fb *base) { struct gf100_fb *fb = gf100_fb(base); @@ -48,6 +66,7 @@ gm200_fb = { .dtor = gf100_fb_dtor, .oneinit = gf100_fb_oneinit, .init = gm200_fb_init, + .init_page = gm200_fb_init_page, .intr = gf100_fb_intr, .ram_new = gm107_ram_new, .memtype_valid = gf100_fb_memtype_valid, |