[PATCH 09/11] drm/i915/hdmi: Set/Reset SCDC port while set/unset edid
Ankit Nautiyal
ankit.k.nautiyal at intel.com
Wed Mar 9 06:47:40 UTC 2022
Initialize the scdc port for GMBUS and unset the GPIO pin pair
for that port, so that hardware can unmask SCDC Interrupts.
Reset the scdc port to SCDC_PORT_NONE while unset edid.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
drivers/gpu/drm/i915/display/intel_hdmi.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 36d4d086d8e7..966cbf63aa38 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -2323,6 +2323,9 @@ static void
intel_hdmi_unset_edid(struct drm_connector *connector)
{
struct intel_hdmi *intel_hdmi = intel_attached_hdmi(to_intel_connector(connector));
+ struct drm_i915_private *dev_priv = to_i915(connector->dev);
+ struct i2c_adapter *adapter =
+ intel_gmbus_get_adapter(dev_priv, intel_hdmi->ddc_bus);
intel_hdmi->has_hdmi_sink = false;
intel_hdmi->has_audio = false;
@@ -2332,6 +2335,7 @@ intel_hdmi_unset_edid(struct drm_connector *connector)
kfree(to_intel_connector(connector)->detect_edid);
to_intel_connector(connector)->detect_edid = NULL;
+ intel_gmbus_set_scdc_port(adapter, SCDC_PORT_NONE);
}
static void
@@ -2417,6 +2421,14 @@ intel_hdmi_set_edid(struct drm_connector *connector)
intel_hdmi_dp_dual_mode_detect(connector, edid != NULL);
+ if (connector->display_info.hdmi.scdc.read_request) {
+ struct intel_encoder *encoder = &hdmi_to_dig_port(intel_hdmi)->base;
+ enum scdc_pin scdc = intel_hdmi_get_scdc_pin(encoder);
+
+ intel_gmbus_set_scdc_port(i2c, scdc);
+ intel_gmbus_unmask_scdc_pins(i2c);
+ }
+
intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS, wakeref);
to_intel_connector(connector)->detect_edid = edid;
--
2.25.1
More information about the Intel-gfx-trybot
mailing list