Store the source-buffer parameters of drm_fb_xrgb8888_to_abgr8888() in struct drm_pixmap. Update the function's interface and all of its callers. Callers of drm_fb_xrgb8888_to_abgr8888() initialize the pixmap's instance from a pre-existing instance of struct drm_framebuffer. There's potential to simplify some of that code in a later patch. Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx> --- drivers/gpu/drm/drm_format_helper.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_format_helper.c b/drivers/gpu/drm/drm_format_helper.c index 9798b77c4a2db..74271acc2b80d 100644 --- a/drivers/gpu/drm/drm_format_helper.c +++ b/drivers/gpu/drm/drm_format_helper.c @@ -800,17 +800,12 @@ static void drm_fb_xrgb8888_to_abgr8888_line(void *dbuf, const void *sbuf, unsig } static void drm_fb_xrgb8888_to_abgr8888(struct iosys_map *dst, const unsigned int *dst_pitch, - const struct iosys_map *src, - const struct drm_framebuffer *fb, - const struct drm_rect *clip, + const struct drm_pixmap *src_pix, struct drm_format_conv_state *state) { static const u8 dst_pixsize[DRM_FORMAT_MAX_PLANES] = { 4, }; - struct drm_pixmap pixmap; - struct drm_pixmap *src_pix = &pixmap; - drm_pixmap_init_from_framebuffer(src_pix, fb, src, clip); drm_fb_xfrm(dst, dst_pitch, dst_pixsize, src_pix, false, state, drm_fb_xrgb8888_to_abgr8888_line); @@ -1092,7 +1087,7 @@ int drm_fb_blit(struct iosys_map *dst, const unsigned int *dst_pitch, uint32_t d drm_fb_xrgb8888_to_xbgr8888(dst, dst_pitch, src, fb, clip, state); return 0; } else if (dst_format == DRM_FORMAT_ABGR8888) { - drm_fb_xrgb8888_to_abgr8888(dst, dst_pitch, src, fb, clip, state); + drm_fb_xrgb8888_to_abgr8888(dst, dst_pitch, src_pix, state); return 0; } else if (dst_format == DRM_FORMAT_XRGB2101010) { drm_fb_xrgb8888_to_xrgb2101010(dst, dst_pitch, src, fb, clip, state); -- 2.43.0