Revert: bcm2708_fb: Hack out dma support #5648
Merged
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.
This was hacked out for pi5 bringup, but breaks vclog on Pi2/3.
I've tested with this back in on Pi3, Pi4, and Pi5. (with kms driver disabled, as kms stops bcm2708_fb from being used).
Pi3 and Pi4 work correctly. vclog now uses the dma interface correctly.
Pi5 fails harmlessly with vclog.
As the bootloader firmware only reports the initial framebuffer through RPI_FIRMWARE_GET_VC_MEMORY
(and actually uses the uncached alias, where bcm2708_fb expects cached), any dma ioctl's just fail with
Invalid memory access
.Fixing the bootloader to report the expected VC_MEMORY range does allow the vc_mem_copy code path to run and it goes badly, as this driver directly writes DMA control blocks which have changed on bcm2712.
I suspect this should be updated to use a higher level dma interface, but if that comes with the vc_mem driver, we can just drop (or copy) support here. After that point
RPI_FIRMWARE_GET_VC_MEMORY
could be fixed.