[PATCH v2 1/2] drm: rockchip/hdmi: add Innosilicon HDMI support
郑阳
yang.zheng at rock-chips.com
Thu Jan 28 22:17:10 PST 2016
在 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".
> +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).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20160129/d1a08f4f/attachment.html>
More information about the dri-devel
mailing list