[Intel-gfx] [PATCH 05/10] drm/i915: Do not try to set DPMS if sink is disconnected

Ville Syrjälä ville.syrjala at linux.intel.com
Tue Oct 2 20:32:44 UTC 2018


On Tue, Oct 02, 2018 at 10:50:49AM -0700, José Roberto de Souza wrote:
> intel_dp_sink_dpms() is also called in the DP port disconnection
> flow, causing the DPCD transactions to fail due obvious reaons.
> So lets check the connector state before waste any time trying
> to do DPCD in a disconnected sink.
> 
> Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 2cd2dc564181..46ac603da91d 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2818,6 +2818,10 @@ void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode)
>  	if (intel_dp->dpcd[DP_DPCD_REV] < 0x11)
>  		return;
>  
> +	if (intel_dp->attached_connector->base.status !=
> +	    connector_status_connected)
> +		return;
> +

The user can stil yank the cable out at any time. So I don't see much 
point in trying to avoid this stuff. IMO better go through with the 
whole thing as normal rather than adding exceptions for things we
can't even control.

>  	if (mode != DRM_MODE_DPMS_ON) {
>  		if (downstream_hpd_needs_d0(intel_dp))
>  			return;
> -- 
> 2.19.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list