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

Gwan-gyeong Mun gwan-gyeong.mun at intel.com
Wed Apr 10 17:18:59 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,
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..d902125c2c47 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5378,6 +5378,7 @@ intel_dp_set_edid(struct intel_dp *intel_dp)
 	intel_connector->detect_edid = edid;
 
 	intel_dp->has_audio = drm_detect_monitor_audio(edid);
+	drm_connector_update_edid_property(&intel_connector->base, edid);
 	drm_dp_cec_set_edid(&intel_dp->aux, edid);
 }
 
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index e1005d7b75fd..a081a7bb0dd6 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -2492,6 +2492,7 @@ intel_hdmi_set_edid(struct drm_connector *connector)
 		connected = true;
 	}
 
+	drm_connector_update_edid_property(connector, edid);
 	cec_notifier_set_phys_addr_from_edid(intel_hdmi->cec_notifier, edid);
 
 	return connected;
-- 
2.21.0



More information about the Intel-gfx-trybot mailing list