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.

Linux/PROCESSOR-SDK-DRA7X: Kmscube with drmModeSetPlane running too slowly on PSDK

Part Number: PROCESSOR-SDK-DRA7X

Tool/software: Linux

Hello,

    In my case, the kmscube use drmModeSetPlane to post display buffer ,but the cube running too slow on psdk 3.02.00.03 , it post buffer to display 60fps.

    The attached patch file are my change to kmscube orgin code(git://git.ti.com/glsdk/kmscube.git). It also need  modify  the bootargs "omapdrm.num_crtc=2"  to "omapdrm.num_crtc=1"  when use the patch .

    But when i run the same kmscube code in glsdk , it can post buffer to display 700~fps.

    Does anyone know why Kmscube use drmModeSetPlane to post  running  too slowly on PSDK ?

   Thanks & Best Regards.

Sid

setPlanetocube.7z

  • Hi Sid,

    I have forwarded your question to graphics experts.

    Regards,
    Yordan
  • Hi,

    On PSDK, it's running as expected and not running too slowly. The application is just aligned to display Vsync.

    By GLSDK, I presume you mean 7.04 release. This was based on K3.14. In this release, the setPlane() function is not synchronized with Vsync.

    Starting from K4.1, we implemented support for atomic mode setting. This ensured that setPlane() call waits for a Vsync before returning.

    This is essential in a product environment. If you see more than 60 fps, there will be tearing / jerky artifacts.

    Regards,
    Anand
  • Hi anand,

    Thanks for you reply.

    There have a problem i meet on psdk,  if  i set the lcd refresh (Hz) from 60 to 30,  the cube will display just 30fps, but if i add other theard to display picture on the same time, the cube will display slower than 30fps. 

    In my case, cause my "cube" programs are complicated, when it's runing on PSDK, there is less than 10 fps can displayed. 

    Do you have any idea to make  display  more than 60 fps on PSDK? 

    Thanks & Best Regards.

    Sid

  • Hi Sid,

    Can you give more details on your requirement? Display more than refresh rate will lead to render artifacts.

    Maybe, you just want to render but not display? In that case, one option is to use an offscreen surface. This will delink the GPU from display path.

    How are you adding another thread to display a picture? Is it using another display pipeline? if so, you need to use atomic mode setting to ensure both of them get updated in the same vsync.

    Regards,
    Anand
  • Hi Anand,
    Thanks for your reply. It's really helpful to me.
    After tuning my "cube" programs , the "cube" can display 15 fps with lcd refresh 30 hz. And i use two different display pipeline in two different thread indeed, one for GPU dislay (like kmscube), another is for display a picture.
    Actually i don't know how to " use atomic mode setting to ensure both of them get updated in the same vsync." .
    Could you give me some example codes to show how to do it?

    Thanks & Best Regards.
    Sid
  • Hi Sid,

    Please refer to the following thread for more details on atomic mode setting:
    e2e.ti.com/.../1770692

    The following application provides sample API usage for atomic mode setting:
    github.com/.../drm-atomic.c

    The concept of atomic mode setting is covered in the following article:
    lwn.net/.../

    Regards,
    Anand