summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nv84_fence.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-22 13:26:07 +0300
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 11:50:58 +0300
commit2f5bfd1c0aad53d7033950f0c8b7a142ddeb0827 (patch)
treee12478f228461a9230ad914302f6a590a28dd003 /drivers/gpu/drm/nouveau/nv84_fence.c
parent7aa638cfdb285946f989ac1e132e9c3378f26db6 (diff)
downloadlinux-2f5bfd1c0aad53d7033950f0c8b7a142ddeb0827.tar.xz
drm/nouveau/fence: convert sync() 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/nv84_fence.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv84_fence.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nv84_fence.c b/drivers/gpu/drm/nouveau/nv84_fence.c
index 0c4b740abea8..bc09e64fe6b8 100644
--- a/drivers/gpu/drm/nouveau/nv84_fence.c
+++ b/drivers/gpu/drm/nouveau/nv84_fence.c
@@ -52,16 +52,17 @@ nv84_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
static int
nv84_fence_sync32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
{
- int ret = RING_SPACE(chan, 7);
+ struct nvif_push *push = chan->chan.push;
+ int ret = PUSH_WAIT(push, 7);
if (ret == 0) {
- BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 1);
- OUT_RING (chan, chan->vram.handle);
- BEGIN_NV04(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4);
- OUT_RING (chan, upper_32_bits(virtual));
- OUT_RING (chan, lower_32_bits(virtual));
- OUT_RING (chan, sequence);
- OUT_RING (chan, NV84_SUBCHAN_SEMAPHORE_TRIGGER_ACQUIRE_GEQUAL);
- FIRE_RING (chan);
+ PUSH_NVSQ(push, NV826F, NV11_SUBCHAN_DMA_SEMAPHORE, chan->vram.handle);
+ PUSH_NVSQ(push, NV826F,
+ NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, upper_32_bits(virtual),
+ NV84_SUBCHAN_SEMAPHORE_ADDRESS_LOW, lower_32_bits(virtual),
+ NV84_SUBCHAN_SEMAPHORE_SEQUENCE, sequence,
+ NV84_SUBCHAN_SEMAPHORE_TRIGGER,
+ NV84_SUBCHAN_SEMAPHORE_TRIGGER_ACQUIRE_GEQUAL);
+ PUSH_KICK(push);
}
return ret;
}