diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-22 19:39:36 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 18:50:57 +1000 |
commit | c548b25cab50883082cc10dcb2f81dfdc4aef3be (patch) | |
tree | ad7ca512b5fdf043d1757f6b828ab507293eff5d | |
parent | 105f756c503846442537016dedeab0e433820041 (diff) | |
download | linux-c548b25cab50883082cc10dcb2f81dfdc4aef3be.tar.gz linux-c548b25cab50883082cc10dcb2f81dfdc4aef3be.tar.bz2 linux-c548b25cab50883082cc10dcb2f81dfdc4aef3be.zip |
drm/nouveau/kms/nv04: convert page_flip() 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.c | 16 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dma.h | 1 |
2 files changed, 7 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index 94782ba4a1f3..6416b6907aeb 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c @@ -1157,6 +1157,7 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, struct nouveau_cli *cli; struct nouveau_fence *fence; struct nv04_display *dispnv04 = nv04_display(dev); + struct nvif_push *push; int head = nouveau_crtc(crtc)->index; int ret; @@ -1164,6 +1165,7 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, if (!chan) return -ENODEV; cli = (void *)chan->user.client; + push = chan->chan.push; s = kzalloc(sizeof(*s), GFP_KERNEL); if (!s) @@ -1205,18 +1207,14 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, /* Emit a page flip */ if (swap_interval) { - ret = RING_SPACE(chan, 8); + ret = PUSH_WAIT(push, 8); if (ret) goto fail_unreserve; - BEGIN_NV04(chan, NvSubImageBlit, 0x012c, 1); - OUT_RING (chan, 0); - BEGIN_NV04(chan, NvSubImageBlit, 0x0134, 1); - OUT_RING (chan, head); - BEGIN_NV04(chan, NvSubImageBlit, 0x0100, 1); - OUT_RING (chan, 0); - BEGIN_NV04(chan, NvSubImageBlit, 0x0130, 1); - OUT_RING (chan, 0); + PUSH_NVSQ(push, NV05F, 0x012c, 0); + PUSH_NVSQ(push, NV05F, 0x0134, head); + PUSH_NVSQ(push, NV05F, 0x0100, 0); + PUSH_NVSQ(push, NV05F, 0x0130, 0); } nouveau_bo_ref(new_bo, &dispnv04->image[head]); diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.h b/drivers/gpu/drm/nouveau/nouveau_dma.h index 32a1f03ec488..35318739f7f5 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dma.h +++ b/drivers/gpu/drm/nouveau/nouveau_dma.h @@ -48,7 +48,6 @@ void nv50_dma_push(struct nouveau_channel *, u64 addr, int length); /* Hardcoded object assignments to subchannels (subchannel id). */ enum { NvSubSw = 1, - NvSubImageBlit = 2, }; /* Object handles - for stuff that's doesn't use handle == oclass. */ |