diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-02-15 19:15:03 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-03-13 12:36:00 +0300 |
commit | cc158d0e9b0866d3626a81c13542d3be8f1477a5 (patch) | |
tree | 554e554b5280a6f97a2713d952315cf5fdb6edef /drivers/gpu/drm | |
parent | 5635adcb34b3f402dc013446d9e57eb534ab8c48 (diff) | |
download | linux-cc158d0e9b0866d3626a81c13542d3be8f1477a5.tar.xz |
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')
-rw-r--r-- | drivers/gpu/drm/tiny/cirrus.c | 15 |
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); |