doe300
Posts: 40
Joined: Thu Dec 29, 2016 1:41 pm

Strange behaviour of mailbox calls

Sun Sep 24, 2017 8:31 am

I have some user defined code that I want to execute on the VideoCore IV GPU. I can execute this code either via a mailbox-call or via register-poking, writing directly into the V3D registers (see functions gpu_fft_base_exec_direct and gpu_fft_base_exec of https://github.com/raspberrypi/userland ... fft_base.c). Additionally, I'm executing the code several successive times on all QPUs.

Now, executing the code via directly poking the registers (in a loop: writing the V3D registers, waiting for all interrupts) works perfectly. Executing the same code via the mailbox interface shows some strange behavior:
  • If there is some delay (e.g. 10 ms) between mailbox-calls, the execution finishes successfully.
  • If there is no delay between the mailbox-calls, after a few loop-iterations, the system freezes, no response, not even in terminals.
  • If I set the delay between the syscalls to a lower value (e.g. 100 us), the execution finished, but significantly (about 1/8th) slower!

My theory for the first two points is, that I somehow swamp the linux kernel with syscalls, so it has no more time for anything else!? But I can't explain why a lower delay results in a slower execution.

Has anyone here an explanation for this behaviour?

f5oeo
Posts: 15
Joined: Sun Oct 12, 2014 10:16 am

Re: Strange behaviour of mailbox calls

Tue Jan 02, 2018 12:30 pm

Don't have an answer to your question, however want to work on the same way. With GPU_FFT , I try to use mbox method instead of direct_execute : no success. I run it on Raspberry PiZero/Raspbian Stretch. Have you modify something in gpu_fft_base.c ?

Return to “Graphics programming”

Who is online

Users browsing this forum: No registered users and 1 guest