Skip to content

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

Merged
merged 4 commits into from
Sep 1, 2022
Merged

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Aug 11, 2022

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.

@6by9 6by9 changed the title vc4-kms-v3d COB and interrupt fixes WIP: vc4-kms-v3d COB and interrupt fixes Aug 11, 2022
@6by9
Copy link
Contributor Author

6by9 commented Aug 11, 2022

Hold fire on these - I've just seen glitches on my 4k HDMI screen.
I'm out for a week now, so it'll just have to wait.

6by9 added 4 commits August 11, 2022 17:11
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]>
@6by9
Copy link
Contributor Author

6by9 commented Aug 25, 2022

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.
The HVS doesn't appear to be signalling an underflow, so I couldn't say for certain whether it was HVS or V3D that is stuttering.

These changes don't alter that, and allow triple headed mode.
I probably ought to test with dual 4k30 though.

@6by9 6by9 changed the title WIP: vc4-kms-v3d COB and interrupt fixes vc4-kms-v3d COB and interrupt fixes Aug 25, 2022
@6by9
Copy link
Contributor Author

6by9 commented Sep 1, 2022

It looks like my corruption was a dodgy HDMI lead! I should have thought of that one earlier.

@pelwell pelwell merged commit f64b566 into raspberrypi:rpi-5.15.y Sep 1, 2022
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Sep 5, 2022
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
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Sep 5, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants