Closed TeunVR closed 3 weeks ago
I see you've already added logging to ensure the output selection works correctly.
Can you try the instructions here and send me the log? https://github.com/ardera/flutter-pi/wiki/debugging-output-issues
I made two logs. The mipi log is the log where i don't see any output. The hdmi log is working ok.
The drm_info and modetest are attached to the first post.
the logs look normal, nothing unusual
does the console cursor also keep blinking? or does it stop blinking while flutter-pi is running?
Can you do a cat /sys/kernel/debug/dri/*/state
while flutter-pi is running and send me the output? (After it should have presented the first frame, so wait a few secs)
Here are two states, for dri/0 and dri/128. The cursor keeps blinking, i can still use the terminal.
One thing i noticed when comparing the dri-states of the MIPI with the dri-state of the HDMI display is that on the HDMI display there is one crtc in the state which is enabled and active. When using the MIPI display there are two crtc's of which the first is not enabled and not active. I don't know if this is expected, just something i noticed when comparing the files 🙂
The (working) hdmi dsi states: dri-128-state-hdmi.log dri-0-state-hdmi.log
Also here are the two dri-state logs for kmscube on MIPI-DSI which is working. Here i also see a difference in the crtc states.
Also here are the two dri-state logs for kmscube on MIPI-DSI which is working. Here i also see a difference in the crtc states.
Interesting, though switching HDMI & DSI involves some dtoverlay stuff right? That could maybe affect the available CRTCs.
In the dri state, it seems like with DSI, flutter-pi is there, but fbcon is also still there and showing in front of flutter-pi (because plane ids are used to determine occlusion order in case zpos is equal AFAIK) and flutter-pi just never removes it from the display.
Can you try with fix/plane-allocation?
Yes i change dtoverlays to switch between HDMI and DSI. HDMI is disabled when DSI is used.
With the fix i get a very short flash of the display and then back to console mode. Also when i exit the flutter app i get a small flash again. The cursor keeps flashing in this case also.
Here is the dri state output: dri-128-state-shortflash.log dri-0-state-shortflash.log
I have also made a modetest log with the hdmi and dsi display to compare. The modetest DSI shows different values for the possible crtcs than the modetest HDMI output. Also the first CRTC in the DSI output has a size of 0x0? modetest-hdmi.log modetest-mipi.log
Okay apparently rockchip (or upstream) weston has specific patches for the rockchip driver: https://github.com/JeffyCN/weston/commit/aae3c532036ba9dd5369201303d559535d4f42d9
Seems like there's some stuff the rockchip driver doesn't like, and flutter-pi is doing that (not assigning the N-th plane to the N-th CRTC). I think kmscube is using legacy modesetting by default and that's why it doesn't run into this problem. You can maybe try if kmscube -A
works.
Can you try with the latest commit?
kmscube -A gives no eglDupNativeFenceFDANDROID.
The latest commit gives some compile errors here:
/home/odroid/flutter-pi-master/src/modesetting.c: In function ‘drmdev_new_from_interface_fd’:
/home/odroid/flutter-pi-master/src/modesetting.c:1031:79: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]
1031 | if (drmdev->planes[i].possible_crtcs & (1 << primary_plane_index) != 0) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from /home/odroid/flutter-pi-master/src/modesetting.c:23:
/home/odroid/flutter-pi-master/src/util/logging.h:15:55: error: format ‘%d’ expects a matching ‘int’ argument [-Werror=format=]
15 | #define LOG_DEBUG(fmtstring, ...) fprintf(stderr, "%s: " fmtstring, __FILE__, ##__VA_ARGS__)
| ^~~~~~
/home/odroid/flutter-pi-master/src/modesetting.c:1034:17: note: in expansion of macro ‘LOG_DEBUG’
1034 | LOG_DEBUG("Primary plane %d does not support CRTC %d.\n", primary_plane_index);
| ^~~~~~~~~
/home/odroid/flutter-pi-master/src/modesetting.c:1034:68: note: format string is defined here
1034 | LOG_DEBUG("Primary plane %d does not support CRTC %d.\n", primary_plane_index);
| ~^
| |
| int
/home/odroid/flutter-pi-master/src/modesetting.c:1039:78: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]
1039 | if (drmdev->planes[i].possible_crtcs & (1 << cursor_plane_index) != 0) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from /home/odroid/flutter-pi-master/src/modesetting.c:23:
/home/odroid/flutter-pi-master/src/util/logging.h:15:55: error: format ‘%d’ expects a matching ‘int’ argument [-Werror=format=]
15 | #define LOG_DEBUG(fmtstring, ...) fprintf(stderr, "%s: " fmtstring, __FILE__, ##__VA_ARGS__)
| ^~~~~~
/home/odroid/flutter-pi-master/src/modesetting.c:1042:17: note: in expansion of macro ‘LOG_DEBUG’
1042 | LOG_DEBUG("Cursor plane %d does not support CRTC %d.\n", cursor_plane_index);
| ^~~~~~~~~
/home/odroid/flutter-pi-master/src/modesetting.c:1042:67: note: format string is defined here
1042 | LOG_DEBUG("Cursor plane %d does not support CRTC %d.\n", cursor_plane_index);
| ~^
| |
| int
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/flutterpi_module.dir/build.make:115: CMakeFiles/flutterpi_module.dir/src/modesetting.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/flutterpi_module.dir/all] Error 2
I fixed the compile-errors and i've got visuals now 👍 Great!
The latest commit gives some compile errors here:
Oh sry about that, I wrote that patch in like 5s because I had to leave
I fixed the compile-errors and i've got visuals now 👍 Great!
Nice! I also pushed the proper version now.
fixed by #414
Running flutter-pi on an Odroid M1S board (Rockchip RK3566). It runs really great and HDMI output is working fine. However i cannot get the Vu5S MIPI-DSI display to work (https://wiki.odroid.com/accessory/display/vu_series/vu5s). The application starts ok and it detects the display correctly. Everything seems to be ok, it is just not rendering anything. The display keeps showing console output. I tried kmscube from the meta project and that is working fine. Also gnome is working.
Running on Odroid Ubuntu 20.04 image.
drm_info MIPI_DSI.txt modetest with MIPI-DSI display.txt