Revert "drm/sunxi-hdmi: keep forced connector connected"

This reverts commit a2acb6fcd7fd125f43fe349b9d949150e275767e.
This commit is contained in:
Qubot 2026-06-05 22:55:13 +08:00
parent a2acb6fcd7
commit a4af679490

View File

@ -1479,21 +1479,6 @@ static int _sunxi_drv_hdmi_thread(void *parg)
} else if (ret == 0x2)
goto next_loop;
/*
* The kernel command line may force the connector on
* (video=HDMI-A-1:e). In that mode a transient HPD low after a
* modeset/DPMS transition must not be treated as a real unplug,
* otherwise the driver tears down HDMI and immediately modesets it
* again, which shows up as a periodic HDMI "jump" on screen.
*/
if (hdmi->hdmi_ctrl.drm_hpd_force == DRM_FORCE_ON) {
if (!_sunxi_drv_hdmi_hpd_get(hdmi)) {
temp_hpd = 1;
goto handle_change;
}
goto next_loop;
}
/* check physical hpd state */
temp_hpd = sunxi_hdmi_get_hpd();
if (temp_hpd == _sunxi_drv_hdmi_hpd_get(hdmi))
@ -2679,8 +2664,7 @@ static int _sunxi_drm_hdmi_get_modes(struct drm_connector *connector)
return -1;
}
if (!_sunxi_drv_hdmi_hpd_get(hdmi) &&
hdmi->hdmi_ctrl.drm_hpd_force != DRM_FORCE_ON)
if (!_sunxi_drv_hdmi_hpd_get(hdmi))
return -1;
ret = _sunxi_drv_hdmi_read_edid(hdmi);
@ -2788,10 +2772,7 @@ _sunxi_drm_hdmi_detect(struct drm_connector *connector, bool force)
return ret;
}
if (hdmi->hdmi_ctrl.drm_hpd_force == DRM_FORCE_ON)
ret = 1;
else
ret = _sunxi_drv_hdmi_hpd_get(hdmi);
ret = _sunxi_drv_hdmi_hpd_get(hdmi);
hdmi_inf("drm hdmi detect: %s\n", ret ? "connect" : "disconnect");
return ret == 1 ? connector_status_connected : connector_status_disconnected;
}
@ -2808,13 +2789,10 @@ static void _sunxi_drm_hdmi_force(struct drm_connector *connector)
hdmi->hdmi_ctrl.drm_hpd_force = (int)connector->force;
if (connector->force == DRM_FORCE_ON) {
if (connector->force == DRM_FORCE_ON)
_sunxi_drv_hdmi_hpd_plugin(hdmi);
_sunxi_drv_hdmi_hpd_set(hdmi, 0x1);
} else if (connector->force == DRM_FORCE_OFF) {
else if (connector->force == DRM_FORCE_OFF)
_sunxi_drv_hdmi_hpd_plugout(hdmi);
_sunxi_drv_hdmi_hpd_set(hdmi, 0x0);
}
hdmi_inf("drm hdmi set force hpd: %s\n", force_string[connector->force]);
}