diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-11-21 11:01:33 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-11-28 15:38:49 +1000 |
commit | 4e49f8011f1c97e4db04427b0c559eee5e97da67 (patch) | |
tree | 81e6014affb97450492ac59b50fcba8f32d59924 | |
parent | 013c57135725e82d3ed0e324e0543bfb10a4097f (diff) | |
download | nouveau-4e49f8011f1c97e4db04427b0c559eee5e97da67.tar.gz |
fb/ram/gp100-: fix memory detection where FBP_NUM != FBPA_NUM
In this situation, we'd have ended up detecting less VRAM than we have.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drm/nouveau/nvkm/subdev/fb/ramgp100.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drm/nouveau/nvkm/subdev/fb/ramgp100.c b/drm/nouveau/nvkm/subdev/fb/ramgp100.c index f3be408b5..405faabe8 100644 --- a/drm/nouveau/nvkm/subdev/fb/ramgp100.c +++ b/drm/nouveau/nvkm/subdev/fb/ramgp100.c @@ -92,13 +92,13 @@ gp100_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram) enum nvkm_ram_type type = nvkm_fb_bios_memtype(device->bios); const u32 rsvd_head = ( 256 * 1024); /* vga memory */ const u32 rsvd_tail = (1024 * 1024); /* vbios etc */ - u32 fbpa_num = nvkm_rd32(device, 0x022438), fbpa; + u32 fbpa_num = nvkm_rd32(device, 0x02243c), fbpa; u32 fbio_opt = nvkm_rd32(device, 0x021c14); u64 part, size = 0, comm = ~0ULL; bool mixed = false; int ret; - nvkm_debug(subdev, "022438: %08x\n", fbpa_num); + nvkm_debug(subdev, "02243c: %08x\n", fbpa_num); nvkm_debug(subdev, "021c14: %08x\n", fbio_opt); for (fbpa = 0; fbpa < fbpa_num; fbpa++) { if (!(fbio_opt & (1 << fbpa))) { |