Commit a38f83d9 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/fbcon/nv50-: use NVIDIA's headers for fillrect()

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 95b1469e
...@@ -52,17 +52,20 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ...@@ -52,17 +52,20 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
return ret; return ret;
if (rect->rop != ROP_COPY) { 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_MTHD(push, NV502D, SET_RENDER_SOLID_PRIM_COLOR, colour);
PUSH_NVSQ(push, NV502D, 0x0600, rect->dx,
0x0604, rect->dy, PUSH_MTHD(push, NV502D, RENDER_SOLID_PRIM_POINT_SET_X(0), rect->dx,
0x0608, rect->dx + rect->width, RENDER_SOLID_PRIM_POINT_Y(0), rect->dy,
0x060c, rect->dy + rect->height); 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) { 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); PUSH_KICK(push);
......
...@@ -52,17 +52,20 @@ nvc0_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ...@@ -52,17 +52,20 @@ nvc0_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
return ret; return ret;
if (rect->rop != ROP_COPY) { 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_MTHD(push, NV902D, SET_RENDER_SOLID_PRIM_COLOR, colour);
PUSH_NVSQ(push, NV902D, 0x0600, rect->dx,
0x0604, rect->dy, PUSH_MTHD(push, NV902D, RENDER_SOLID_PRIM_POINT_SET_X(0), rect->dx,
0x0608, rect->dx + rect->width, RENDER_SOLID_PRIM_POINT_Y(0), rect->dy,
0x060c, rect->dy + rect->height); 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) { 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); PUSH_KICK(push);
......
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