diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-22 15:54:52 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 18:50:57 +1000 |
commit | 01c43a66eb7aac48b3a978158cfb45674b18a48e (patch) | |
tree | 668913e1e682420b285587c76fb3037daa5f3e22 /drivers/gpu/drm/nouveau/nouveau_bo0039.c | |
parent | 8b9d5d63a7193156b6b397c4f5078efbc200695f (diff) |
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_bo0039.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo0039.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo0039.c b/drivers/gpu/drm/nouveau/nouveau_bo0039.c index d5e9a200a64c..ddf2f5ee1140 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo0039.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo0039.c @@ -30,6 +30,8 @@ #include "nouveau_dma.h" #include "nouveau_drv.h" +#include <nvif/push006c.h> + static inline uint32_t nouveau_bo_mem_ctxdma(struct ttm_buffer_object *bo, struct nouveau_channel *chan, struct ttm_mem_reg *reg) @@ -88,13 +90,14 @@ nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, int nv04_bo_move_init(struct nouveau_channel *chan, u32 handle) { - int ret = RING_SPACE(chan, 4); - if (ret == 0) { - BEGIN_NV04(chan, NvSubCopy, 0x0000, 1); - OUT_RING (chan, handle); - BEGIN_NV04(chan, NvSubCopy, 0x0180, 1); - OUT_RING (chan, chan->drm->ntfy.handle); - } + struct nvif_push *push = chan->chan.push; + int ret; - return ret; + ret = PUSH_WAIT(push, 4); + if (ret) + return ret; + + PUSH_NVSQ(push, NV039, 0x0000, handle); + PUSH_NVSQ(push, NV039, 0x0180, chan->drm->ntfy.handle); + return 0; } |