From a9f48b76f1dbc8c282e2a60f1f5eb3bb03ade33e Mon Sep 17 00:00:00 2001 From: codewalker Date: Thu, 13 Nov 2014 10:22:22 +0900 Subject: [PATCH] ODROIDC:hdmi: Try to read proper mode before video stream out Change-Id: I80d7bb91cc49f2cd4cdb8d961bcdea35f98ef7a1 (cherry picked from commit 5162ac8869a36453a8918e6d16d657f3d864dd3f) --- drivers/amlogic/hdmi/hdmi_tx/hdmi_tx.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx.c b/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx.c index 510fda19206f..116c98941faf 100755 --- a/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx.c +++ b/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx.c @@ -205,6 +205,9 @@ return value: 1, vout; 2, vout2; const vinfo_t * hdmi_get_current_vinfo(void) { const vinfo_t *info; + int count = 5; + +retry: #ifdef CONFIG_AM_TV_OUTPUT2 if(get_cur_vout_index() == 2){ info = get_current_vinfo2(); @@ -218,6 +221,12 @@ const vinfo_t * hdmi_get_current_vinfo(void) #else info = get_current_vinfo(); #endif + + if ((info == NULL) && (--count > 0)) { + msleep(500); + goto retry; + } + return info; }