From: Thomas Zimmermann Date: Tue, 1 Apr 2025 09:37:21 +0000 (+0200) Subject: drm/sysfb: vesadrm: Add gamma correction X-Git-Tag: v6.16-rc1~144^2~21^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=814d270b31d27b6ea4f722b8ae2db9802fe332ff;p=thirdparty%2Flinux.git drm/sysfb: vesadrm: Add gamma correction Add palette support and export GAMMA properties via sysfs. User-space compositors can use this interface for programming gamma ramps or night mode. Vesadrm supports palette updates via VGA DAC registers or VESA palette calls. Up to 256 palette entries are available. Userspace always supplies gamma ramps of 256 entries. If the native color format does not match this because pixel component have less then 8 bits, vesadrm interpolates among the palette entries. The code uses CamelCase style in a few places to match the VESA manuals. v3: - fix coding style v2: - use CONFIG_X86_32 instead of __i386__ (checkpatch) - protect struct vesadrm.pmi with CONFIG_X86_32 Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-19-tzimmermann@suse.de --- diff --git a/drivers/gpu/drm/sysfb/vesadrm.c b/drivers/gpu/drm/sysfb/vesadrm.c index 07f59880ce0f9..9cc50e3072ead 100644 --- a/drivers/gpu/drm/sysfb/vesadrm.c +++ b/drivers/gpu/drm/sysfb/vesadrm.c @@ -25,6 +25,7 @@ #include