-
Notifications
You must be signed in to change notification settings - Fork 5.2k
vc4-kms-v3d COB and interrupt fixes #5121
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
Conversation
Hold fire on these - I've just seen glitches on my 4k HDMI screen. |
The HVS Composite Output Buffer (COB) is the memory used to generate the output pixel data. Until now the vc4 driver has been relying on the firmware to have set these to sensible values. In testing triple screen support it has been noted that only 1 line was being assigned to HVS channel 2. Whilst that is fine for the transposer (TXP), and indeed needed as only some pixels have an alpha channel, it is insufficient to run a live display. Split the COB more evenly between the 3 HVS channels. Signed-off-by: Dave Stevenson <[email protected]> Revert vc4_regs change
The HVS can change AXI request mode based on how full the COB FIFOs are. Until now the vc4 driver has been relying on the firmware to have set these to sensible values. With HVS channel 2 now being used for live video, change the panic mode for all channels to be explicitly set by the driver, and the same for all channels. Signed-off-by: Dave Stevenson <[email protected]>
The bit used for SCALER_DISPBKGND_AUTOHS in SCALER_DISPBKGNDX has been repurposed on HVS5 to configure whether a display can win back-to-back arbitration wins for the COB. This is not desirable, therefore only select this bit on HVS4, and explicitly clear it on HVS5. Signed-off-by: Dave Stevenson <[email protected]>
HVS5 has moved the interrupt enable bits around within the DISPCTRL register, therefore the configuration has to be updated to account for this. Signed-off-by: Dave Stevenson <[email protected]>
It looks like things may just be on the edge with 4k60. On this CM4, a standard Raspberry Pi OS image (5.15.32 kernel) is showing occasional horizontal glitched lines (generally browny noise) if running HDMI at 4k60 and running something like iPlayer video decode. Dropping to 4k30 is clean. These changes don't alter that, and allow triple headed mode. |
It looks like my corruption was a dodgy HDMI lead! I should have thought of that one earlier. |
kernel: configs: Add LAN7430 driver on BCM2711 See: raspberrypi/linux#4117 kernel: Add a pullup/down parameter to PPS DTBO See: raspberrypi/linux#5154 kernel: hwmon: (lm75) Add Atmel AT30TS74 support See: raspberrypi/linux#5158 kernel: vc4-kms-v3d COB and interrupt fixes See: raspberrypi/linux#5121 kernel: Unicam dummy buffer overrun fix See: raspberrypi/linux#5157 kernel: ASoC:ma120x0p: Extend the volume range to -144dB (mute) See: raspberrypi/linux#5160
kernel: configs: Add LAN7430 driver on BCM2711 See: raspberrypi/linux#4117 kernel: Add a pullup/down parameter to PPS DTBO See: raspberrypi/linux#5154 kernel: hwmon: (lm75) Add Atmel AT30TS74 support See: raspberrypi/linux#5158 kernel: vc4-kms-v3d COB and interrupt fixes See: raspberrypi/linux#5121 kernel: Unicam dummy buffer overrun fix See: raspberrypi/linux#5157 kernel: ASoC:ma120x0p: Extend the volume range to -144dB (mute) See: raspberrypi/linux#5160
The COB allocation changes could do with some stress testing.
This PR has stemmed from testing triple head modes, and finding that the code enabling underrun interrupts was actually enabling other events for HVS channel 2, which then weren't handled and caused bad things to happen.
With these changes I've got 4k HDMI and dual DSI (800x480) running happily in X. I haven't got dual 4k monitors to hand to test.