[ create a new paste ] login | about

Link: http://codepad.org/2nRCGdin    [ raw code | fork ]

C, pasted on Dec 17:
--- drivers/video/mxc_hdmi.c	2013-12-16 15:25:34.903913315 +0100
+++ drivers/video/mxc_hdmi.c	2013-12-16 20:41:51.456335696 +0100
@@ -1501,7 +1501,16 @@
 	int i, j, ret;
 	unsigned char *ediddata = edid;
 	unsigned char tmpedid[EDID_LENGTH];
-
+unsigned char myedid[128] = {
+0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x4C, 0x2D, 0x55, 0x02, 0x32, 0x32, 0x50, 0x44,
+0x07, 0x12, 0x01, 0x03, 0x80, 0x2F, 0x1E, 0x78, 0x2A, 0xD5, 0x15, 0xA4, 0x55, 0x49, 0x9A, 0x27,
+0x14, 0x50, 0x54, 0xBF, 0xEF, 0x80, 0xB3, 0x00, 0x81, 0x80, 0x81, 0x40, 0x71, 0x4F, 0x01, 0x01,
+0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x21, 0x39, 0x90, 0x30, 0x62, 0x1A, 0x27, 0x40, 0x68, 0xB0,
+0x36, 0x00, 0xDA, 0x28, 0x11, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x38, 0x4B, 0x1E,
+0x51, 0x11, 0x00, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x53,
+0x79, 0x6E, 0x63, 0x4D, 0x61, 0x73, 0x74, 0x65, 0x72, 0x0A, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFF,
+0x00, 0x48, 0x53, 0x31, 0x51, 0x32, 0x30, 0x30, 0x37, 0x34, 0x32, 0x0A, 0x20, 0x20, 0x00, 0x7A
+};
 	dev_info(&hdmi->pdev->dev, "%s\n", __func__);
 
 	if (!edid || !cfg || !fbi)
@@ -1534,41 +1543,37 @@
 	memset(edid, 0, EDID_LENGTH*4);
 	memset(cfg, 0, sizeof(struct mxc_edid_cfg));
 
-	/* Check first three byte of EDID head */
+	/* Check first three byte of EDID head 
 	if (!(hdmi_edid_i2c_read(hdmi, 0, 0) == 0x00) ||
 		!(hdmi_edid_i2c_read(hdmi, 1, 0) == 0xFF) ||
 		!(hdmi_edid_i2c_read(hdmi, 2, 0) == 0xFF)) {
 		dev_info(&hdmi->pdev->dev, "EDID head check failed!");
 		return -ENOENT;
 	}
-
+*/
 	for (i = 0; i < 128; i++) {
-		*ediddata = hdmi_edid_i2c_read(hdmi, i, 0);
+//		*ediddata = hdmi_edid_i2c_read(hdmi, i, 0);
+		edid[i] = myedid[i];
+//		dev_info(&hdmi->pdev->dev, "reading edid");	
 		ediddata++;
 	}
 
 	extblknum = edid[0x7E];
-	if (extblknum < 0)
+	if (extblknum < 0) {
+		dev_info(&hdmi->pdev->dev, "extblknum < 0");
 		return extblknum;
-
+		}
 	if (extblknum) {
 		ediddata = edid + EDID_LENGTH;
 		for (i = 0; i < 128; i++) {
 			*ediddata = hdmi_edid_i2c_read(hdmi, i, 1);
+			dev_info(&hdmi->pdev->dev, "reading edid block");
 			ediddata++;
 		}
 	}
 
-	/* edid first block parsing */
-	memset(&fbi->monspecs, 0, sizeof(fbi->monspecs));
-	fb_edid_to_monspecs(edid, &fbi->monspecs);
-
-	ret = mxc_edid_parse_ext_blk(edid + EDID_LENGTH,
-			cfg, &fbi->monspecs);
-	if (ret < 0)
-		return -ENOENT;
 
-	/* need read segment block? */
+	/* edid first block parsing */
 	if (extblknum > 1) {
 		for (j = 1; j <= extblknum; j++) {
 			for (i = 0; i < 128; i++)
@@ -1577,6 +1582,7 @@
 			/* edid ext block parsing */
 			ret = mxc_edid_parse_ext_blk(tmpedid + EDID_LENGTH,
 					cfg, &fbi->monspecs);
+			dev_info(&hdmi->pdev->dev, "extblknum > 1");
 			if (ret < 0)
 				return -ENOENT;
 		}
@@ -1596,32 +1602,34 @@
 	/* save old edid */
 	memcpy(edid_old, hdmi->edid, HDMI_EDID_LEN);
 
-	if (!hdmi->hdmi_data.hdcp_enable)
+/*	if (!hdmi->hdmi_data.hdcp_enable)
 		ret = mxc_edid_read(hdmi_i2c->adapter, hdmi_i2c->addr,
 				hdmi->edid, &hdmi->edid_cfg, hdmi->fbi);
 	else {
-
+*/
 		/* Disable HDCP clk */
-		if (hdmi->hdmi_data.hdcp_enable) {
+/*		if (hdmi->hdmi_data.hdcp_enable) {
 			clkdis = hdmi_readb(HDMI_MC_CLKDIS);
 			clkdis |= HDMI_MC_CLKDIS_HDCPCLK_DISABLE;
 			hdmi_writeb(clkdis, HDMI_MC_CLKDIS);
-		}
-
+			dev_info(&hdmi->pdev->dev, "Disable HDCP clk");
+		} */
 		ret = mxc_edid_read_internal(hdmi, hdmi->edid,
 				&hdmi->edid_cfg, hdmi->fbi);
 
 		/* Enable HDCP clk */
-		if (hdmi->hdmi_data.hdcp_enable) {
+/*		if (hdmi->hdmi_data.hdcp_enable) {
 			clkdis = hdmi_readb(HDMI_MC_CLKDIS);
 			clkdis &= ~HDMI_MC_CLKDIS_HDCPCLK_DISABLE;
 			hdmi_writeb(clkdis, HDMI_MC_CLKDIS);
-		}
+			dev_info(&hdmi->pdev->dev, "Disable HDCP clk");
+		} 
 
-	}
+	} */
 	if (ret < 0)
 		return HDMI_EDID_FAIL;
 
+
 	/* Save edid cfg for audio driver */
 	hdmi_set_edid_cfg(&hdmi->edid_cfg);
 
@@ -1996,6 +2004,7 @@
 	struct mxc_hdmi *hdmi =
 		container_of(delay_work, struct mxc_hdmi, hotplug_work);
 	u32 hdmi_phy_stat0, hdmi_phy_pol0, hdmi_phy_mask0;
+	u8 val;
 	unsigned long flags;
 	char event_string[32];
 	char *envp[] = { event_string, NULL };
@@ -2319,7 +2328,7 @@
 			hdmi->blank = *((int *)event->data);
 
 			if (hdmi->fb_reg && hdmi->cable_plugin)
-				mxc_hdmi_setup(hdmi, val);
+//				mxc_hdmi_setup(hdmi, val);
 			hdmi_set_blank_state(1);
 
 		} else if (*((int *)event->data) != hdmi->blank) {


Create a new paste based on this one


Comments: