]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/dp: Populate connector->ddc
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 29 Aug 2023 11:39:15 +0000 (14:39 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 15 Sep 2023 11:47:59 +0000 (14:47 +0300)
Populate connector->ddc, and thus create the "ddc" symlink
in sysfs for analog DP SST connectors.

Let's also reorder intel_dp_aux_init() vs. drm_connector_init_with_ddc()
a bit to make sure the i2c aux ch is at least somewhat populated
before we pass it on, though drm_connector_init_with_ddc() does
not actually do anything with it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230829113920.13713-8-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_dp.c

index 55ba6eeaa810d6e936d89fa3155dabcfe3089c03..189c5737e63a7a1f5765c217904d5f0a9c5d9ba2 100644 (file)
@@ -5913,7 +5913,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
        }
 
        mutex_lock(&dev_priv->drm.mode_config.mutex);
-       drm_edid = drm_edid_read_ddc(connector, &intel_dp->aux.ddc);
+       drm_edid = drm_edid_read_ddc(connector, connector->ddc);
        if (!drm_edid) {
                /* Fallback to EDID from ACPI OpRegion, if any */
                drm_edid = intel_opregion_get_edid(intel_connector);
@@ -6052,12 +6052,15 @@ intel_dp_init_connector(struct intel_digital_port *dig_port,
        if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
                intel_dp->pps.active_pipe = vlv_active_pipe(intel_dp);
 
+       intel_dp_aux_init(intel_dp);
+
        drm_dbg_kms(&dev_priv->drm,
                    "Adding %s connector on [ENCODER:%d:%s]\n",
                    type == DRM_MODE_CONNECTOR_eDP ? "eDP" : "DP",
                    intel_encoder->base.base.id, intel_encoder->base.name);
 
-       drm_connector_init(dev, connector, &intel_dp_connector_funcs, type);
+       drm_connector_init_with_ddc(dev, connector, &intel_dp_connector_funcs,
+                                   type, &intel_dp->aux.ddc);
        drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs);
 
        if (!HAS_GMCH(dev_priv) && DISPLAY_VER(dev_priv) < 12)
@@ -6065,8 +6068,6 @@ intel_dp_init_connector(struct intel_digital_port *dig_port,
 
        intel_connector->polled = DRM_CONNECTOR_POLL_HPD;
 
-       intel_dp_aux_init(intel_dp);
-
        intel_connector_attach_encoder(intel_connector, intel_encoder);
 
        if (HAS_DDI(dev_priv))