diff mbox series

[08/12] drm/i915/mst: Populate connector->ddc

Message ID 20230829113920.13713-9-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Populate connector->ddc always | expand

Commit Message

Ville Syrjälä Aug. 29, 2023, 11:39 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Populate connector->ddc, and thus create the "ddc" symlink
in sysfs for DP MST connectors.

TODO: test that this actually works

References: https://gitlab.freedesktop.org/drm/intel/-/issues/3605
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Jani Nikula Aug. 30, 2023, 12:08 p.m. UTC | #1
On Tue, 29 Aug 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Populate connector->ddc, and thus create the "ddc" symlink
> in sysfs for DP MST connectors.
>
> TODO: test that this actually works

:)

Seems legit,

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

>
> References: https://gitlab.freedesktop.org/drm/intel/-/issues/3605
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 2d1c42a5e684..0bf02a29e371 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -1104,8 +1104,10 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
>  	drm_dp_mst_get_port_malloc(port);
>  
>  	connector = &intel_connector->base;
> -	ret = drm_connector_init(dev, connector, &intel_dp_mst_connector_funcs,
> -				 DRM_MODE_CONNECTOR_DisplayPort);
> +	ret = drm_connector_init_with_ddc(dev, connector,
> +					  &intel_dp_mst_connector_funcs,
> +					  DRM_MODE_CONNECTOR_DisplayPort,
> +					  &port->aux.ddc);
>  	if (ret) {
>  		drm_dp_mst_put_port_malloc(port);
>  		intel_connector_free(intel_connector);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 2d1c42a5e684..0bf02a29e371 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -1104,8 +1104,10 @@  static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
 	drm_dp_mst_get_port_malloc(port);
 
 	connector = &intel_connector->base;
-	ret = drm_connector_init(dev, connector, &intel_dp_mst_connector_funcs,
-				 DRM_MODE_CONNECTOR_DisplayPort);
+	ret = drm_connector_init_with_ddc(dev, connector,
+					  &intel_dp_mst_connector_funcs,
+					  DRM_MODE_CONNECTOR_DisplayPort,
+					  &port->aux.ddc);
 	if (ret) {
 		drm_dp_mst_put_port_malloc(port);
 		intel_connector_free(intel_connector);