Re: [PATCH 07/12] drm/i915/dp: Populate connector->ddc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 29 Aug 2023, Ville Syrjala <ville.syrjala@xxxxxxxxxxxxxxx> wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxxx>

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

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 05694e0b6143..9b35b1d6adbb 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5914,7 +5914,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);
> @@ -6053,12 +6053,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)
> @@ -6066,8 +6069,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))

-- 
Jani Nikula, Intel Open Source Graphics Center




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux