mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
This commit is contained in:
parent
48907c23ea
commit
271393ba6e
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue