Skip to contentSkip to conversation

drm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archs

RFC PATCH New Marcin Slusarz 1 participant 1 message Aug 22, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 drm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archs

nv04_sgdma_bind binds the same page multiple times on architectures where PAGE_SIZE != 4096.
Let's fix it.

---

I'm not sure about it - other backends seems to not care about page size at all...

---
 drivers/gpu/drm/nouveau/nouveau_sgdma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/nouveau/nouveau_sgdma.c +1 -1
index ca6028f..d7bb9c6 100644
@@ -129,7 +129,7 @@ nv04_sgdma_bind(struct ttm_backend *be, struct ttm_mem_reg *mem)
 
 		for (j = 0; j < PAGE_SIZE / NV_CTXDMA_PAGE_SIZE; j++, pte++) {
 			nv_wo32(gpuobj, (pte * 4) + 0, offset_l | 3);
-			dma_offset += NV_CTXDMA_PAGE_SIZE;
+			offset_l += NV_CTXDMA_PAGE_SIZE;
 		}
 	}
 
Signature · 1 line
1.7.6