diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-22 20:26:07 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 18:50:58 +1000 |
commit | 2f5bfd1c0aad53d7033950f0c8b7a142ddeb0827 (patch) | |
tree | e12478f228461a9230ad914302f6a590a28dd003 /drivers/gpu/drm/nouveau/nvc0_fence.c | |
parent | 7aa638cfdb285946f989ac1e132e9c3378f26db6 (diff) | |
download | linux-2f5bfd1c0aad53d7033950f0c8b7a142ddeb0827.tar.bz2 |
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/nvc0_fence.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_fence.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nvc0_fence.c b/drivers/gpu/drm/nouveau/nvc0_fence.c index e4b2efaee254..13b1345081d9 100644 --- a/drivers/gpu/drm/nouveau/nvc0_fence.c +++ b/drivers/gpu/drm/nouveau/nvc0_fence.c @@ -50,15 +50,17 @@ nvc0_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence) static int nvc0_fence_sync32(struct nouveau_channel *chan, u64 virtual, u32 sequence) { - int ret = RING_SPACE(chan, 5); + struct nvif_push *push = chan->chan.push; + int ret = PUSH_WAIT(push, 5); if (ret == 0) { - BEGIN_NVC0(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 | - NVC0_SUBCHAN_SEMAPHORE_TRIGGER_YIELD); - FIRE_RING (chan); + PUSH_NVSQ(push, NV906F, + 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 | + NVC0_SUBCHAN_SEMAPHORE_TRIGGER_YIELD); + PUSH_KICK(push); } return ret; } |