summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tiny
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-02-15 17:15:03 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2023-03-13 10:36:00 +0100
commitcc158d0e9b0866d3626a81c13542d3be8f1477a5 (patch)
tree554e554b5280a6f97a2713d952315cf5fdb6edef /drivers/gpu/drm/tiny
parent5635adcb34b3f402dc013446d9e57eb534ab8c48 (diff)
drm/cirrus: Use drm_fb_blit() to update scanout buffer
Cirrus' blit helper reimplements code from the shared blit helper drm_fb_blit(). Use the helper instead. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-4-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/tiny')
-rw-r--r--drivers/gpu/drm/tiny/cirrus.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/gpu/drm/tiny/cirrus.c b/drivers/gpu/drm/tiny/cirrus.c
index 67e83fa42a32..71fa07535298 100644
--- a/drivers/gpu/drm/tiny/cirrus.c
+++ b/drivers/gpu/drm/tiny/cirrus.c
@@ -329,20 +329,7 @@ static int cirrus_fb_blit_rect(struct drm_framebuffer *fb,
iosys_map_set_vaddr_iomem(&dst, cirrus->vram);
iosys_map_incr(&dst, drm_fb_clip_offset(cirrus->pitch, fb->format, rect));
- if (cirrus->format == fb->format) {
- drm_fb_memcpy(&dst, fb->pitches, vmap, fb, rect);
-
- } else if (fb->format->format == DRM_FORMAT_XRGB8888 &&
- cirrus->format->format == DRM_FORMAT_RGB565) {
- drm_fb_xrgb8888_to_rgb565(&dst, &cirrus->pitch, vmap, fb, rect, false);
-
- } else if (fb->format->format == DRM_FORMAT_XRGB8888 &&
- cirrus->format->format == DRM_FORMAT_RGB565) {
- drm_fb_xrgb8888_to_rgb888(&dst, &cirrus->pitch, vmap, fb, rect);
-
- } else {
- WARN_ON_ONCE("cpp mismatch");
- }
+ drm_fb_blit(&dst, &cirrus->pitch, cirrus->format->format, vmap, fb, rect);
drm_dev_exit(idx);