Marcin Slusarz
2013-Mar-05 18:57 UTC
[Nouveau] [PATCH] drm/nouveau/nv50: use correct tiling methods for m2mf buffer moves
Currently used only on original nv50, nvaa and nvac.
Signed-off-by: Marcin Slusarz <marcin.slusarz at gmail.com>
---
Note: it would be catched much faster (probably even by author, and not after
2 years) if this code would use (known!) register names...
---
drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c
b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 11ca821..7ff1071 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -801,7 +801,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct
ttm_buffer_object *bo,
stride = 16 * 4;
height = amount / stride;
- if (new_mem->mem_type == TTM_PL_VRAM &&
+ if (old_mem->mem_type == TTM_PL_VRAM &&
nouveau_bo_tile_layout(nvbo)) {
ret = RING_SPACE(chan, 8);
if (ret)
@@ -823,7 +823,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct
ttm_buffer_object *bo,
BEGIN_NV04(chan, NvSubCopy, 0x0200, 1);
OUT_RING (chan, 1);
}
- if (old_mem->mem_type == TTM_PL_VRAM &&
+ if (new_mem->mem_type == TTM_PL_VRAM &&
nouveau_bo_tile_layout(nvbo)) {
ret = RING_SPACE(chan, 8);
if (ret)
--
1.8.1.4
Maybe Matching Threads
- [PATCH] drm/nv50-: fix tiled memory layout checks
- [PATCH 1/7] drm/nouveau: fix m2mf copy to tiled gart
- [PATCH] drm/nouveau: always do buffer object moves on bo->channel
- [PATCH] nouveau/hmm: fix migrate zero page to GPU
- [PATCH 04/10] drm/virtio: move virtio_gpu_object_{attach, detach} calls.
