summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_fbcon.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-22 14:27:41 +1000
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 18:51:04 +1000
commita38f83d9014d14b7c6d0b53fd669b62684a11059 (patch)
tree7bc7350e321fe1dd7df22296dc9758aa40df4258 /drivers/gpu/drm/nouveau/nv50_fbcon.c
parent95b1469e5cbaad02bc48043d4e159c6562b556b4 (diff)
downloadlinux-a38f83d9014d14b7c6d0b53fd669b62684a11059.tar.bz2
drm/nouveau/fbcon/nv50-: use NVIDIA's headers for fillrect()
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.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_fbcon.c b/drivers/gpu/drm/nouveau/nv50_fbcon.c
index abab600056ae..71f92e4750f9 100644
--- a/drivers/gpu/drm/nouveau/nv50_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nv50_fbcon.c
@@ -52,17 +52,20 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
return ret;
if (rect->rop != ROP_COPY) {
- PUSH_NVSQ(push, NV502D, 0x02ac, 1);
+ PUSH_MTHD(push, NV502D, SET_OPERATION,
+ NVDEF(NV502D, SET_OPERATION, V, ROP_AND));
}
- PUSH_NVSQ(push, NV502D, 0x0588, colour);
- PUSH_NVSQ(push, NV502D, 0x0600, rect->dx,
- 0x0604, rect->dy,
- 0x0608, rect->dx + rect->width,
- 0x060c, rect->dy + rect->height);
+ PUSH_MTHD(push, NV502D, SET_RENDER_SOLID_PRIM_COLOR, colour);
+
+ PUSH_MTHD(push, NV502D, RENDER_SOLID_PRIM_POINT_SET_X(0), rect->dx,
+ RENDER_SOLID_PRIM_POINT_Y(0), rect->dy,
+ RENDER_SOLID_PRIM_POINT_SET_X(1), rect->dx + rect->width,
+ RENDER_SOLID_PRIM_POINT_Y(1), rect->dy + rect->height);
if (rect->rop != ROP_COPY) {
- PUSH_NVSQ(push, NV502D, 0x02ac, 3);
+ PUSH_MTHD(push, NV502D, SET_OPERATION,
+ NVDEF(NV502D, SET_OPERATION, V, SRCCOPY));
}
PUSH_KICK(push);