Emulate hotplug to make DVI monitors work through HDMI-to-DVI
dongle. In the last hdmi state, enabled_state, force trigger
hotplug for the HDMi go through clean power off, read EDID,
power on, and configure sequence.
bug
1495496
Change-Id: I0d9c3d7e5d1244d677a0d547c68c6cb9f961a956
Signed-off-by: Jong Kim <jongk@nvidia.com>
Reviewed-on: http://git-master/r/392977
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>
}
/* Enable DC when hotplug succeeds */
+static int emulate_hotplug = 1;
static void handle_enable_l(struct tegra_dc_hdmi_data *hdmi)
{
tegra_dc_enable(hdmi->dc);
+ if (emulate_hotplug) {
+ emulate_hotplug = 0;
+ hdmi_reread_edid(hdmi->dc);
+ }
}
/************************************************************
return ret;
}
+
+bool hdmi_reread_edid(struct tegra_dc *dc)
+{
+ struct tegra_dc_hdmi_data *hdmi = tegra_dc_get_outdata(dc);
+
+ handle_check_edid_l(hdmi);
+ hdmi_state_machine_handle_hpd_l(0);
+ return dc->connected;
+}
* HDMI library support functions for Nvidia Tegra processors.
*
* Copyright (C) 2013 Google - http://www.google.com/
- * Copyright (C) 2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (C) 2013-2014, NVIDIA CORPORATION. All rights reserved.
* Authors: John Grossman <johngro@google.com>
* Authors: Mike J. Chen <mjchen@google.com>
*
void hdmi_state_machine_shutdown(void);
void hdmi_state_machine_set_pending_hpd(void);
int hdmi_state_machine_get_state(void);
+bool hdmi_reread_edid(struct tegra_dc *dc);
#endif /* __TEGRA_HDMI_STATE_MACHINE_H */