-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KMS: incorrect gamma / overly bright image with 2 monitors #4676
Comments
With 2 monitors I get this warn when booting to desktop following the gamma PRs:
If I revert #4664 the WARN is gone and the brightness is fixed. EDIT: brightness was wrong on a reboot. I do need to revert #4435 too for brightness fix. |
Two independent things - please be careful not to conflate issues. vc5 HVS keeps the gamma block enabled as it isn't safe to enable/disable it randomly (although as we're now always doing a mode switch it may be possible). It isn't clearing the gamma table though, so it is enabled with whatever was left in the SRAMs. Refcounting I have no idea on at present. |
Doh, refcounting is stupid. |
Another data point: Gamma is also off with a single monitor connected to HDMI1. Tested with rpi-update kernel raspberrypi/rpi-firmware@992de83 (so just gamma LUT support, but not the recent change check commit) and Right after boot I get these hvs_gamma values:
|
The PWLs are initialised in vc4_crtc_init https://github.com/raspberrypi/linux/blob/rpi-5.10.y/drivers/gpu/drm/vc4/vc4_crtc.c#L1238 The issue seems to be that the gamma block is not in a state to be written to from As we always disable/enable the pipeline for gamma changes on 2711, I'm tempted to disable the gamma block on demand as mentioned above. |
Describe the bug
When running kernel 5.10.76 on RPi4 with KMS and two HDMI monitors connected the gamma values seem to be completely off and the displayed image is overly bright and has wrong colors.
This doesn't happen with just a single HDMI monitor connected or when using kernel 5.10.75 or earlier.
To reproduce
modetest -s ...
egmodetest -s 32:1920x1200-60
Expected behaviour
The test pattern is shown with correct colors:
Actual behaviour
The test pattern is shown with wrong colors:
System
RPi4, initially reported and reproduced on LibreELEC but the same happens on RPi-OS, too. eg with current rpi-update kernel:
rpi-update kernel 992de83e0ea01a9765196349abb386c5c8ea8944 has this issue, too
but c59a637736f579733dfed9c62235c180471bbcba is OK
Additional context
With a single monitor connected hvs_gamma in debugfs looks OK:
with two monitors the values in hvs_gamma look very odd
ping @6by9
The text was updated successfully, but these errors were encountered: