diff options
author | Mario Kleiner <mario.kleiner.de@gmail.com> | 2017-04-29 06:11:30 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-04-29 22:39:23 +1000 |
commit | 271393ba6e2ac384a14e581d34d5d72c5953e3c6 (patch) | |
tree | b2e5bbbc05ed74b98b58122d8ae8452b6525f13e /drivers/gpu | |
parent | 48907c23ea3307a6b6368698c1e786152cd45588 (diff) | |
download | op-kernel-dev-271393ba6e2ac384a14e581d34d5d72c5953e3c6.zip op-kernel-dev-271393ba6e2ac384a14e581d34d5d72c5953e3c6.tar.gz |
drm/nouveau/fb/gf100-: Fix 32 bit wraparound in new ram detection
A missing u64 cast causes a 32-Bit wraparound from
4096 MiB to 0 MiB and therefore total 0 MiB VRAM detected
if card has 4096 Mib per FBP.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Karol Herbst <karolherbst@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c index 53c32fc..c639759 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c @@ -589,7 +589,7 @@ gf100_ram_ctor(const struct nvkm_ram_func *func, struct nvkm_fb *fb, nvkm_debug(subdev, "FBP %d: %4d MiB, %d LTC(s)\n", fbp, size, ltcs); lcomm = min(lcomm, (u64)(size / ltcs) << 20); - total += size << 20; + total += (u64) size << 20; ltcn += ltcs; } else { nvkm_debug(subdev, "FBP %d: disabled\n", fbp); |