fastboot/recovery: wait for display

With GKI we find in certain situations the timing of the drivers
loading is delayed as compared to a monolithic kernel.  This
introduces a race where during second stage init, the attributes
inside /sys/bus/platform/drivers/drm_dsi_ctrl might not be set by
the time the menu is painted on the screen.

To address this, we wait for /sys/class/drm/card0 to instantiate.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151950334
Test: make sure user space fastbootd comes up reliably for a GKI kernel
Change-Id: I64c21529c21cdd8c8ad9908c8a57e933549986a5
This commit is contained in:
Mark Salyzyn 2020-05-13 08:47:56 -07:00 committed by Cyan_Hsieh
parent 3cbff385c0
commit 4507caba1c
1 changed files with 4 additions and 0 deletions

View File

@ -12,3 +12,7 @@ on init
# Block layer tuning: discard chunk size up to 128MB # Block layer tuning: discard chunk size up to 128MB
# Otherwise, contiguous discards can be merged # Otherwise, contiguous discards can be merged
write /sys/block/sda/queue/discard_max_bytes 134217728 write /sys/block/sda/queue/discard_max_bytes 134217728
on early-init
# Wait to make sure we do not try to talk too early to the display
wait /sys/class/drm/card0