target: msm8x26: Add panel autodetection for 8x26
Adding support for autodetecting 720p/1080p panel
for 8x26 platform. This allows either panel to be
attached/replaced without any code change. Support
is currently added for DVT panels.
Change-Id: I115383a33fea2d49eee8023d2045b17bb2d663a7
diff --git a/target/msm8226/target_display.c b/target/msm8226/target_display.c
index d63352a..9b594e6 100755
--- a/target/msm8226/target_display.c
+++ b/target/msm8226/target_display.c
@@ -328,7 +328,20 @@
void display_init(void)
{
- gcdb_display_init(MDP_REV_50, MIPI_FB_ADDR);
+ uint32_t panel_loop = 0;
+ uint32_t ret = 0;
+
+ do {
+ ret = gcdb_display_init(MDP_REV_50, MIPI_FB_ADDR);
+ if (!ret || ret == ERR_NOT_SUPPORTED) {
+ break;
+ } else {
+ target_force_cont_splash_disable(true);
+ msm_display_off();
+ target_force_cont_splash_disable(false);
+ }
+ } while (++panel_loop <= oem_panel_max_auto_detect_panels());
+
}
void display_shutdown(void)