[PATCHv2 2/3] hdmi: added unpack and logging functions for InfoFrames

Hans Verkuil hverkuil at xs4all.nl
Fri Dec 19 04:09:40 PST 2014


Hi Thierry,

On 12/18/2014 09:19 AM, Thierry Reding wrote:
>> +static int hdmi_avi_infoframe_unpack(struct hdmi_avi_infoframe *frame,
>> +				     void *buffer)
>> +{
>> +	u8 *ptr = buffer;
>> +	int ret;
>> +
>> +	if (ptr[0] != HDMI_INFOFRAME_TYPE_AVI ||
>> +	    ptr[1] != 2 ||
>> +	    ptr[2] != HDMI_AVI_INFOFRAME_SIZE)
>> +		return -EINVAL;
>> +
>> +	if (hdmi_infoframe_checksum(buffer, HDMI_INFOFRAME_SIZE(AVI)) != 0)
> 
> You use the parameterized HDMI_INFOFRAME_SIZE() here, but the plain
> macro above. Perhaps make those consistent?

I'm not sure what you mean here since HDMI_AVI_INFOFRAME_SIZE != HDMI_INFOFRAME_SIZE(AVI).
The latter includes the infoframe header size.

I'm assuming you missed that. If not, then please clarify.

Regards,

	Hans


More information about the dri-devel mailing list