vc4: no GAMMA_LUT or CTM on BCM2711 (Pi 4) CRTCs, so no hardware colour management
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- c, linux
- Área
- operating-systems
Línea de trabajo
Start with vc4_crtc_init(), vc4_ctm_commit() and the cited HVS5 change, then trace the BCM2711 gamma and colour-matrix programming described in the issue. The issue asks whether HVS5 colour management or an HDMI CSC matrix approach is viable; done means a maintainer-reviewed design and implementation exposing usable colour-management properties on Pi 4 CRTCs.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
I would like to use the built in video hardware for gamma, brightness & contrast adjustment, and late night tint-shifting on my Raspberry Pi 4. The previous Pis have this and the Pi4 hardware supports it, but is undocumented. (I think the Pi5 has the same issue, but I don't have one so I can't test it).
Thank you,
- Josh
Below is my formal issue generated with AI:
Describe the bug
On a Pi 4, the vc4 CRTCs expose no colour-management properties: there is no GAMMA_LUT, GAMMA_LUT_SIZE, DEGAMMA_LUT or CTM. A KMS client can't do night-light tinting, colour-temperature or gamma adjustment, or colour-blindness filters in the display pipeline, and has to spend a GPU pass on them instead. On the Pi 3 and earlier (HVS4) the same driver offers GAMMA_LUT and a CTM.
From the source, this looks like support that was never written rather than something the hardware lacks:
- vc4_crtc_init() calls drm_crtc_enable_color_mgmt() only when vc4->gen == VC4_GEN_4.
- eb92bc72cd ("drm/vc4: crtc: Disable color management for HVS5", 2020) turned it off "for now", because "The HVS5 uses different color matrices".
- 8d4cd940d5 ("drm/vc4: hvs: Don't write gamma luts on 2711", 2024) notes that "the gamma block has changed in 2711".
- vc4_ctm_commit() still runs for gen <= VC4_GEN_5, but no property can reach it on a 2711.
The same is true in rpi-6.19.y. VC4_GEN_6 (Pi 5) seems to be left out by the same check, but I've only tried a Pi 4.
Is HVS5 colour management (its gamma block and colour matrix) something you'd consider adding? If the register layout can't be published, would a patch be welcome that exposes a CTM through the HDMI block's CSC matrix (the one vc5_hdmi_csc_setup() programs today for limited range and YUV)? That would give a colour matrix on HDMI outputs even without HVS gamma.
Steps to reproduce the behaviour
- Boot a Pi 4 with
dtoverlay=vc4-kms-v3d-pi4and a monitor on HDMI. - List the vc4 CRTC properties, e.g.
modetest -M vc4 -pordrm_info. - Look for
GAMMA_LUT,GAMMA_LUT_SIZE,DEGAMMA_LUTorCTMon the CRTCs.
Expected: GAMMA_LUT (with GAMMA_LUT_SIZE) and CTM, as on a Pi 3.
Actual: none of them. In /sys/kernel/debug/dri/1/state the CRTCs show color_mgmt_changed=0 and no gamma or CTM state.
Device (s)
Raspberry Pi 4 Mod. B
System
- Kernel: 6.12.47-v8, Raspberry Pi tag
stable_20250916, built withbcm2711_defconfig(custom Buildroot image, not Raspberry Pi OS) - Firmware: Raspberry Pi firmware matching that tag (start4.elf)
config.txt:dtoverlay=vc4-kms-v3d-pi4,hdmi_enable_4kp60=1,max_framebuffers=2,disable_overscan=1- Display: 3440x1440 @ 60 Hz on HDMI 1
Logs
None. Nothing fails: the properties just aren't created.
Additional context
The use case is a KMS compositor that wants night-light and colour filters at no per-frame cost, covering the hardware cursor and overlay planes too. A shader can only approximate that: it can't tint the cursor plane or direct-scanout video planes, and a gamma curve applied per layer isn't exact where translucent layers blend.
- Lenguaje dominante
- C
- Estrellas
- 13.4k
- Forks
- 5.5k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 37
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de raspberrypi/linux
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
raspberrypi/linux#7822 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
raspberrypi/linux#7415 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace appAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
raspberrypi/linux#7399 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Documentation update requiredAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
raspberrypi/linux#7357 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
raspberrypi/linux#7054 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de raspberrypi/linux
Issues similares
-
CF_CFDP_S_SendFileData computes the file checksum from the SB buffer after CFE_SB_TransmitBufferAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
389ds/389-ds-base#8251 ·
Los mantenedores suelen responder en 1 día
-
ColumnDecimal::Append(Int128) stores a value outside the Decimal(P, S) range with no error: cut to 32/64 bits, or with too many digitsPosiblemente ocupada @RUSHIT305 la tomó hoy. Abiertobug data-types
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ClickHouse/clickhouse-cpp#645 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ROCm/hrx-system#3628 ·
Los mantenedores suelen responder en 1 día