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

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

index b386894c3a6db2f25119ea726826f6300c69facc..d9f427856fb82e53be582d1c3ed43cf366cd671e 100644 (file)
@@ -328,7 +328,6 @@ intel_dvo_detect(struct drm_connector *_connector, bool force)
 static int intel_dvo_get_modes(struct drm_connector *_connector)
 {
        struct intel_connector *connector = to_intel_connector(_connector);
-       struct drm_i915_private *i915 = to_i915(connector->base.dev);
        int num_modes;
 
        /*
@@ -337,8 +336,7 @@ static int intel_dvo_get_modes(struct drm_connector *_connector)
         * (TV-out, for example), but for now with just TMDS and LVDS,
         * that's not the case.
         */
-       num_modes = intel_ddc_get_modes(&connector->base,
-                                       intel_gmbus_get_adapter(i915, GMBUS_PIN_DPC));
+       num_modes = intel_ddc_get_modes(&connector->base, connector->base.ddc);
        if (num_modes)
                return num_modes;
 
@@ -533,9 +531,10 @@ void intel_dvo_init(struct drm_i915_private *i915)
                connector->polled = DRM_CONNECTOR_POLL_CONNECT |
                        DRM_CONNECTOR_POLL_DISCONNECT;
 
-       drm_connector_init(&i915->drm, &connector->base,
-                          &intel_dvo_connector_funcs,
-                          intel_dvo_connector_type(&intel_dvo->dev));
+       drm_connector_init_with_ddc(&i915->drm, &connector->base,
+                                   &intel_dvo_connector_funcs,
+                                   intel_dvo_connector_type(&intel_dvo->dev),
+                                   intel_gmbus_get_adapter(i915, GMBUS_PIN_DPC));
 
        drm_connector_helper_add(&connector->base,
                                 &intel_dvo_connector_helper_funcs);