Skip to content

Commit f2c34aa

Browse files
committed
video: mxc_hdmi: Add command line switch to disable EDID processing.
Allow the use of the fallback videomode list even in case a valid EDID is obtainable. This is done by adding 'mxc_hdmi.ignore_edid=1' to the kernel command line. Signed-off-by: Rudi <r.ihle@s-t.de>
1 parent 60251e8 commit f2c34aa

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

drivers/video/mxc/mxc_hdmi.c

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ static char *rgb_quant_range = "auto";
222222
module_param(rgb_quant_range, charp, S_IRUGO);
223223
MODULE_PARM_DESC(rgb_quant_range, "RGB Quant Range (auto, default, limited, full)");
224224

225+
static bool ignore_edid = 0;
226+
module_param(ignore_edid, bool, S_IRUGO);
227+
MODULE_PARM_DESC(ignore_edid, "Ignore EDID (default=0)");
228+
225229
static struct platform_device_id imx_hdmi_devtype[] = {
226230
{
227231
.name = "hdmi-imx6DL",
@@ -2062,19 +2066,23 @@ static void mxc_hdmi_cable_connected(struct mxc_hdmi *hdmi)
20622066
hdmi->hp_state = HDMI_HOTPLUG_CONNECTED_NO_EDID;
20632067

20642068
/* HDMI Initialization Step C */
2065-
edid_status = mxc_hdmi_read_edid(hdmi);
2066-
2067-
/* Read EDID again if first EDID read failed */
2068-
if (edid_status == HDMI_EDID_NO_MODES ||
2069-
edid_status == HDMI_EDID_FAIL) {
2070-
int retry_status;
2071-
dev_warn(&hdmi->pdev->dev, "Read EDID again\n");
2072-
msleep(200);
2073-
retry_status = mxc_hdmi_read_edid(hdmi);
2074-
/* If we get NO_MODES on the 1st and SAME on the 2nd attempt we
2075-
* want NO_MODES as final result. */
2076-
if (retry_status != HDMI_EDID_SAME)
2077-
edid_status = retry_status;
2069+
if (ignore_edid) {
2070+
edid_status = HDMI_EDID_FAIL;
2071+
} else {
2072+
edid_status = mxc_hdmi_read_edid(hdmi);
2073+
2074+
/* Read EDID again if first EDID read failed */
2075+
if (edid_status == HDMI_EDID_NO_MODES ||
2076+
edid_status == HDMI_EDID_FAIL) {
2077+
int retry_status;
2078+
dev_warn(&hdmi->pdev->dev, "Read EDID again\n");
2079+
msleep(200);
2080+
retry_status = mxc_hdmi_read_edid(hdmi);
2081+
/* If we get NO_MODES on the 1st and SAME on the 2nd attempt we
2082+
* want NO_MODES as final result. */
2083+
if (retry_status != HDMI_EDID_SAME)
2084+
edid_status = retry_status;
2085+
}
20782086
}
20792087

20802088
/* HDMI Initialization Steps D, E, F */

0 commit comments

Comments
 (0)