Repository navigation
drm/vc4: fkms: Don't put BCM2712 buffers behind the HVS IOMMU - #7769
Merged
Merged
Conversation
vc4_drm_bind() copies the DMA configuration of the HVS node to the vc4 device and gives BCM2712 a 36-bit DMA mask. With firmware KMS this puts the buffers behind the HVS IOMMU at 36-bit IOVAs, but the firmware's set-plane call only takes a 32-bit address and scans out without the IOMMU, so the display shows random memory. Skip the HVS DMA configuration and keep a 32-bit mask when firmware KMS is used on BCM2712, and recognise the 2712 firmware KMS node in firmware_kms() so the firmware display driver isn't told to stop. Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Collaborator
Author
|
I know we don't strongly support this, but it used to work and testing if anything bad happens with suspend/resume using fkms showed this had broken, and had a fairly simple fix. |
6by9
approved these changes
Nov 17, 2026
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Nov 18, 2026
See: raspberrypi/linux#7766 kernel: drm/vc4: fkms: Don't put BCM2712 buffers behind the HVS IOMMU See: raspberrypi/linux#7769 kernel: drm/vc4: Fix plane scaling edge cases that corrupt other planes See: raspberrypi/linux#7702 kernel: clocksource/drivers/bcm2835_timer: Detect missed compare matches See: raspberrypi/linux#7765
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Nov 18, 2026
See: raspberrypi/linux#7766 kernel: drm/vc4: fkms: Don't put BCM2712 buffers behind the HVS IOMMU See: raspberrypi/linux#7769 kernel: drm/vc4: Fix plane scaling edge cases that corrupt other planes See: raspberrypi/linux#7702 kernel: clocksource/drivers/bcm2835_timer: Detect missed compare matches See: raspberrypi/linux#7765
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
dtoverlay=vc4-fkms-v3don Pi 5 the screen shows random memory once the vc4 driver loads.vc4_drm_bind()copies the HVS node's DMA configuration onto the vc4 device and sets a 36-bit DMA mask on BCM2712. That attaches the device to the HVS IOMMU (late IOMMU probe at driver bind, something fishy here!), so buffers get 36-bit IOVAs. The firmware's set-plane call only takes a 32-bit address and the firmware scans out without the IOMMU, so the HVS reads the wrong memory.This change:
0xc0000000bus alias)raspberrypi,rpi-firmware-kms-2712tofirmware_kms(), so the firmware display driver is no longer sentNOTIFY_DISPLAY_DONEunder firmware KMS on Pi 5Tested with fkms on Pi 3B+, Pi 4B and Pi 5; the picture is correct on all three.
0x0d800000(CMA).0xc0000000bus alias (0xcf700000), as before.