drm/rockchip: dw-hdmi-qp: Fix crash caused by excessive memory usage when resume

Each time edid is parsed, all resolutions are added to
connector->probed_modes. drm_connector_list_update() must
be called, it will remove useless modes. Otherwise
connector->probed_modes will continue to expand.

Change-Id: Ie61db721fa34e1cabc20209d87273e1b578ed36f
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao
2024-06-25 15:03:12 +08:00
committed by Tao Huang
parent 70fc302a5b
commit 85ebb3a26d

View File

@@ -4283,7 +4283,7 @@ void dw_hdmi_qp_resume(struct device *dev, struct dw_hdmi_qp *hdmi)
result = hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data);
if (result == connector_status_connected) {
mutex_lock(&hdmi->connector.dev->mode_config.mutex);
dw_hdmi_connector_get_modes(&hdmi->connector);
drm_helper_probe_single_connector_modes(&hdmi->connector, 9000, 9000);
mutex_unlock(&hdmi->connector.dev->mode_config.mutex);
}
}