diff mbox series

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

Message ID 20190412140617.17648-3-gwan-gyeong.mun@intel.com (mailing list archive)
State New, archived
Headers show
Series drm: Add detection of changing of edid on between suspend and resume | expand

Commit Message

Gwan-gyeong Mun April 12, 2019, 2:06 p.m. UTC
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@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c   | 1 +
 drivers/gpu/drm/i915/intel_hdmi.c | 1 +
 2 files changed, 2 insertions(+)

Comments

Chris Wilson April 12, 2019, 2:09 p.m. UTC | #1
Quoting Gwan-gyeong Mun (2019-04-12 15:06:17)
> 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.

It's not missing. set_edid is called in detect, update_modes is called
from get_modes. It's the probe helper missing a call.
-Chris
diff mbox series

Patch

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;
 }