]> Gentwo Git Trees - linux/.git/commit
drm/vesadrm: Support DRM_FORMAT_C8
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 14 Jul 2025 15:13:09 +0000 (17:13 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 26 Aug 2025 07:54:20 +0000 (09:54 +0200)
commit7399c13f619f33dc8bdce838f3c83e88a18765ee
tree273fa285757b00d6299072c2d30901a4b3caae06
parent1adb35c2523fcd06cf1c24d788d6a958a24bc143
drm/vesadrm: Support DRM_FORMAT_C8

Add support for DRM_FORMAT_C8 to vesadrm. The new pixel-format
description PIXEL_FORMAT_C8 describes the layout. Vesadrm's helpers
vesadrm_fill_palette_lut() and vesadrm_load_palette_lut() set the
hardware palette according to the CRTC's output format.

The driver emulates XRGB8888 by converting the source buffer to
RGB332 and using the resulting 256 colors as index into the hardware
palette. The hardware palette converts back to RGB during scanout.
This has no overhead compared to other format conversion, but allows
common userspace, such as Wayland compositors, to operate on the
display.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250714151513.309475-10-tzimmermann@suse.de
drivers/gpu/drm/sysfb/vesadrm.c
include/video/pixel_format.h