minui: Handle the failures from the drm backend in gr_init
In a charger mode manual test, we encounter failures from the MinuiBackendDrm when calling DrmEnableCrtc and Flip. To make the minui more robust, we should fall back to another backend if drm's SetCrtc fails. And check the value of gr_draw before dereferencing. Bug: 80249440 Test: boot to recovery Change-Id: Ibd1ca1fb1115fe1132684586c54eccd8fb4c3ad9
This commit is contained in:
@@ -356,6 +356,10 @@ int gr_init() {
|
||||
|
||||
gr_flip();
|
||||
gr_flip();
|
||||
if (!gr_draw) {
|
||||
printf("gr_init: gr_draw becomes nullptr after gr_flip\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
gr_rotate(DEFAULT_ROTATION);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user