lvgl / lv_port_linux

LVGL configured to work with a standard Linux framebuffer
MIT License
260 stars 160 forks source link

Conflict between GStreamer kmssink and LVGL DRM rendering #55

Closed 2216705512 closed 3 months ago

2216705512 commented 3 months ago

When starting GStreamer first with the command GST_DEBUG=4 gst-launch-1.0 videotestsrc ! videoconvert ! kmssink plane-id=87, and then starting LVGL, LVGL affects GStreamer, leading to the following error:

0:00:00.928240917 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'kmssink0' changed state to 4(PLAYING) successfully 0:00:00.928346209 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PAUSED pending VOID_PENDING, desired next PLAYING 0:00:00.928398710 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PLAYING 0:00:00.928431085 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending) 0:00:00.928502836 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'videoconvert0' changed state to 4(PLAYING) successfully 0:00:00.928555336 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PAUSED pending VOID_PENDING, desired next PLAYING 0:00:00.928600253 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PLAYING 0:00:00.928630587 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending) 0:00:00.928687462 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'videotestsrc0' changed state to 4(PLAYING) successfully 0:00:00.928739379 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PLAYING 0:00:00.928858963 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending) New clock: GstSystemClock 0:00:10.393764467 17799 0x55a5741140 WARN kmssink gstkmssink.c:1194:gst_kms_sink_sync: drmModePageFlip failed: 无效的参数 (-22) 0:00:10.393959302 17799 0x55a5741140 INFO basesrc gstbasesrc.c:2965:gst_base_src_loop: pausing after gst_pad_push() = error 0:00:10.394030760 17799 0x55a5741140 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: Internal data stream error. 0:00:10.394059052 17799 0x55a5741140 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: streaming stopped, reason error (-5) 0:00:10.394149761 17799 0x55a5741140 INFO GST_ERROR_SYSTEM gstelement.c:2145:gst_element_message_full_with_details: posting message: Internal data stream error. 0:00:10.394337888 17799 0x55a5741140 INFO GST_ERROR_SYSTEM gstelement.c:2172:gst_element_message_full_with_details: posted error message: Internal data stream error. 错误:来自组件 /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:Internal data stream error. 额外的调试信息: gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: streaming stopped, reason error (-5) Execution ended after 0:00:09.456499022 设置暂停管道 ... 0:00:10.396101610 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PLAYING pending VOID_PENDING, desired next PAUSED 0:00:10.396193777 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PAUSED 0:00:10.396231694 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PLAYING to PAUSED (VOID_PENDING pending) 0:00:10.396296153 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'kmssink0' changed state to 3(PAUSED) successfully 0:00:10.396339320 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PLAYING pending VOID_PENDING, desired next PAUSED 0:00:10.396369070 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PAUSED 0:00:10.396396779 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PLAYING to PAUSED (VOID_PENDING pending) 0:00:10.396437612 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'videoconvert0' changed state to 3(PAUSED) successfully 0:00:10.396471446 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PLAYING pending VOID_PENDING, desired next PAUSED 0:00:10.396503238 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PAUSED 0:00:10.396531821 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PLAYING to PAUSED (VOID_PENDING pending) 0:00:10.396571197 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'videotestsrc0' changed state to 3(PAUSED) successfully 0:00:10.396609697 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PAUSED 0:00:10.396638281 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PLAYING to PAUSED (VOID_PENDING pending) 设置备用管道 ... 0:00:10.396862866 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PAUSED pending VOID_PENDING, desired next READY 0:00:10.397013075 17799 0x55a5741140 INFO task gsttask.c:316:gst_task_func: Task going to paused 0:00:10.397650080 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to READY 0:00:10.397707539 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to READY (VOID_PENDING pending) 0:00:10.397775206 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'kmssink0' changed state to 2(READY) successfully 0:00:10.397831206 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PAUSED pending VOID_PENDING, desired next READY 0:00:10.397917540 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to READY 0:00:10.397947291 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to READY (VOID_PENDING pending) 0:00:10.397990458 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'videoconvert0' changed state to 2(READY) successfully 0:00:10.398025750 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PAUSED pending VOID_PENDING, desired next READY 0:00:10.398090792 17799 0x55a5741140 INFO task gsttask.c:318:gst_task_func: Task resume from paused 0:00:10.398264918 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to READY 0:00:10.398309252 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to READY (VOID_PENDING pending) 0:00:10.398349210 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'videotestsrc0' changed state to 2(READY) successfully 0:00:10.398386252 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to READY 0:00:10.398409294 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to READY (VOID_PENDING pending) 0:00:10.398528878 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2089:gst_bin_get_state_func: getting state 设置 NULL 管道 ... 0:00:10.398652546 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current READY pending VOID_PENDING, desired next NULL 0:00:10.401577110 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL 0:00:10.401869362 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed READY to NULL (VOID_PENDING pending) 0:00:10.402216157 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'kmssink0' changed state to 1(NULL) successfully 0:00:10.402303949 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current READY pending VOID_PENDING, desired next NULL 0:00:10.402360533 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL 0:00:10.402385325 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed READY to NULL (VOID_PENDING pending) 0:00:10.402431700 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'videoconvert0' changed state to 1(NULL) successfully 0:00:10.402463200 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current READY pending VOID_PENDING, desired next NULL 0:00:10.402494992 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL 0:00:10.402516867 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed READY to NULL (VOID_PENDING pending) 0:00:10.402555076 17799 0x55a54e3000 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child 'videotestsrc0' changed state to 1(NULL) successfully 0:00:10.402715202 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL 0:00:10.402742328 17799 0x55a54e3000 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed READY to NULL (VOID_PENDING pending) 释放管道资源 ... 0:00:10.402874745 17799 0x55a54e3000 INFO GST_ELEMENT_PADS gstpad.c:2156:gst_pad_unlink: unlinking videoconvert0:src(0x55a57325f0) and kmssink0:sink(0x55a5732840) 0:00:10.402928121 17799 0x55a54e3000 INFO GST_ELEMENT_PADS gstpad.c:2210:gst_pad_unlink: unlinked videoconvert0:src and kmssink0:sink 0:00:10.402964288 17799 0x55a54e3000 INFO GST_PARENTAGE gstbin.c:1801:gst_bin_remove_func: removed child "kmssink0" 0:00:10.403029330 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3251:gst_element_dispose: 0x55a57409d0 dispose 0:00:10.403054997 17799 0x55a54e3000 INFO GST_ELEMENT_PADS gstelement.c:789:gst_element_remove_pad: removing pad 'sink' 0:00:10.403120330 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3297:gst_element_dispose: 0x55a57409d0 parent class dispose 0:00:10.403227081 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3328:gst_element_finalize: 0x55a57409d0 finalize 0:00:10.403249248 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3334:gst_element_finalize: 0x55a57409d0 finalize parent 0:00:10.403297957 17799 0x55a54e3000 INFO GST_ELEMENT_PADS gstpad.c:2156:gst_pad_unlink: unlinking videotestsrc0:src(0x55a5732150) and videoconvert0:sink(0x55a57323a0) 0:00:10.403344040 17799 0x55a54e3000 INFO GST_ELEMENT_PADS gstpad.c:2210:gst_pad_unlink: unlinked videotestsrc0:src and videoconvert0:sink 0:00:10.403381374 17799 0x55a54e3000 INFO GST_PARENTAGE gstbin.c:1801:gst_bin_remove_func: removed child "videoconvert0" 0:00:10.403430666 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3251:gst_element_dispose: 0x55a573c8d0 dispose 0:00:10.403449916 17799 0x55a54e3000 INFO GST_ELEMENT_PADS gstelement.c:789:gst_element_remove_pad: removing pad 'sink' 0:00:10.403484333 17799 0x55a54e3000 INFO GST_ELEMENT_PADS gstelement.c:789:gst_element_remove_pad: removing pad 'src' 0:00:10.403513208 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3297:gst_element_dispose: 0x55a573c8d0 parent class dispose 0:00:10.403569209 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3328:gst_element_finalize: 0x55a573c8d0 finalize 0:00:10.403589626 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3334:gst_element_finalize: 0x55a573c8d0 finalize parent 0:00:10.403632209 17799 0x55a54e3000 INFO GST_PARENTAGE gstbin.c:1801:gst_bin_remove_func: removed child "videotestsrc0" 0:00:10.403667501 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3251:gst_element_dispose: 0x55a5730e00 dispose 0:00:10.403688210 17799 0x55a54e3000 INFO GST_ELEMENT_PADS gstelement.c:789:gst_element_remove_pad: removing pad 'src' 0:00:10.403718543 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3297:gst_element_dispose: 0x55a5730e00 parent class dispose 0:00:10.403741877 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3328:gst_element_finalize: 0x55a5730e00 finalize 0:00:10.403762877 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3334:gst_element_finalize: 0x55a5730e00 finalize parent 0:00:10.403783002 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3251:gst_element_dispose: 0x55a57421c0 dispose 0:00:10.403881878 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3297:gst_element_dispose: 0x55a57421c0 parent class dispose 0:00:10.404311215 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3328:gst_element_finalize: 0x55a57421c0 finalize 0:00:10.404742010 17799 0x55a54e3000 INFO GST_REFCOUNTING gstelement.c:3334:gst_element_finalize: 0x55a57421c0 finalize parent 0:00:10.404821927 17799 0x55a54e3000 INFO GST_INIT gst.c:1083:gst_deinit: deinitializing GStreamer 0:00:10.416934353 17799 0x55a54e3000 INFO GST_INIT gst.c:1231:gst_deinit: deinitialized GStreamer

"But if LVGL is started with DRM rendering first, then starting GStreamer does not cause any issues. Could LVGL have problems with DRM operations?" linaro@linaro-alip:~/lv_port_linux_frame_buffer/video$ gst-launch-1.0 --version gst-launch-1.0 version 1.14.4 GStreamer 1.14.4 http://packages.qa.debian.org/gstreamer1.0

2216705512 commented 3 months ago

https://github.com/lvgl/lv_port_linux/tree/release/v9.0

2216705512 commented 3 months ago

there is a simple Conflict which gstream and LVGL use the same drm plane which is my miss

kisvegabor commented 3 months ago

I already got several questions about using LVGL with gstreamer. What do you think, would it be possible to write a generic gstreamer driver for LVGL somehow?