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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux