Skip to content

rpi-6.10.y/vchiq dma mask updates #6209

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

Conversation

kbingham
Copy link
Contributor

@kbingham kbingham commented Jun 6, 2024

These update the (remaining) vchiq bus devices to explicitly set the DMA_MASK.

In particular, the VC-SM-CMA triggers a warning at boot without this.

This implementation updates the SM-CMA, ISP, and Codec to match the audio and camera device. Though I do wonder if we should instead make the vchiq_bus probe() just register this on all vchiq devices directly instead!

(I assume all vchiq based devices would have an identical DMA mask).

@popcornmix
Copy link
Collaborator

Yes, VideoCore has a 32-bit (or perhaps more accurately 30-bit address bus), so any services that use vchiq will be the same.

@pelwell ?

@pelwell
Copy link
Contributor

pelwell commented Jun 7, 2024

The limitation here is the bus to the VPU and its peripherals. Yes, it's a 30-bit address bus but offset at the 3GB mark, so it's effectively 32-bit. The other clients, bcm2835-audio and bcm2835-camera, also explicitly set 32-bit masks, so it could be moved into the common core instead.

@pelwell
Copy link
Contributor

pelwell commented Jun 7, 2024

This only builds for arm64 - ARCH=arm builds fail complaining about the absence of dmac_inv_range and dmac_clean_range.

@6by9
Copy link
Contributor

6by9 commented Jun 7, 2024

This only builds for arm64 - ARCH=arm builds fail complaining about the absence of dmac_inv_range and dmac_clean_range.

Missing forward port of bd7e433 ?

@pelwell
Copy link
Contributor

pelwell commented Jun 9, 2024

Missing forward port of bd7e433 ?

Yes - it was literally the first missing commit suggested by my forward-porting script, and now applied.

@6by9
Copy link
Contributor

6by9 commented Jun 10, 2024

Note that the use cases for dmac_inv_range and dmac_clean_range as cache flush functions via vcsm-cma are likely dead.

I think it was only JC's HEVC decode on Pi3 that was using them, and with the switch to V3D being driven from the kernel that is no longer functional. (It used VPU, QPUs, ARM NEON, and almost every other hardware block it could get hold of).

@popcornmix
Copy link
Collaborator

@6by9 I've pushed to 6.10 a revert of the commit that exposes dmac_inv_range/dmac_clean_range and removed the code path from vc-sm-cma driver, as I agree that code path is no longer used.

kbingham added 3 commits June 13, 2024 20:44
The platform model originally handled the DMA mask. Now that
we are on the vchiq_bus we need to explicitly set this.

Signed-off-by: Kieran Bingham <[email protected]>
The platform model originally handled the DMA mask. Now that
we are on the vchiq_bus we need to explicitly set this.

Signed-off-by: Kieran Bingham <[email protected]>
The platform model originally handled the DMA mask. Now that
we are on the vchiq_bus we need to explicitly set this.

Signed-off-by: Kieran Bingham <[email protected]>
@kbingham kbingham force-pushed the kbingham/rpi-6.10.y/vchiq-dma-mask branch from 60eea8a to ace1099 Compare June 13, 2024 19:52
@kbingham
Copy link
Contributor Author

Refreshed this branch, but I still think we should make vchiq bus do this at the core level (and send that patch upstream).

That will take some more minutes than I have right now though.

@popcornmix
Copy link
Collaborator

I agree this would be best handled in common code.
I'll merge this for now, but, happy to receive an update when you are ready with the upstream version.

@popcornmix popcornmix merged commit 4347744 into raspberrypi:rpi-6.10.y Jun 14, 2024
12 checks passed
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.

4 participants