summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-22 19:36:18 +1000
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 18:50:57 +1000
commit105f756c503846442537016dedeab0e433820041 (patch)
tree18b83e807de5cb9af89c7a8ee803d238d3b63a72
parent44517aa8d787243dad59c0b55131ae4b6dc100f7 (diff)
downloadlinux-105f756c503846442537016dedeab0e433820041.tar.gz
linux-105f756c503846442537016dedeab0e433820041.tar.bz2
linux-105f756c503846442537016dedeab0e433820041.zip
drm/nouveau/kms/nv04: convert page_flip_emit() to new push macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/crtc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index 3d3348478549..94782ba4a1f3 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -44,6 +44,8 @@
#include <subdev/bios/pll.h>
#include <subdev/clk.h>
+#include <nvif/push006c.h>
+
#include <nvif/event.h>
#include <nvif/cl0046.h>
@@ -1105,6 +1107,7 @@ nv04_page_flip_emit(struct nouveau_channel *chan,
struct nouveau_fence_chan *fctx = chan->fence;
struct nouveau_drm *drm = chan->drm;
struct drm_device *dev = drm->dev;
+ struct nvif_push *push = chan->chan.push;
unsigned long flags;
int ret;
@@ -1119,13 +1122,12 @@ nv04_page_flip_emit(struct nouveau_channel *chan,
goto fail;
/* Emit the pageflip */
- ret = RING_SPACE(chan, 2);
+ ret = PUSH_WAIT(push, 2);
if (ret)
goto fail;
- BEGIN_NV04(chan, NvSubSw, NV_SW_PAGE_FLIP, 1);
- OUT_RING (chan, 0x00000000);
- FIRE_RING (chan);
+ PUSH_NVSQ(push, NV_SW, NV_SW_PAGE_FLIP, 0x00000000);
+ PUSH_KICK(push);
ret = nouveau_fence_new(chan, false, pfence);
if (ret)