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.

AM62A3: The same command, sdk-8 and sdk-9, camera frame rate is inconsistent

Part Number: AM62A3

I supported OV3C10 sensor, use cmd:

gst-launch-1.0 -v -e \
v4l2src device=/dev/video2 io-mode=dmabuf-import ! \
video/x-bayer,width=1920,height=1080,format=bggr12, framerate=60/1 ! \
queue2 max-size-buffers=0 ! tiovxisp sensor-name=SENSOR_OV_0X03C10_RPI dcc-isp-file=/opt/imaging/ovx03c10/dcc_viss_wdr.bin format-msb=11 \
sink_0::dcc-2a-file=/opt/imaging/ovx03c10/dcc_2a_wdr.bin sink_0::device=/dev/v4l-subdev2 ! \
queue2 max-size-buffers=0 ! tiovxmultiscaler ! \
video/x-raw, format=NV12,width=1280,height=768, framerate=60/1 ! \
tiperfoverlay title="LuxShare CMS" ! queue2 max-size-buffers=0 ! kmssink driver-name=tidss force-modesetting=true sync=false

=================================================================

sdk-8       : FPS:  60

sdk-9.0.0 :FPS:   30

sdk-9.0.1 :FPS:30

(When I updated the linux kernel to 9.0.1 based on sdk9 version)

  • Hello Peiyong,

    Can you ran a few tests to see what in the pipeline caused the fps drop?

    1. Measure fps before ISP:

    gst-launch-1.0 -v -e \
    v4l2src device=/dev/video2 io-mode=dmabuf-import ! \
    video/x-bayer,width=1920,height=1080,format=bggr12, framerate=60/1 ! \
    fpsdisplaysink text-overlay=false

    2. Measure fps with ISP but without the display:

    queue2 max-size-buffers=0 ! tiovxisp sensor-name=SENSOR_OV_0X03C10_RPI dcc-isp-file=/opt/imaging/ovx03c10/dcc_viss_wdr.bin format-msb=11 \
    sink_0::dcc-2a-file=/opt/imaging/ovx03c10/dcc_2a_wdr.bin sink_0::device=/dev/v4l-subdev2 ! \
    queue2 max-size-buffers=0 ! tiovxmultiscaler ! \
    video/x-raw, format=NV12,width=1280,height=768, framerate=60/1 ! \
    fpsdisplaysink text-overlay=false

    Regards,

    Jianzhong

  • After my testing, I found that the following parameters will affect resulting 30 frames:

    1、fpsdisplaysink plugs params: text-overlay=false    use this params,it can Reach 60 frames;

    2、if I use plane-id=31;force-modesetting=true must set,if not set, it will be 30 frames

    1/2 、Why?

    3、But,in sdk-8, I not use  text-overlay=false, the display is show 60 frame

    3、Why?

    =============================

    exec cmd:

    gst-launch-1.0 -v -e \
    v4l2src device=/dev/video0 io-mode=dmabuf-import ! \
    video/x-bayer,width=1920,height=1080,format=bggr12, framerate=60/1 ! \
    queue2 max-size-buffers=0 ! tiovxisp sensor-name=SENSOR_OV_0X03C10_RPI dcc-isp-file=/opt/imaging/ovx03c10/dcc_viss_wdr.bin format-msb=11 \
    sink_0::dcc-2a-file=/opt/imaging/ovx03c10/dcc_2a_wdr.bin sink_0::device=/dev/v4l-subdev2 ! video/x-raw, format=NV12 ! \
    queue2 max-size-buffers=0 ! tiovxmultiscaler name=split_01 src_0::roi-startx=0 src_0::roi-starty=0 src_0::roi-width=1920 src_0::roi-height=1080 target=0 \
    \
    split_01. ! queue2 max-size-buffers=0 ! video/x-raw, width=1280, height=768,framerate=60/1 ! \
    fpsdisplaysink text-overlay=false sync=false video-sink="kmssink driver-name=tidss force-modesetting=true plane-id=31 "

    =============================

    https://git.ti.com/cgit/edgeai/meta-edgeai/tree/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstkmssink-Add-support-to-use-multiple-kmssinks.patch?h=kirkstone-next

    3、I support this patch,Do you want to answer this question in this case or in another case?

  • 2、if I use plane-id=31;force-modesetting=true must set,if not set, it will be 30 frames

    Is plane-id 31 the primary plane or the overlay plane? 

    I support this patch,Do you want to answer this question in this case or in another case?

    I can't access this link. 

    Regards,

    Jianzhong

  • Is plane-id 31 the primary plane or the overlay plane? 

    ------31 is primary,   but  31(primary) and  41(overlay) the same result。

    force-modesetting=true , What does that do?

    I can't access this link. 

    -------https://git.ti.com/cgit/edgeai/meta-edgeai/commit/?h=kirkstone&id=fff2d73c43e33b88472feca82311ab5b5a2943fa

    this link can open?If not open, you can see your TI platforn patch:Revert "gstreamer1.0-plugins-bad: Add a patch to enable multiple kmssinks"

    exist problem:

     kmssink that supports multi-process access will halve the frame rate as more processes access it.

    one process : FPS :60

    two process : FPS:   30

    three process : FPS:   20

    four process : FPS:   15

    Your idea is to use a decoupled DRM master to achieve multi-process access, but the frame rate will be halved. I feel that if we change to Atomic interface, there will be no frame rate drop problem.

    exec cmd: (two process)

    gst-launch-1.0 -v -e \
    v4l2src device=/dev/video0 io-mode=dmabuf-import ! \
    video/x-bayer,width=1920,height=1080,format=bggr12, framerate=60/1 ! \
    queue2 max-size-buffers=0 ! tiovxisp sensor-name=SENSOR_OV_0X03C10_RPI dcc-isp-file=/opt/imaging/ovx03c10/dcc_viss_wdr.bin format-msb=11 \
    sink_0::dcc-2a-file=/opt/imaging/ovx03c10/dcc_2a_wdr.bin sink_0::device=/dev/v4l-subdev2 ! video/x-raw, format=NV12 ! \
    queue2 max-size-buffers=0 ! tiovxmultiscaler name=split_01 src_0::roi-startx=0 src_0::roi-starty=0 src_0::roi-width=1920 src_0::roi-height=1080 target=0 \
    \
    split_01. ! queue2 max-size-buffers=0 ! video/x-raw, width=1280, height=768,framerate=60/1 ! \
    fpsdisplaysink text-overlay=false sync=false video-sink="kmssink driver-name=tidss force-modesetting=true plane-id=31 " \
    \
    split_01. ! queue2 max-size-buffers=0 ! video/x-raw, width=1280, height=768 ! \
    \
    queue2 max-size-buffers=0 ! tiovxmultiscaler ! video/x-raw,format=NV12, width=1280, height=200 ! \
    queue2 max-size-buffers=0 ! kmssink driver-name=tidss plane-id=41 render-rectangle='<0,0,1280,200>' sync=false plane-properties="a, alpha=30000"

    ====================

    This is an urgent problem. Could you bring along some colleagues to discuss it

  • Hi Peiyong,

    I've checked with other team members who helped you earlier. We're looking into this issue and please give us a day or two before we get back to you.

    Thanks for your patience.

    Regards,

    Jianzhong

  • All right. Hope to hear from you soon

  • Hi Jianzhong

    Have you got the result?

  • Hi Peiyong,

    Our SW team is still working on this.

    Regards,

    Jianzhong

  • Hi, jianzhong,
        How's this thing going?

  • Hi Peiyong,

    I apologize for the delay. Our SW team is tied up with releasing the new SDK. Let me check and get back to you in a few days.

    Thank you for your patience.

    Jianzhong

  • Hi jianzhong

    We hope to receive your reply soon

  • Hello Peiyong,

    We discussed about this internally. Unfortunately, running multiple instances of kmssink simultaneously is not something that we can support at this time. The patch that you mentioned earlier was provided to you as something to try. The commit message did indicate potential performance impact. 

    To officially support this feature in TI's SDK, we will need to evaluate and schedule the work.

    Regards,

    Jianzhong

  • Hi jianzhong

      Can you estimate the approximate workload? This is luxshare on my side

  • Hi Peiyong,

    It won't be available this quarter. There is a chance that we can have it in 2024 Q1.

    Regards,

    Jianzhong

  • Hi, jianzhong

    I made the change myself. I'm going to change set_plane to atomic. But the callback function fires three times in a row. I just want field blanking to trigger once and atomic commit once.

    Does page_flip_handler2 trigger a function once every field blanking?

  • Hi Peiyong,

    I'm afraid that we may not be able to help you with this at this moment, but let me still pass this to Suren and see if he has any input.

    Regards,

    Jianzhong

  • Hello Peiyong,

    Kmssink is a community driven plugin and it's not a TI custom plugin. The intend of kmssink is to have one drm master and if you would like to have multiple instances please work with the community. An alternative would be to use waylandsink and it has support for multiple instances.

    Regards,
    Krunal

  • I want to achieve multi-graph layer display mixing through DRM plane,  can waylandsink support it ?

  • Peiyong,

    Can you post these queries to Gstreamer community as these plugins were not developed by TI?

    Best Regards,

    Suren