summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorEric Nelson <eric.nelson@boundarydevices.com>2014-01-23 14:53:52 -0700
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-02-09 22:42:32 +0100
commitdb1e4823c944ce9672a229550ac6a213b1bfe72c (patch)
tree800b7b36c94d87d70c3714bd9dbccd72e0670939 /drivers/video
parent770a6273ca671fff723bf9795994007e0abb3b78 (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>
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 13eb24d6f79a..e1fb357740a2 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
@@ -1806,7 +1810,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,
@@ -1954,8 +1958,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: