]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r308424, r310636
authorgonzo <gonzo@FreeBSD.org>
Mon, 8 May 2017 19:57:15 +0000 (19:57 +0000)
committergonzo <gonzo@FreeBSD.org>
Mon, 8 May 2017 19:57:15 +0000 (19:57 +0000)
commit0c7f6f6fad18a504020fb399ded4b6374f218a64
tree5750fcfa7aeb69d96311a4951e34056660c412e8
parent45ac96701add332f044616229be156b081dbf81d
MFC r308424, r310636

r308424:
Fix locking in bcm2835_audio driver

- Move all VCHI activity to worker thread: channel methods are called with
    non-sleepable lock held and VCHI uses sleepable lock.

- In worker thread use sx(9) lock instead of mutex(9) for the same reason.

PR: 213801, 205979

r310636:
[rpi] Fix bcm2835_audio locking and samples starvation

Rework general approach to locking and working with audio worker thread:

- Use flags to signal requested worker action
- Fix submitted buffer calculations to avoid samples starvation
- Protect buffer pointers with locks to fix race condition between callback
  and audio worker thread
- Remove unnecessary vchi_service_use
- Do not use lock to serialize VCHI requests since only one thread issues them now
- Fix unloading signaling per hselasky@ suggestion
- Add output to detect inconsistent callback data caused by possible firmware bug
  https://github.com/raspberrypi/firmware/issues/696
- Add stats/debug sysctls to troubleshoot possible bugs

PR: 213687, 205979, 215194
sys/arm/broadcom/bcm2835/bcm2835_audio.c