[PATCH 03/17] drm/cirrus: Use drm_fb_blit() to update scanout buffer
Thomas Zimmermann
tzimmermann at suse.de
Wed Feb 15 16:15:03 UTC 2023
Cirrus' blit helper reimplements code from the shared blit helper
drm_fb_blit(). Use the helper instead.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
---
drivers/gpu/drm/tiny/cirrus.c | 15 +--------------
1 file changed, 1 insertion(+), 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);
--
2.39.1
More information about the dri-devel
mailing list