In RK3399 board running latest mainline kernel, when the system just booted up, there's no encoder attached to connector, and no crtc attached to encoder. In this case flutter-embedded will fail to start with error message Couldn't find any encoders. In this case, modetest will report the following:
Encoders:
id crtc type possible crtcs possible clones
38 0 DSI 0x00000001 0x00000001
Connectors:
id encoder status name size (mm) modes encoders
39 0 connected DSI-1 95x53 1 38
After the user run something like glmark2-es2-drm, they will get initialized, and flutter apps will work now:
Encoders:
id crtc type possible crtcs possible clones
38 37 DSI 0x00000001 0x00000001
Connectors:
id encoder status name size (mm) modes encoders
39 38 connected DSI-1 95x53 1 38
This PR adds code to find suitable encoder and crtc from drm resources structure when they are absent. After this is applied, flutter apps can run on boot, even without crtcs and encoders assigned to connector.
As an extra protection measure, this adds guard code against SIGSEGV in gbm backend, in case no crtc is initialized.
In RK3399 board running latest mainline kernel, when the system just booted up, there's no encoder attached to connector, and no crtc attached to encoder. In this case flutter-embedded will fail to start with error message
Couldn't find any encoders
. In this case,modetest
will report the following:After the user run something like
glmark2-es2-drm
, they will get initialized, and flutter apps will work now:This PR adds code to find suitable encoder and crtc from drm resources structure when they are absent. After this is applied, flutter apps can run on boot, even without crtcs and encoders assigned to connector.
As an extra protection measure, this adds guard code against SIGSEGV in gbm backend, in case no crtc is initialized.