drm/fb-helper: Fix single-probe color-format selection
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 2 Jan 2023 11:29:25 +0000 (12:29 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 3 Jan 2023 13:27:12 +0000 (14:27 +0100)
commit37c90d589dc06c1ae19b5eb4ed79e7a70ccc21bf
treedcab9760a789aa2a46a56d6d4e6e7df6446a04d7
parentcff84bac99220029ca2e3fd974281cd760ca35c0
drm/fb-helper: Fix single-probe color-format selection

Fix the color-format selection of the single-probe helper. Go
through all user-specified values and test each for compatibility
with the driver. If none is supported, use the driver-provided
default. This guarantees that the console is always available in
any color format at least.

Until now, the format selection of the single-probe helper tried
to either use a user-specified format or a 32-bit default format.
If the user-specified format was not supported by the driver, the
selection failed and the display remained blank.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-12-tzimmermann@suse.de
drivers/gpu/drm/drm_fb_helper.c