diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-22 08:54:52 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 11:50:57 +0300 |
commit | 01c43a66eb7aac48b3a978158cfb45674b18a48e (patch) | |
tree | 668913e1e682420b285587c76fb3037daa5f3e22 /drivers/gpu/drm/nouveau/nouveau_bo9039.c | |
parent | 8b9d5d63a7193156b6b397c4f5078efbc200695f (diff) | |
download | linux-01c43a66eb7aac48b3a978158cfb45674b18a48e.tar.xz |
drm/nouveau/bo: convert move init() to new push macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo9039.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo9039.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo9039.c b/drivers/gpu/drm/nouveau/nouveau_bo9039.c index 14424f6c3f59..f9ba04faf1a2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo9039.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo9039.c @@ -30,6 +30,8 @@ #include "nouveau_dma.h" #include "nouveau_mem.h" +#include <nvif/push906f.h> + int nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg) @@ -72,10 +74,13 @@ nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, int nvc0_bo_move_init(struct nouveau_channel *chan, u32 handle) { - int ret = RING_SPACE(chan, 2); - if (ret == 0) { - BEGIN_NVC0(chan, NvSubCopy, 0x0000, 1); - OUT_RING (chan, handle); - } - return ret; + struct nvif_push *push = chan->chan.push; + int ret; + + ret = PUSH_WAIT(push, 2); + if (ret) + return ret; + + PUSH_NVSQ(push, NV9039, 0x0000, handle); + return 0; } |