summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-22 14:16:03 +1000
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 18:51:03 +1000
commit95b1469e5cbaad02bc48043d4e159c6562b556b4 (patch)
tree337620ca312426505ff3308a604b99196900ff59 /drivers/gpu/drm
parentc7acff989428533f5877f02f57c97743ece6f1f0 (diff)
drm/nouveau/fbcon/nv50-: use NVIDIA's headers for copyarea()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_fbcon.c20
-rw-r--r--drivers/gpu/drm/nouveau/nvc0_fbcon.c20
2 files changed, 22 insertions, 18 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_fbcon.c b/drivers/gpu/drm/nouveau/nv50_fbcon.c
index d99679086043..abab600056ae 100644
--- a/drivers/gpu/drm/nouveau/nv50_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nv50_fbcon.c
@@ -82,15 +82,17 @@ nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region)
if (ret)
return ret;
- 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_MTHD(push, NV502D, WAIT_FOR_IDLE, 0);
+
+ PUSH_MTHD(push, NV502D, SET_PIXELS_FROM_MEMORY_DST_X0, region->dx,
+ SET_PIXELS_FROM_MEMORY_DST_Y0, region->dy,
+ SET_PIXELS_FROM_MEMORY_DST_WIDTH, region->width,
+ SET_PIXELS_FROM_MEMORY_DST_HEIGHT, region->height);
+
+ PUSH_MTHD(push, NV502D, SET_PIXELS_FROM_MEMORY_SRC_X0_FRAC, 0,
+ SET_PIXELS_FROM_MEMORY_SRC_X0_INT, region->sx,
+ SET_PIXELS_FROM_MEMORY_SRC_Y0_FRAC, 0,
+ PIXELS_FROM_MEMORY_SRC_Y0_INT, region->sy);
PUSH_KICK(push);
return 0;
}
diff --git a/drivers/gpu/drm/nouveau/nvc0_fbcon.c b/drivers/gpu/drm/nouveau/nvc0_fbcon.c
index dd8e3e65ad84..4a09b7ecb30a 100644
--- a/drivers/gpu/drm/nouveau/nvc0_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nvc0_fbcon.c
@@ -82,15 +82,17 @@ nvc0_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region)
if (ret)
return ret;
- PUSH_NVIM(push, NV902D, 0x0110, 0);
- PUSH_NVSQ(push, NV902D, 0x08b0, region->dx,
- 0x08b4, region->dy,
- 0x08b8, region->width,
- 0x08bc, region->height);
- PUSH_NVSQ(push, NV902D, 0x08d0, 0,
- 0x08d4, region->sx,
- 0x08d8, 0,
- 0x08dc, region->sy);
+ PUSH_IMMD(push, NV902D, WAIT_FOR_IDLE, 0);
+
+ PUSH_MTHD(push, NV902D, SET_PIXELS_FROM_MEMORY_DST_X0, region->dx,
+ SET_PIXELS_FROM_MEMORY_DST_Y0, region->dy,
+ SET_PIXELS_FROM_MEMORY_DST_WIDTH, region->width,
+ SET_PIXELS_FROM_MEMORY_DST_HEIGHT, region->height);
+
+ PUSH_MTHD(push, NV902D, SET_PIXELS_FROM_MEMORY_SRC_X0_FRAC, 0,
+ SET_PIXELS_FROM_MEMORY_SRC_X0_INT, region->sx,
+ SET_PIXELS_FROM_MEMORY_SRC_Y0_FRAC, 0,
+ PIXELS_FROM_MEMORY_SRC_Y0_INT, region->sy);
PUSH_KICK(push);
return 0;
}