ODROID-M1/M1S: Implement disablehpd.

If HDMIOutput does not work with some monitors,
you must add 'disablehpd=true' in bootargs.

Change-Id: Ie0131de2073bd4530c883cc10c92e56bd52ab044
This commit is contained in:
Chris
2022-04-19 17:34:44 +09:00
committed by codewalkerster
parent 624498b9f0
commit ba8291cd0f

View File

@@ -347,6 +347,21 @@ struct dw_hdmi {
(HDMI_PHY_RX_SENSE0 | HDMI_PHY_RX_SENSE1 | \
HDMI_PHY_RX_SENSE2 | HDMI_PHY_RX_SENSE3)
#if defined(CONFIG_ARCH_ROCKCHIP_ODROID_COMMON)
static bool disableHPD = false;
static int __init disableHPD_setup(char *s)
{
if (!(strcmp(s, "true")))
disableHPD = true;
else
disableHPD = false;
return 0;
}
__setup("disablehpd=", disableHPD_setup);
#endif
static inline void hdmi_writeb(struct dw_hdmi *hdmi, u8 val, int offset)
{
regmap_write(hdmi->regm, offset << hdmi->reg_shift, val);
@@ -3140,6 +3155,10 @@ static enum drm_connector_status dw_hdmi_detect(struct dw_hdmi *hdmi)
}
mutex_unlock(&hdmi->mutex);
#if defined(CONFIG_ARCH_ROCKCHIP_ODROID_COMMON)
if (disableHPD)
result = connector_status_connected;
#endif
if (result == connector_status_connected)
extcon_set_state_sync(hdmi->extcon, EXTCON_DISP_HDMI, true);
else