-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Timeout while executing code on QPUs via mailbox interface #1633
Comments
I narrowed the problem down. The timeouts happen when I use uncached memory. The mailbox command to allocate memory has a flags parameter, described here. When I use the flag |
When you mix cached and uncached accesses you have to be very careful to ensure that there are no dirty cache lines outstanding. Having multiple caches only adds to the dangers. I suspect what is happening is that the To make this reliable I think the vcio driver would need to be changed to flush the ARMs caches before launching the QPU. Does that sound plausible, @popcornmix? (I've never written any QPU code...) |
I believe the |
So what do you think the problem might be? |
No immediate idea. I should point out that we are moving toward the kms driver being default (so 3d driver running on the arm) which is incompatible with this API (driving 3d hardware from the firmware). The alternative api that works with kms uses an ioctl to get the kernel to schedule a qpu/shader job. |
It should be noted that the example is for VC6, and the upstream VC4 KMS driver does not support QPU execution due to the lack of memory protection. See doe300/VC4CL#51. |
Closing because only KMS is support these days |
Describe the bug
Calls to execute code on the QPUs via the mailbox interface time out randomly.
To reproduce
gcc rpi_qpu_timeout.c
i=0; while true; do ((i+=1)); echo $i; sudo ./a.out; if [ $? != 0 ]; then break; fi; done
Execute: Connection timed out
System
The text was updated successfully, but these errors were encountered: