[PATCH v2 1/2] drm: rockchip/hdmi: add Innosilicon HDMI support

Yakir Yang ykk at rock-chips.com
Thu Jan 28 22:31:57 PST 2016


Hi ZhengYang,

Thanks for your comments ;)

On 01/29/2016 02:17 PM, 郑阳 wrote:
> 在 2016年01月07日 18:03, Yakir Yang 写道:
>> diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c
>> new file mode 100644
>> index 0000000..9327617
>> --- /dev/null
>> +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
>>
>> +static int inno_hdmi_config_video_avi(struct inno_hdmi *hdmi)
>> +{
>> +
>> +	if (hdmi->hdmi_data.enc_out_format == HDMI_COLORSPACE_RGB) + 
>> avi_color_mode = AVI_COLOR_MODE_RGB;
>> +	else if (hdmi->hdmi_data.enc_out_format == HDMI_COLORSPACE_YUV444)
>> +		avi_color_mode = AVI_COLOR_MODE_YCBCR444;
>> +	else if (hdmi->hdmi_data.enc_out_format == HDMI_COLORSPACE_YUV422)
>> +		avi_color_mode = AVI_COLOR_MODE_YCBCR422;
>> +	else
>> +		avi_color_mode = AVI_COLOR_MODE_RGB;
>> +
> Fist if is no need, its result is same to "else".
Got it
>> +static int inno_hdmi_config_video_csc(struct inno_hdmi *hdmi)
>> +{
>>
>> +	if (data->enc_out_format == data->enc_out_format)  {
>> +		if ((data->enc_in_format == HDMI_COLORSPACE_RGB) ||
>> +		    (data->enc_in_format >= HDMI_COLORSPACE_YUV444)) {
>> +			value = v_SOF_DISABLE | v_COLOR_DEPTH_NOT_INDICATED(1);
>> +			hdmi_writeb(hdmi, HDMI_VIDEO_CONTRL3, value);
>> +
>> +			hdmi_modb(hdmi, HDMI_VIDEO_CONTRL,
>> +				  m_VIDEO_AUTO_CSC | m_VIDEO_C0_C2_SWAP,
>> +				  v_VIDEO_AUTO_CSC(AUTO_CSC_DISABLE) |
>> +				  v_VIDEO_C0_C2_SWAP(C0_C2_CHANGE_DISABLE));
>> +			return 0;
>> +		}
>> +	}
>>
> It seems should be if (data->enc_in_format == data->enc_out_format).
>
Ah, good catch, thanks

- Yakir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20160129/7f63372c/attachment-0001.html>


More information about the dri-devel mailing list