drm/format-helper: Rework XRGB8888-to-MONO conversion

Update XRGB8888-to-MONO conversion to support struct iosys_map
and convert all users. Although these are single-plane color formats,
the new interface supports multi-plane formats for consistency with
drm_fb_blit().

v2:
	* rebase after renaming CMA helpers to DMA helpers
	* update documentation (Sam)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Tested-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220808125406.20752-13-tzimmermann@suse.de
This commit is contained in:
Thomas Zimmermann 2022-08-08 14:54:04 +02:00
parent 7bef64490f
commit b3aca563d6
4 changed files with 49 additions and 25 deletions

View file

@ -40,7 +40,8 @@ int drm_fb_blit(struct iosys_map *dst, const unsigned int *dst_pitch, uint32_t d
const struct iosys_map *vmap, const struct drm_framebuffer *fb,
const struct drm_rect *rect);
void drm_fb_xrgb8888_to_mono(void *dst, unsigned int dst_pitch, const void *src,
const struct drm_framebuffer *fb, const struct drm_rect *clip);
void drm_fb_xrgb8888_to_mono(struct iosys_map *dst, const unsigned int *dst_pitch,
const struct iosys_map *vmap, const struct drm_framebuffer *fb,
const struct drm_rect *clip);
#endif /* __LINUX_DRM_FORMAT_HELPER_H */