drm/format-helper: Add drm_fb_build_fourcc_list() helper
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 5 Sep 2022 14:16:48 +0000 (16:16 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 12 Sep 2022 07:15:49 +0000 (09:15 +0200)
commit4a85b0b51e211fba03c081e1e47f8871e4b3088f
tree8ec874f553d839f2aef97a910124949de95eaf3e
parent385d1bba890f9b94322ca7fdfa778311f1ea0813
drm/format-helper: Add drm_fb_build_fourcc_list() helper

Add drm_fb_build_fourcc_list() function that builds a list of supported
formats from native and emulated ones. Helpful for all drivers that do
format conversion as part of their plane updates. Update current caller.

v3:
* improve warnings on ignored formats (Sam)
v2:
* use u32 instead of uint32_t (Sam)
* print a warning if output array is too small (Sam)
* comment fixes (Sam)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220905141648.22013-5-tzimmermann@suse.de
drivers/gpu/drm/drm_format_helper.c
drivers/gpu/drm/tiny/simpledrm.c
include/drm/drm_format_helper.h