Fix the selection of the fbdev emulation's color format and make XRGB8888 the only emulated color format. Resolves the blank screen in cases where video= specifies an unsupported color format. Also resolves the issues around current format-conversion helpers. DRM drivers usually pick a default format for their fbdev emulation. Via the kernel's video= parameter, users can specify a different format. If the given format is unsupported by the driver, the fbdev console screen remains dark. As the console is essential to many systems, not displaying anything is to be avoided. Patch 1 fixes the detection of the firmware's native color format. The meaning of several color parameters is inconsistent among Linux and various standards. Take this into account. As drivers are supposed to provide XRGB8888 as a default fallback format, provide XRGB8888 conversion helpers in patches 2 to 5. The new helpers handle cases where the client uses a XRGB8888 frambuffer and the display scanout buffer uses a different format. All scanout formats of the simplefb infrastructure should now be covered. The patchse also extend the Kunit tests for the new formats. With format conversion in place, patches 6 and 7 fix the single-probe function's format selection. The helper now goes over the given video= parameters until it finds a compatible format. If none is found, the uses driver's default format. Patches 8 and 9 clean up DRM code in drivers and helpers. Tested on x86-64 with EFI output and x86 with various VESA color modes. Also tested on ppc64 with OF output. Thomas Zimmermann (9): firmware/sysfb: Fix EFI/VESA format selection drm/format-helper: Flip src/dst-format branches in blit helper drm/format-helper: Add conversion from XRGB8888 to ARGB8888 drm/format-helper: Add conversion from XRGB8888 to ARGB2101010 drm/format-helper: Add conversion from XRGB8888 to 15-bit RGB555 formats drm/fh-helper: Split fbdev single-probe helper drm/fb-helper: Fix single-probe color-format selection drm/format-helper: Simplify drm_fb_build_fourcc_list() drm/format-helper: Remove unnecessary conversion helpers drivers/firmware/sysfb_simplefb.c | 43 +- drivers/gpu/drm/drm_fb_helper.c | 252 ++++++---- drivers/gpu/drm/drm_format_helper.c | 454 +++++++++++++----- .../gpu/drm/tests/drm_format_helper_test.c | 312 ++++++++++++ drivers/gpu/drm/tiny/ofdrm.c | 20 - drivers/gpu/drm/tiny/simpledrm.c | 21 - include/drm/drm_format_helper.h | 16 +- 7 files changed, 835 insertions(+), 283 deletions(-) base-commit: d322881f7e33af24901ee8ccaec3beef82f21203 prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24 prerequisite-patch-id: 3f204510fcbf9530d6540bd8e6128cce598988b6 -- 2.38.1