From e3085acfb5c304f365cb5f24eb413a181962295c Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 4 May 2012 14:34:16 +1000 Subject: [PATCH] --- yaml --- r: 307561 b: refs/heads/master c: 5490e5dfb9e9d654b0ed06c2989a73402496adf6 h: refs/heads/master i: 307559: af2ea576f0dcfd9262bca0586c6967b256621a9e v: v3 --- [refs] | 2 +- trunk/drivers/gpu/drm/nouveau/nouveau_bo.c | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index c4a4ca2ed811..2e024550ebda 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4c193d254ee94da02857b9670e815b1765a9579b +refs/heads/master: 5490e5dfb9e9d654b0ed06c2989a73402496adf6 diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_bo.c b/trunk/drivers/gpu/drm/nouveau/nouveau_bo.c index f596354f399a..771ce371c4ba 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -561,6 +561,24 @@ nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, return 0; } +static int +nv98_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo, + struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) +{ + struct nouveau_mem *node = old_mem->mm_node; + int ret = RING_SPACE(chan, 7); + if (ret == 0) { + BEGIN_NV04(chan, NvSubCopy, 0x0320, 6); + OUT_RING (chan, upper_32_bits(node->vma[0].offset)); + OUT_RING (chan, lower_32_bits(node->vma[0].offset)); + OUT_RING (chan, upper_32_bits(node->vma[1].offset)); + OUT_RING (chan, lower_32_bits(node->vma[1].offset)); + OUT_RING (chan, 0x00000000 /* COPY */); + OUT_RING (chan, new_mem->num_pages << PAGE_SHIFT); + } + return ret; +} + static int nv84_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo, struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) @@ -842,7 +860,8 @@ nouveau_bo_move_init(struct nouveau_channel *chan) { "CRYPT", 0x74c1, nv84_bo_move_exec, nv50_bo_move_init }, { "M2MF", 0x5039, nv50_bo_move_m2mf, nv50_bo_move_init }, { "M2MF", 0x0039, nv04_bo_move_m2mf, nv04_bo_move_init }, - {} + {}, + { "CRYPT", 0x88b4, nv98_bo_move_exec, nv50_bo_move_init }, }, *mthd = _methods; const char *name = "CPU"; int ret;