From a4b8fc6a84b3c14e70ecdcd4a7618ac09b291f33 Mon Sep 17 00:00:00 2001 From: Joy Cho Date: Fri, 4 Jan 2019 10:45:30 +0900 Subject: [PATCH] ODROID-N2: vout: set default vout mode as HDMI always initialized Change-Id: Id9adb4d3adbf95d61eb34ce9097a01738f54cb63 (cherry picked from commit 9c24c05ba1b04d53bf089644e16b1fb7ab468b0f) --- .../amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 1 + drivers/amlogic/media/vout/vout_serve/vout_serve.c | 9 +++++++++ 2 files changed, 10 insertions(+) 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 221988089a78..90c2e85254b0 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 @@ -3783,6 +3783,7 @@ static void hdmitx_hpd_plugin_handler(struct work_struct *work) rx_set_receive_hdcp(bksv_buf, 1, 1, 0, 0); } + set_disp_mode_auto(); hdmitx_set_audio(hdev, &(hdev->cur_audio_param)); hdev->hpd_state = 1; hdmitx_notify_hpd(hdev->hpd_state); diff --git a/drivers/amlogic/media/vout/vout_serve/vout_serve.c b/drivers/amlogic/media/vout/vout_serve/vout_serve.c index 0e425025354a..47cae404f91c 100644 --- a/drivers/amlogic/media/vout/vout_serve/vout_serve.c +++ b/drivers/amlogic/media/vout/vout_serve/vout_serve.c @@ -854,7 +854,16 @@ static int refresh_tvout_mode(void) if (tvout_monitor_flag == 0) return 0; +#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON) + /* + * vout mode is treated as HDMI always initialized + * even though HDMI cable is detached. + * TODO : except cvbs cable is plugged in. + */ + hpd_state = 1; +#else hpd_state = vout_get_hpd_state(); +#endif if (hpd_state) { cur_vmode = validate_vmode(hdmimode); snprintf(cur_mode_str, VMODE_NAME_LEN_MAX, "%s", hdmimode);