aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs2020-06-22 14:27:41 +1000
committerBen Skeggs2020-07-24 18:51:04 +1000
commita38f83d9014d14b7c6d0b53fd669b62684a11059 (patch)
tree7bc7350e321fe1dd7df22296dc9758aa40df4258
parent95b1469e5cbaad02bc48043d4e159c6562b556b4 (diff)
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>
-rw-r--r--drivers/gpu/drm/nouveau/nv50_fbcon.c17
-rw-r--r--drivers/gpu/drm/nouveau/nvc0_fbcon.c17
2 files changed, 20 insertions, 14 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);
diff --git a/drivers/gpu/drm/nouveau/nvc0_fbcon.c b/drivers/gpu/drm/nouveau/nvc0_fbcon.c
index 4a09b7ecb30a..7908a1a3e00f 100644
--- a/drivers/gpu/drm/nouveau/nvc0_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nvc0_fbcon.c
@@ -52,17 +52,20 @@ nvc0_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
return ret;
if (rect->rop != ROP_COPY) {
- PUSH_NVIM(push, NV902D, 0x02ac, 1);
+ PUSH_IMMD(push, NV902D, SET_OPERATION,
+ NVDEF(NV902D, SET_OPERATION, V, ROP_AND));
}
- PUSH_NVSQ(push, NV902D, 0x0588, colour);
- PUSH_NVSQ(push, NV902D, 0x0600, rect->dx,
- 0x0604, rect->dy,
- 0x0608, rect->dx + rect->width,
- 0x060c, rect->dy + rect->height);
+ PUSH_MTHD(push, NV902D, SET_RENDER_SOLID_PRIM_COLOR, colour);
+
+ PUSH_MTHD(push, NV902D, 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_NVIM(push, NV902D, 0x02ac, 3);
+ PUSH_IMMD(push, NV902D, SET_OPERATION,
+ NVDEF(NV902D, SET_OPERATION, V, SRCCOPY));
}
PUSH_KICK(push);