Skip to content
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

comma 3X: switch to kernel driver for low level SPI comms #34734

Open
adeebshihadeh opened this issue Feb 28, 2025 · 2 comments
Open

comma 3X: switch to kernel driver for low level SPI comms #34734

adeebshihadeh opened this issue Feb 28, 2025 · 2 comments

Comments

@adeebshihadeh
Copy link
Contributor

adeebshihadeh commented Feb 28, 2025

The comma 3X talks to its internal panda over SPI using the spidev driver. We want to move the low-level SPI transactions into the kernel for better performance and efficiency.

I already started this a while ago at panda/drivers/spi/.

Minimum requirements for this bounty:

  • Switch to the kernel driver for the panda Python library (panda/python/)
  • Make it interrupt driven (no busy waiting!)
  • Good auto loading + updating the driver
  • Better throughput than the existing panda SPI stack
    • for bonus points, you can patch the kernel to fix the SPI overhead. apparently tracking the "SPI stats" has a ton of overhead in our kernel version, and this was fixed in newer kernels.
  • Performance needs to be good enough to support pandad: rewrite from C++ to Python #34711
    • since the easiest way to validate may end up being to finish that move, there's an extra $250 on this bounty ($1k total) for finishing that up and merging it together

We'll be switching pandad in openpilot to Python soon, so no need to implement this for the C++ panda library (just the one in panda/python/).

@robin-reckmann
Copy link
Contributor

You cant use a comma 3(tici) for this I assume?

@andiradulescu
Copy link
Contributor

Unfortunately you can't, C3 has the panda connected via USB:

$ lsusb
Bus 001 Device 010: ID 3801:ddcc comma.ai panda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Open
Development

No branches or pull requests

3 participants