From 5220b3c14b5d4e35df5a4574534519d7007713c3 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 23 Sep 2010 15:21:17 +1000 Subject: [PATCH] drm/nv50: assume smaller tiles for bo moves Somehow fixes some corruption seen in KDE.. Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_bo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 2b97d97f1493..c900aaa5cffa 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -529,8 +529,8 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, while (length) { u32 amount, stride, height; - amount = min(length, (u64)(16 * 1024 * 1024)); - stride = 64 * 4; + amount = min(length, (u64)(4 * 1024 * 1024)); + stride = 16 * 4; height = amount / stride; if (new_mem->mem_type == TTM_PL_VRAM && nvbo->tile_flags) { @@ -540,7 +540,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, BEGIN_RING(chan, NvSubM2MF, 0x0200, 7); OUT_RING (chan, 0); - OUT_RING (chan, 0x20); + OUT_RING (chan, 0); OUT_RING (chan, stride); OUT_RING (chan, height); OUT_RING (chan, 1); @@ -561,7 +561,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, BEGIN_RING(chan, NvSubM2MF, 0x021c, 7); OUT_RING (chan, 0); - OUT_RING (chan, 0x20); + OUT_RING (chan, 0); OUT_RING (chan, stride); OUT_RING (chan, height); OUT_RING (chan, 1); -- GitLab