[i.MX8QM] Weston g2d renderer has lower performance than GL renderer

Hi,

I am comparing performance between g2d renderer and GL renderer in Weston, and performance of g2d renderer slightly lower than GL renderer.

My test environment is:

I have tested by running 2 programs in the same time: gst-launch-1.0 and an example qt app moveblocks (with a small modification to make it show in fullscreen).

  • Step 1: Run moveblocks first, in fullscreen.
  • Step 2: Play video (1280x720, 30fps) with command:
    gst-launch-1.0 -v filesrc location=720p.mkv \
                      ! matroskademux ! queue \
                      ! h264parse ! v4l2h264dec \
                      ! queue \
                      ! fpsdisplaysink \
                              video-sink="waylandsink window-width=1280 window-height=720" \
                              text-overlay=false sync=false
    

Screen will look like this
https://i.imgur.com/V4BoHXl.jpg

Result is:

g2d renderer GL renderer
Video FPS < 20 FPS 30 FPS

Do you have any suggestions to improve performance of g2d renderer?
Thank you very much.

Hi @dothanhtrung, let me further check but can you check if you have a read bottleneck? Just in case.

Alvaro.

Thank you. I tried moving video to /tmp, but the fps isn’t improved.

In weston-debug, I see that video view is assigned to overlay plane in GL renderer, but not in G2D renderer. Could it be the reason?

  • G2D renderer:
    [repaint] Using render-only state composition
    [repaint] view 0xaaab0effb720 using renderer composition <=== video view
    [repaint] view 0xaaab0eff85e0 using renderer composition
    [repaint] view 0xaaab0eff70a0 using renderer composition
    ...
    
  • GL renderer:
    [repaint] Using mixed state composition
    [repaint] view 0xaaaaf7c0aef0 on Overlay plane 39        <=== video view
    [repaint] view 0xaaaaf7c0ac80 using renderer composition
    [repaint] view 0xaaaaf7b9fcb0 using renderer composition
    ...
    

Hi @rafael.tx , do you know about this comment from the customer?

Thanks,
Alvaro.

@alvaro.tx, unfortunately I don’t.
I think this could be asked on the NXP community, NXP is responsible for developing all the drivers and libraries that make accelerated rendering possible on the IMX products. If there is a real limitation they would know.
On my side I would like to ask why is the g2d renderer necessary? Is it not possible to use the GL renderer if it gives better performance?

Best regards,
Rafael

I think this could be asked on the NXP community, NXP is responsible for developing all the drivers and libraries that make accelerated rendering possible on the IMX products. If there is a real limitation they would know.

I see. Thank you.

On my side I would like to ask why is the g2d renderer necessary? Is it not possible to use the GL renderer if it gives better performance?

One of my reasons is this problem with GL renderer on 4K monitor. That makes a half of screen become black. I’ll try asking this problem on NXP community too.

Hi,

I asked on NXP community, and they responded that with the latest BSP from nxp, I can get higher performance with g2d and qt.

However, I cannot boot their BSP on Apalis board.

As in this topic: Mainline kernel for Apalis i.MX8QM, BSP6 is going to be released later this year.
Do you have more detail information about the time of this release?

Thank you.

Hi @dothanhtrung , thanks for checking. It would be nice to know what is the specific “latest BSP” :sweat_smile: but we can assume it is 5.15.

We do have a 5.15 kernel in the works that you may check: linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules

We are still defining the BSP 6 release schedule so I do not have a detailed plan to share with you ATM. Sorry about that.

BSP from NXP should not work out-of-the-box due to different device trees.

Kind regards,
Alvaro.

Thank you for the information. I will try to see if I can use linux-toradex 5.15.