Skip to content

Commit 7b4b98f

Browse files
author
Ben Skeggs
committed
drm/nv50/vram: fix incorrect detection of bank count on newer chipsets
NVA3+ has an extra bit here compared to NV50:NVA3 chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1 parent dce411c commit 7b4b98f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/gpu/drm/nouveau/nv50_vram.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ nv50_vram_rblock(struct drm_device *dev)
160160
colbits = (r4 & 0x0000f000) >> 12;
161161
rowbitsa = ((r4 & 0x000f0000) >> 16) + 8;
162162
rowbitsb = ((r4 & 0x00f00000) >> 20) + 8;
163-
banks = ((r4 & 0x01000000) ? 8 : 4);
163+
banks = 1 << (((r4 & 0x03000000) >> 24) + 2);
164164

165165
rowsize = parts * banks * (1 << colbits) * 8;
166166
predicted = rowsize << rowbitsa;

0 commit comments

Comments
 (0)