From 4507caba1c540347bc173f774e3f5c43d9fd6239 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Wed, 13 May 2020 08:47:56 -0700 Subject: [PATCH] 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 Bug: 151950334 Test: make sure user space fastbootd comes up reliably for a GKI kernel Change-Id: I64c21529c21cdd8c8ad9908c8a57e933549986a5 --- init.recovery.device.rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.recovery.device.rc b/init.recovery.device.rc index 72fc15a..474831d 100644 --- a/init.recovery.device.rc +++ b/init.recovery.device.rc @@ -12,3 +12,7 @@ on init # Block layer tuning: discard chunk size up to 128MB # Otherwise, contiguous discards can be merged 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