You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kms/RPi4: 4096x2160-30 output broken since clock request changes #4339
Describe the bug
Trying to use 4096x2160-30 on RPi4 with kms and latest rpi-update kernel results in no signal output and "flip_done timed out" messages in dmesg unless force_turbo=1 is used in config.txt
Additional context
Checking through kernel commits showed that 8b66448 is the first bad version, 9e081a7 is fine.
Comparing clk_summary taken while modetest was running/hanging showed that in the non-working state the core clock was running at 200 MHz while in the working state it was at 500MHz
So, the firmware has two boost requests for core frequency that relate to hdmi.
It requests max core frequency at start of the mode set, that is removed when it completes.
And it requests a frequency roughly proportional to the pixel clock (but it is somewhat complicated) that persists until the next mode change.
I believe the vc4 driver only does the former. And before the "clock request changes" commit, a bug meant the former boost was never removed.
The correct solution is to add the latter request.
FYI @mripard (I'll have to explain the firmware side logic when I understand it myself).
The problem description and the fact that it emerged after the upgrade to kernel 5.10.31 leads me to suspect that this problem is the same encountered by me: #4317
In fact, I can confirm that adding force_turbo=1 to /boot/config.txt results in a working display for me, whereas the monitor reports "No HDMI input signal" without the option set.
I hit this problem too. Bisected to 8b66448 as well.
My use case is playing a 1080p Youtube video in kodi. After the offending commit the video desynchronizes with the audio and gets reset after a while, while the desynchro starts again. Local playback of mp4 files is not affected though.
As mentioned before force_turbo=1 to /boot/config.txt also works here.
I applied both the patches to commit c2f585a, but unfortunately they don't fix my problem on youtube playback. The fw-clk-core is set to 500MHz, but using grep fw-clk-core /sys/kernel/debug/clk/clk_summary. I noticed that it falls back to 200MHz once in a while, about 2-3 every 10s using watch. Not very accurate but the clock switch can be detected this way. Dunno what the effect actually is.
There is also another difference in the clocks which might explain my problem with the video decoding:
Thanks for the update. Unfortunately none of my issues has changed. The fw-clk-core still alternates bewteen 20 and 500 MHz during playback. My youtube playback desyncs on video and audio. And the h264/isp clocks still have a lower frequency than before.
After upgrading to kernel 5.10.42 (pertaining to commit da6937f), my issue still persists: Without force_turbo=1 in /boot/config.txt, my monitor reports "No HDMI input signal" when starting X; it works with force_turbo=1.
The issue is resolved (X launches without force_turbo=1) with kernel 5.10.44 (commit 2b13c54) and EEPROM
BOOTLOADER: up to date
CURRENT: Thu Apr 29 16:11:25 UTC 2021 (1619712685)
LATEST: Thu Apr 29 16:11:25 UTC 2021 (1619712685)
RELEASE: critical (/lib/firmware/raspberrypi/bootloader/critical)
VL805_FW: Using bootloader EEPROM
VL805: up to date
CURRENT: 000138a1
LATEST: 000138a1
Activity
popcornmix commentedon May 12, 2021
So, the firmware has two boost requests for core frequency that relate to hdmi.
It requests max core frequency at start of the mode set, that is removed when it completes.
And it requests a frequency roughly proportional to the pixel clock (but it is somewhat complicated) that persists until the next mode change.
I believe the vc4 driver only does the former. And before the "clock request changes" commit, a bug meant the former boost was never removed.
The correct solution is to add the latter request.
FYI @mripard (I'll have to explain the firmware side logic when I understand it myself).
user13571113 commentedon May 12, 2021
The problem description and the fact that it emerged after the upgrade to kernel 5.10.31 leads me to suspect that this problem is the same encountered by me: #4317
In fact, I can confirm that adding
force_turbo=1to /boot/config.txt results in a working display for me, whereas the monitor reports "No HDMI input signal" without the option set.AlexanderStein commentedon May 25, 2021
I hit this problem too. Bisected to
8b66448as well.My use case is playing a 1080p Youtube video in kodi. After the offending commit the video desynchronizes with the audio and gets reset after a while, while the desynchro starts again. Local playback of mp4 files is not affected though.
As mentioned before
force_turbo=1to /boot/config.txt also works here.mripard commentedon May 26, 2021
#4365 should fix this issue. Can you test and report if it works?
Thanks!
AlexanderStein commentedon May 27, 2021
I applied both the patches to commit c2f585a, but unfortunately they don't fix my problem on youtube playback. The
fw-clk-coreis set to 500MHz, but usinggrep fw-clk-core /sys/kernel/debug/clk/clk_summary. I noticed that it falls back to 200MHz once in a while, about 2-3 every 10s using watch. Not very accurate but the clock switch can be detected this way. Dunno what the effect actually is.There is also another difference in the clocks which might explain my problem with the video decoding:
mripard commentedon Jun 4, 2021
I updated the PR with a few fixes, can you test this new version?
AlexanderStein commentedon Jun 5, 2021
Thanks for the update. Unfortunately none of my issues has changed. The fw-clk-core still alternates bewteen 20 and 500 MHz during playback. My youtube playback desyncs on video and audio. And the h264/isp clocks still have a lower frequency than before.
mripard commentedon Jun 7, 2021
It looks like a separate issue than the one that started this bug report. Can you open a new one? Thanks.
user13571113 commentedon Jun 12, 2021
After upgrading to kernel 5.10.42 (pertaining to commit da6937f), my issue still persists: Without
force_turbo=1in /boot/config.txt, my monitor reports "No HDMI input signal" when starting X; it works withforce_turbo=1.mripard commentedon Jun 16, 2021
Did you test with #4365 ?
popcornmix commentedon Jun 16, 2021
#4365 will be present in today's rpi-update firmwware.
user13571113 commentedon Jun 20, 2021
The issue is resolved (X launches without
force_turbo=1) with kernel 5.10.44 (commit 2b13c54) and EEPROMThank you very much for these updates.
popcornmix commentedon Jun 23, 2021
@HiassofT is this okay to close?