diff options
author | Neil Armstrong <narmstrong@baylibre.com> | 2021-04-19 10:32:42 +0300 |
---|---|---|
committer | Chun-Kuang Hu <chunkuang.hu@kernel.org> | 2021-05-13 02:27:23 +0300 |
commit | 41ca9caaae0bfc959b22dbcd59d88a7107707e17 (patch) | |
tree | bb8be326a03697a700e7f443a85802bc2802cf3b /drivers/gpu/drm/mediatek/mtk_hdmi.c | |
parent | 15870b97c36ab7fa07d4488b0a2457c2f2da6700 (diff) | |
download | linux-41ca9caaae0bfc959b22dbcd59d88a7107707e17.tar.xz |
drm/mediatek: hdmi: Add check for CEA modes only
Some SoCs like the MT8167 are not validated and supported for
HDMI modes out of HDMI CEA modes, so add a configuration boolean
to filter out non-CEA modes.
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/mediatek/mtk_hdmi.c')
-rw-r--r-- | drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index dea46d66e712..0539262e69d3 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -148,6 +148,7 @@ struct hdmi_audio_param { struct mtk_hdmi_conf { bool tz_disabled; + bool cea_modes_only; }; struct mtk_hdmi { @@ -1222,6 +1223,9 @@ static int mtk_hdmi_bridge_mode_valid(struct drm_bridge *bridge, return MODE_BAD; } + if (hdmi->conf->cea_modes_only && !drm_match_cea_mode(mode)) + return MODE_BAD; + if (mode->clock < 27000) return MODE_CLOCK_LOW; if (mode->clock > 297000) |