This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Cody,
This forum supports only the TI distributed Linux SDK, currently v3.14.26. From your log I guess you are using a different Linux version. Can you try the same with the TI SDK?
Our application requires the 3.19.8 or newer kernel, so I'm hesitant to spend time testing a kernel we can't use.
However, I am asking specific questions about the libgles-omap3 binary and it's supporting programs, which are exactly the versions shipped by TI.
If there is some iteraction that these have with the kernel which could affect the answer to those specific questions, description of that interaction would be appreciated (and might help me resolve this issue).
I've noticed that meta-ti has a `linux-ti-staging-4.1` (which would be new enough for our application).
Is it known whether this kernel supports FLIP properly on the am335x?
Also, any update on how MaxSwapChainBuffers can be increased? (ie: what parameters control it) Or other advise on getting FLIP working on the am335x?
Just to give an update:
At the moment I've become more focused on the display distortions that occur when FLIP is enabled instead of the perceived slowness (I think the perception of slowness could just be a result of the display artifacts).
To give a better description of the display artifacts: it appears that every other line of the display is shifted to the left or right when a drag left-or-right occurs. No distortion occurs when the display is not changing. No distortion (other than the expected tearing) occurs when using FRONT.
All of this seems to point to an issue with when the display buffers are swapped. After googling around a bit, this patch https://github.com/RobertCNelson/bb-kernel/blob/am33x-v4.1/patches/sgx/0003-drm-tilcdc-fix-the-ping-pong-dma-tearing-issue-seen-.patch Seems relevent, but we already include it.
Also, I tried building the ti-staging-4.1 kernel, but it appears to be missing a header required for the sgx kernel modules to build.
The total size of the FBdev frame buffers allocated by the current DRM driver will be slightly smaller than it should be
if the size of each frame buffer is not fully aligned to the page size (4096) because the kernel driver adds the required padding for the entire buffer instead of the individual frame buffer.
To allocate more FLIP buffers, we can simply increase the #define DRM_NUM_FBDEV_BUFFERS at Linux/driver/gpu/drm/drm_fb_cma_helper.c as proof of concept.
#define DRM_NUM_FBDEV_BUFFERS 3 to #define DRM_NUM_FBDEV_BUFFERS 4
With this change, the sgx_flip_test should work and display "MaxSwapChainBuffers:3".
Please try and see whether you still see display problems with MaxSwapChainBuffer=3. If it is still the case, then it could be a performance issue.
If you can share the application binary, we can further look at our end the cause of the issue.
We are seeing a similar issue with the FLIP buffers probably overlaying kernel memory. We applied the suggested patch, and it does allocate enough memory for 3 FLIP buffers (and thus sgx_flip_test runs), but we are seeing issues of graphical artefacts and glitches. We have a thread here:
https://e2e.ti.com/support/arm/sitara_arm/f/791/p/446385/1641965#1641965
We are also using am335x and QT5 EGLFS.
Maybe we are looking at something similar?