-
Notifications
You must be signed in to change notification settings - Fork 5.2k
bcm2708-dmaengine: Use more DMA channels (but not 12) #1113
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
1) Only the bcm2708_fb drivers uses the legacy DMA API, and it requires a BULK-capable channel, so all other types (FAST, NORMAL and LITE) can be made available to the regular DMA API. 2) DMA channels 11-14 share an interrupt. The driver can't handle this, so don't use channels 12-14 (12 was used, probably because it appears to have an interrupt, but in reality that interrupt is for activity on ANY channel). This may explain a lockup encountered when running out of DMA channels. The combined effect of this patch is to leave 7 DMA channels available + channel 0 for bcm2708_fb via the legacy API. See: raspberrypi#1110 raspberrypi#1108
Okay - feel free to merge. |
Can you also merge it into 4.2? |
bcm2708-dmaengine: Use more DMA channels (but not 12)
It's also on 4.2. |
I'm not sure but look like this commit break sdhost-overlay and spi-dma-overlay How do I debug the overlay? |
It's working for me, so one of us is doing something wrong. Can you post your config.txt (just the active bits - you can delete the comments) and the output of:
please? |
config.txt - https://gist.github.com/kukabu/9a7f8e508c58618d75b5 @pelwell thanks, if it work for you then I something broken :( |
The "-overlay" part is inferred and should not be used - remove it. However, at the moment it still ought to work, so that shouldn't be the problem. Oh - now I see:
DDTK is an unreleased development feature in the loader that will cause it to look for different filenames. How have you built this kernel? What does Also, do you really want to turn on both i2c interfaces? i2c0 (or i2c1 on a Rev 1 Model B) is intended for the VideoCore processor. The recommended setting for people using i2c is:
which will automatically select the correct interface on each Pi. If you want to explicitly allow the ARM to access the VideoCore I2C then use:
but be aware that it will stop the camera from working. |
OK, so that version is released (in the tools repo), but it isn't one found in any of the kernel trees. I suspect you are trying to enable some extra kernel features and ended up setting CONFIG_OF_OVERLAY. This enables the new kernel dynamic Device Tree support, but it isn't very useful because it doesn't include a userspace interface; apart from some self tests, only one driver uses it in the 4.2 tree. Note that this isn't required in a standard Pi kernel because all of the overlay functionality is in the loader. Your options are:
For reference, the latest documentation for kernel building can be found here. I think any apparent link to this bcm2708-dmaengine commit is just coincidental. |
I found the my mistake. CONFIG_OF_OVERLAY=y in .config. |
See: raspberrypi/linux#756 kernel: spi-bcm2835: merge upstream patches allowing DMA transfers See: raspberrypi/linux#1085 kernel: rpisense-fb: add low-light mode and gamma control See: raspberrypi/linux#1104 kernel: bcm2708-dmaengine: Use more DMA channels (but not 12) See: raspberrypi/linux#1113 kernel: Add /dev/gpiomem device for rootless user GPIO access See: raspberrypi/linux#1112 kernel: Add RaspiDAC3 support kernel: Rpi 4.1.y spi bcm2835 patches clock-polarity issue See: raspberrypi/linux#1125 kernel: BCM270X_DT: Add SDIO overlay
See: raspberrypi/linux#756 kernel: spi-bcm2835: merge upstream patches allowing DMA transfers See: raspberrypi/linux#1085 kernel: rpisense-fb: add low-light mode and gamma control See: raspberrypi/linux#1104 kernel: bcm2708-dmaengine: Use more DMA channels (but not 12) See: raspberrypi/linux#1113 kernel: Add /dev/gpiomem device for rootless user GPIO access See: raspberrypi/linux#1112 kernel: Add RaspiDAC3 support kernel: Rpi 4.1.y spi bcm2835 patches clock-polarity issue See: raspberrypi/linux#1125 kernel: BCM270X_DT: Add SDIO overlay
See: raspberrypi/linux#756 kernel: spi-bcm2835: merge upstream patches allowing DMA transfers See: raspberrypi/linux#1085 kernel: rpisense-fb: add low-light mode and gamma control See: raspberrypi/linux#1104 kernel: bcm2708-dmaengine: Use more DMA channels (but not 12) See: raspberrypi/linux#1113 kernel: Add /dev/gpiomem device for rootless user GPIO access See: raspberrypi/linux#1112 kernel: Add RaspiDAC3 support kernel: Rpi 4.1.y spi bcm2835 patches clock-polarity issue See: raspberrypi/linux#1125 kernel: BCM270X_DT: Add SDIO overlay
Only the bcm2708_fb drivers uses the legacy DMA API, and
it requires a BULK-capable channel, so all other types
(FAST, NORMAL and LITE) can be made available to the regular
DMA API.
DMA channels 11-14 share an interrupt. The driver can't
handle this, so don't use channels 12-14 (12 was used, probably
because it appears to have an interrupt, but in reality that
interrupt is for activity on ANY channel). This may explain
a lockup encountered when running out of DMA channels.
The combined effect of this patch is to leave 7 DMA channels
available + channel 0 for bcm2708_fb via the legacy API.
See: #1110
#1108