diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-07-20 11:19:26 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 18:51:04 +1000 |
commit | 40f1171e7c26e57d71aa2800fb8ad213b4efb09c (patch) | |
tree | 363a4be2f17938c19bfdebd11ff5c8f91642072a /drivers/gpu/drm/nouveau/nvc0_fence.c | |
parent | 60cdadace3208001b4e24a1a4b102f767d5df3c2 (diff) |
drm/nouveau/fence: use NVIDIA's headers for sync()
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 | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nvc0_fence.c b/drivers/gpu/drm/nouveau/nvc0_fence.c index f46a8900ac33..e1461c0b0779 100644 --- a/drivers/gpu/drm/nouveau/nvc0_fence.c +++ b/drivers/gpu/drm/nouveau/nvc0_fence.c @@ -60,13 +60,15 @@ nvc0_fence_sync32(struct nouveau_channel *chan, u64 virtual, u32 sequence) struct nvif_push *push = chan->chan.push; int ret = PUSH_WAIT(push, 5); if (ret == 0) { - 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_MTHD(push, NV906F, SEMAPHOREA, + NVVAL(NV906F, SEMAPHOREA, OFFSET_UPPER, upper_32_bits(virtual)), + + SEMAPHOREB, lower_32_bits(virtual), + SEMAPHOREC, sequence, + + SEMAPHORED, + NVDEF(NV906F, SEMAPHORED, OPERATION, ACQ_GEQ) | + NVDEF(NV906F, SEMAPHORED, ACQUIRE_SWITCH, ENABLED)); PUSH_KICK(push); } return ret; |