Commit c548b25c authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/kms/nv04: convert page_flip() to new push macros

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 105f756c
...@@ -1157,6 +1157,7 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, ...@@ -1157,6 +1157,7 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
struct nouveau_cli *cli; struct nouveau_cli *cli;
struct nouveau_fence *fence; struct nouveau_fence *fence;
struct nv04_display *dispnv04 = nv04_display(dev); struct nv04_display *dispnv04 = nv04_display(dev);
struct nvif_push *push;
int head = nouveau_crtc(crtc)->index; int head = nouveau_crtc(crtc)->index;
int ret; int ret;
...@@ -1164,6 +1165,7 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, ...@@ -1164,6 +1165,7 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
if (!chan) if (!chan)
return -ENODEV; return -ENODEV;
cli = (void *)chan->user.client; cli = (void *)chan->user.client;
push = chan->chan.push;
s = kzalloc(sizeof(*s), GFP_KERNEL); s = kzalloc(sizeof(*s), GFP_KERNEL);
if (!s) if (!s)
...@@ -1205,18 +1207,14 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, ...@@ -1205,18 +1207,14 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
/* Emit a page flip */ /* Emit a page flip */
if (swap_interval) { if (swap_interval) {
ret = RING_SPACE(chan, 8); ret = PUSH_WAIT(push, 8);
if (ret) if (ret)
goto fail_unreserve; goto fail_unreserve;
BEGIN_NV04(chan, NvSubImageBlit, 0x012c, 1); PUSH_NVSQ(push, NV05F, 0x012c, 0);
OUT_RING (chan, 0); PUSH_NVSQ(push, NV05F, 0x0134, head);
BEGIN_NV04(chan, NvSubImageBlit, 0x0134, 1); PUSH_NVSQ(push, NV05F, 0x0100, 0);
OUT_RING (chan, head); PUSH_NVSQ(push, NV05F, 0x0130, 0);
BEGIN_NV04(chan, NvSubImageBlit, 0x0100, 1);
OUT_RING (chan, 0);
BEGIN_NV04(chan, NvSubImageBlit, 0x0130, 1);
OUT_RING (chan, 0);
} }
nouveau_bo_ref(new_bo, &dispnv04->image[head]); nouveau_bo_ref(new_bo, &dispnv04->image[head]);
......
...@@ -48,7 +48,6 @@ void nv50_dma_push(struct nouveau_channel *, u64 addr, int length); ...@@ -48,7 +48,6 @@ void nv50_dma_push(struct nouveau_channel *, u64 addr, int length);
/* Hardcoded object assignments to subchannels (subchannel id). */ /* Hardcoded object assignments to subchannels (subchannel id). */
enum { enum {
NvSubSw = 1, NvSubSw = 1,
NvSubImageBlit = 2,
}; };
/* Object handles - for stuff that's doesn't use handle == oclass. */ /* Object handles - for stuff that's doesn't use handle == oclass. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment