From e76ffc8bdd5620138a7c8676df786700b94f49a9 Mon Sep 17 00:00:00 2001
From: Zongdong Jiao <zongdong.jiao@amlogic.com>
Date: Tue, 10 Aug 2021 13:15:14 +0800
Subject: [PATCH] hdmitx: adjust the hdmi resume power uevent [2/4]

PD#SWPL-56597

Problem:
Current the hdmi resume power uevent is early and before reading
edid, and this will make application can't get sink capability and
set the 480p as default

Solution:
Adjust the hdmi resume power uevent after reading edid

Verify:
g12/u212

Change-Id: I20acd118762d167ccfbf790c8fbace3171b0fda3
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
---
 drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c
index 5e9eb821f916..17f7ce3611d1 100644
--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c
+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c
@@ -287,7 +287,6 @@ static void hdmitx_late_resume(struct early_suspend *h)
 	const struct vinfo_s *info = hdmitx_get_current_vinfo();
 	struct hdmitx_dev *phdmi = (struct hdmitx_dev *)h->param;
 
-	extcon_set_state_sync(hdmitx_extcon_power, EXTCON_DISP_HDMI, 1);
 	/*open vpu clk*/
 	if (phdmi->hdmitx_clk_tree.hdmi_clk_vapb != NULL)
 		clk_prepare_enable(phdmi->hdmitx_clk_tree.hdmi_clk_vapb);
@@ -319,6 +318,7 @@ static void hdmitx_late_resume(struct early_suspend *h)
 
 	extcon_set_state_sync(hdmitx_extcon_hdmi, EXTCON_DISP_HDMI,
 		hdmitx_device.hpd_state);
+	extcon_set_state_sync(hdmitx_extcon_power, EXTCON_DISP_HDMI, 1);
 	extcon_set_state_sync(hdmitx_extcon_audio, EXTCON_DISP_HDMI,
 		hdmitx_device.hpd_state);
 
-- 
GitLab