summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nv50_fbcon.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-22 04:31:45 +0300
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 11:50:56 +0300
commita535aa677521f63acbca3804ae42e062a912add0 (patch)
tree58a30023ee72f087fb0e4659df1acc1cdde84c8c /drivers/gpu/drm/nouveau/nv50_fbcon.c
parent9ec525729f59e2885e6f06f6c1cd56665d519b1b (diff)
downloadlinux-a535aa677521f63acbca3804ae42e062a912add0.tar.xz
drm/nouveau/fbcon: convert copyarea() 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/nv50_fbcon.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_fbcon.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_fbcon.c b/drivers/gpu/drm/nouveau/nv50_fbcon.c
index 6d122b045f4c..cbdd473acd9f 100644
--- a/drivers/gpu/drm/nouveau/nv50_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nv50_fbcon.c
@@ -73,25 +73,23 @@ nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region)
struct nouveau_fbdev *nfbdev = info->par;
struct nouveau_drm *drm = nouveau_drm(nfbdev->helper.dev);
struct nouveau_channel *chan = drm->channel;
+ struct nvif_push *push = chan->chan.push;
int ret;
- ret = RING_SPACE(chan, 12);
+ ret = PUSH_WAIT(push, 12);
if (ret)
return ret;
- BEGIN_NV04(chan, NvSub2D, 0x0110, 1);
- OUT_RING(chan, 0);
- BEGIN_NV04(chan, NvSub2D, 0x08b0, 4);
- OUT_RING(chan, region->dx);
- OUT_RING(chan, region->dy);
- OUT_RING(chan, region->width);
- OUT_RING(chan, region->height);
- BEGIN_NV04(chan, NvSub2D, 0x08d0, 4);
- OUT_RING(chan, 0);
- OUT_RING(chan, region->sx);
- OUT_RING(chan, 0);
- OUT_RING(chan, region->sy);
- FIRE_RING(chan);
+ PUSH_NVSQ(push, NV502D, 0x0110, 0);
+ PUSH_NVSQ(push, NV502D, 0x08b0, region->dx,
+ 0x08b4, region->dy,
+ 0x08b8, region->width,
+ 0x08bc, region->height);
+ PUSH_NVSQ(push, NV502D, 0x08d0, 0,
+ 0x08d4, region->sx,
+ 0x08d8, 0,
+ 0x08dc, region->sy);
+ PUSH_KICK(push);
return 0;
}