[RFC PATCH 7/7] drm/i915: add DisplayPort CEC-Tunneling-over-AUX support

Jani Nikula jani.nikula at intel.com
Fri May 26 10:13:02 UTC 2017


On Thu, 25 May 2017, Hans Verkuil <hverkuil at xs4all.nl> wrote:
> @@ -4179,6 +4181,33 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>  	return -EINVAL;
>  }
>  
> +static bool
> +intel_dp_check_cec_status(struct intel_dp *intel_dp)
> +{
> +	bool handled = false;
> +
> +	for (;;) {
> +		u8 cec_irq;
> +		int ret;
> +
> +		ret = drm_dp_dpcd_readb(&intel_dp->aux,
> +					DP_DEVICE_SERVICE_IRQ_VECTOR_ESI1,
> +					&cec_irq);
> +		if (ret < 0 || !(cec_irq & DP_CEC_IRQ))
> +			return handled;
> +
> +		cec_irq &= ~DP_CEC_IRQ;
> +		drm_dp_cec_irq(&intel_dp->aux);
> +		handled = true;
> +
> +		ret = drm_dp_dpcd_writeb(&intel_dp->aux,
> +					 DP_DEVICE_SERVICE_IRQ_VECTOR_ESI1,
> +					 cec_irq);
> +		if (ret < 0)
> +			return handled;
> +	}

DP sinks suck. Please add a limit to the loop.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center


More information about the dri-devel mailing list