cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP257 LTDC layer issue with kmssink

Aurelien1
Associate III

Hello everybody,
For my project, I need to display (LVDS output) an HMI that contains external video streams.
I plan to use LTDC layers in order to perform plane composition with the hardware block (for example, HMI on plane 1, RTP video on plane 2, and MIPI camera on plane 3).
I use GStreamer to test H.264 decoding and to display video using kmssink.
My problem is that I can display a video on each plane separately, but not on two or more planes:

gst-launch-1.0 videotestsrc ! videoconvert ! kmssink plane-id=$PLANE_ID1 => ok
gst-launch-1.0 videotestsrc ! videoconvert ! kmssink plane-id=$PLANE_ID2 => ok
gst-launch-1.0 videotestsrc ! videoconvert ! kmssink plane-id=$PLANE_ID3 =>ok (I don't know why, but the size is smaller; maybe I can find the reason in the device tree)

But if I do something like this:
gst-launch-1.0 videotestsrc ! videoconvert ! kmssink plane-id=$PLANE_ID1 videotestsrc ! videoconvert ! kmssink plane-id=$PLANE_ID2
the command fails.

For my test I have a custom board with LVDS or I can use STM32MP257F-DK kit if needed

Can someone help me?

Thanks a lot.

Have a good day.

2 REPLIES 2
robert3
Associate

This behavior is expected with kmssink on STM32MP257.

Each kmssink instance performs its own DRM atomic commit and takes exclusive control of a plane/CRTC. Running multiple kmssink elements in parallel causes atomic commit conflicts, which is why using more than one plane in the same command fails.

In practice, kmssink supports one pipeline per plane only, without coordination across planes.

For multi-plane use cases, the supported options are:

Use a single compositor pipeline (e.g. compositor or glvideomixer) feeding one kmssink, or

Manage LTDC planes explicitly via DRM/KMS atomic APIs in a custom application.

Also ensure in the device tree that plane formats, scaling limits, and plane-to-CRTC assignments are compatible, as LTDC planes have hardware constraints.

So while individual planes work with kmssink, simultaneous multi-plane composition is not supported directly.

Aurelien1
Associate III

Thanks for your explanation and your quick answer.
Have you example of  "Manage LTDC planes explicitly via DRM/KMS atomic APIs in a custom application"
Could you tell me how to set black as the transparent color, and confirm that if I use the DRM/KMS API I can obtain a result where the video streams are overlaid according to the transparent areas defined by the black color?*

Aurélien