I've written a small library for the linux framebuffer using mmap and some (higher) drawing routines, effectlively copying specific bytes to specific offsets in the mapped memory.
To measure the output latency I need to determine the moment that follows my
Code: Select all
According to the image below, the next step that follows the framebuffer memory copy is the Hardware Video Scaler (HVS), again followed by the FIFO and HDMI encoder.
Source: https://blog.benjdoherty.com/2019/05/21 ... pberry-Pi/
I now want to determine the time it takes after the framebuffer memcpy as close as possible. In other words, how long it takes for the graphics processsing unit and all other steps to produce the HDMI output from by framebuffer input (moments marked as t1 and t2 in the image below).
Is this even possible? Would you (re)write some kernel code to achieve that or is it possible from userland (or even within some C code)?
Raspberry PI 4 latest
OS: Raspbian Buster Lite Programming