From 9c24c05ba1b04d53bf089644e16b1fb7ab468b0f 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 --- .../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 756ce6c3056c..f835a4cc4684 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 @@ -3492,6 +3492,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 9821a41aeab2..5c448a50c622 100644 --- a/drivers/amlogic/media/vout/vout_serve/vout_serve.c +++ b/drivers/amlogic/media/vout/vout_serve/vout_serve.c @@ -821,7 +821,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);