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

Hans Verkuil hverkuil at xs4all.nl
Fri May 26 10:13:21 UTC 2017


On 05/26/2017 12:13 PM, Jani Nikula wrote:
> 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.

Good to know. I wondered about that.

Regards,

	Hans


More information about the Intel-gfx mailing list