summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvc0_fence.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-22 13:18:06 +0300
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 11:50:58 +0300
commit7aa638cfdb285946f989ac1e132e9c3378f26db6 (patch)
tree763987bdbbaccf913ab07b3871a38c891471f7cc /drivers/gpu/drm/nouveau/nvc0_fence.c
parent183b70bbdf61c89afa4aa5945a5cda85d005a2ed (diff)
downloadlinux-7aa638cfdb285946f989ac1e132e9c3378f26db6.tar.xz
drm/nouveau/fence: convert emit() 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.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nvc0_fence.c b/drivers/gpu/drm/nouveau/nvc0_fence.c
index b79775788bbd..e4b2efaee254 100644
--- a/drivers/gpu/drm/nouveau/nvc0_fence.c
+++ b/drivers/gpu/drm/nouveau/nvc0_fence.c
@@ -21,25 +21,28 @@
*
* Authors: Ben Skeggs
*/
-
#include "nouveau_drv.h"
#include "nouveau_dma.h"
#include "nouveau_fence.h"
#include "nv50_display.h"
+#include <nvif/push906f.h>
+
static int
nvc0_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
{
- int ret = RING_SPACE(chan, 6);
+ struct nvif_push *push = chan->chan.push;
+ int ret = PUSH_WAIT(push, 6);
if (ret == 0) {
- BEGIN_NVC0(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 5);
- 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_WRITE_LONG);
- OUT_RING (chan, 0x00000000);
- 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_WRITE_LONG,
+ NV84_SUBCHAN_UEVENT, 0x00000000);
+ PUSH_KICK(push);
}
return ret;
}