summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorEric Nelson <eric.nelson@boundarydevices.com>2014-01-23 14:53:52 -0700
committerPhilippe Schenker <philippe.schenker@toradex.com>2020-08-13 16:04:33 +0200
commitdb35b4b776946f453843e4125c08679e8a16fd94 (patch)
tree55738dac326b1c2acf7fc3d3fb6a3db4c4f86ff2 /drivers/video
parent6c01a073d68f988f864273680b672523523ec814 (diff)
mxc_hdmi: Add only_cea parameter to mxc_hdmi module
When this boolean parameter is true, only add CEA modes to modelist. Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com> Acked-by: Eric Nelson <eric.nelson@boundarydevices.com> (cherry picked from commit a78fe11904ebd4d3f72438f8b14dfa4eaab7d638) (cherry picked from commit d69533a9575de0aaeeaca19b4f5ed8ef794257a6) [rebased to 4.9, use bool as data type] Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 62051eeeae997877e2103d45b8bddb86a2f0d94b)
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/mxc/mxc_hdmi.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/fbdev/mxc/mxc_hdmi.c b/drivers/video/fbdev/mxc/mxc_hdmi.c
index 6d5eb65b6ef1..519d4dfc8ab4 100644
--- a/drivers/video/fbdev/mxc/mxc_hdmi.c
+++ b/drivers/video/fbdev/mxc/mxc_hdmi.c
@@ -72,6 +72,10 @@
#define YCBCR422_8BITS 3
#define XVYCC444 4
+static bool only_cea;
+module_param(only_cea, bool, 0644);
+MODULE_PARM_DESC(only_cea, "Allow only CEA modes");
+
/*
* We follow a flowchart which is in the "Synopsys DesignWare Courses
* HDMI Transmitter Controller User Guide, 1.30a", section 3.1
@@ -1809,7 +1813,7 @@ static void mxc_hdmi_edid_rebuild_modelist(struct mxc_hdmi *hdmi)
mode = &hdmi->fbi->monspecs.modedb[i];
if (!(mode->vmode & FB_VMODE_INTERLACED) &&
- (mxc_edid_mode_to_vic(mode) != 0)) {
+ (!only_cea || mxc_edid_mode_to_vic(mode))) {
dev_dbg(&hdmi->pdev->dev, "Added mode %d:", i);
dev_dbg(&hdmi->pdev->dev,
@@ -1957,8 +1961,9 @@ static void mxc_hdmi_cable_connected(struct mxc_hdmi *hdmi)
mxc_hdmi_edid_rebuild_modelist(hdmi);
break;
- /* Nothing to do if EDID same */
+ /* Rebuild even if they're the same in case only_cea changed */
case HDMI_EDID_SAME:
+ mxc_hdmi_edid_rebuild_modelist(hdmi);
break;
case HDMI_EDID_FAIL: