[PATCH v6 2/2] drm/i915: Add a missed update of edid property of drm connector

Gwan-gyeong Mun gwan-gyeong.mun at intel.com
Fri Apr 12 14:06:17 UTC 2019


After suspend/resume process, hotplug detection is handled by
i915_hpd_poll_init_work() workqueue. While intel_hdmi_detect() or
intel_dp_detect() are called, intel_hdmi_set_edid() or intel_dp_set_edid()
only update an internal detect_edid variable of intel_connector.
A missed update of edid property of drm_connector leads incorrect behavior
of drm_helper_hpd_irq_event() on below testcases.
It adds a missed update of edid property of drm connector and updates
drm edid modes, while i915_hpd_poll_init_work() workqueue works.

Testcase: igt/kms_chamelium/hdmi-edid-change-during-hibernate
Testcase: igt/kms_chamelium/hdmi-edid-change-during-suspend
Testcase: igt/kms_chamelium/dp-edid-change-during-hibernate
Testcase: igt/kms_chamelium/dp-edid-change-during-suspend

Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c   | 1 +
 drivers/gpu/drm/i915/intel_hdmi.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index c4e36759a756..0301e58495b4 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5379,6 +5379,7 @@ intel_dp_set_edid(struct intel_dp *intel_dp)
 
 	intel_dp->has_audio = drm_detect_monitor_audio(edid);
 	drm_dp_cec_set_edid(&intel_dp->aux, edid);
+	intel_connector_update_modes(&intel_connector->base, edid);
 }
 
 static void
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index e1005d7b75fd..b53360c4d0ef 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -2493,6 +2493,7 @@ intel_hdmi_set_edid(struct drm_connector *connector)
 	}
 
 	cec_notifier_set_phys_addr_from_edid(intel_hdmi->cec_notifier, edid);
+	intel_connector_update_modes(connector, edid);
 
 	return connected;
 }
-- 
2.21.0



More information about the dri-devel mailing list