From 85ebb3a26dd446a19b321f15fc6872278ed8dd01 Mon Sep 17 00:00:00 2001 From: Algea Cao Date: Tue, 25 Jun 2024 15:03:12 +0800 Subject: [PATCH] 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 --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c index e91379fef9fa..467081841bc8 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c @@ -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); } }