[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAOTY_-N4D2PJR0-YG3r+tLg0kcFZh8zyN=7kBNJsghpZG4nDA@mail.gmail.com>
Date: Sat, 24 Apr 2021 08:24:45 +0800
From: Chun-Kuang Hu <chunkuang.hu@...nel.org>
To: Neil Armstrong <narmstrong@...libre.com>
Cc: Chun-Kuang Hu <chunkuang.hu@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Matthias Brugger <matthias.bgg@...il.com>,
DRI Development <dri-devel@...ts.freedesktop.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Fabien Parent <fparent@...libre.com>
Subject: Re: [PATCH v3 4/5] gpu/drm: mediatek: hdmi: add optional limit on
maximal HDMI mode clock
Hi, Neil:
Neil Armstrong <narmstrong@...libre.com> 於 2021年4月19日 週一 下午3:33寫道:
>
> Some SoCs like the MT8167 have a hard limit on the maximal supported HDMI TMDS
> clock, so add a configuration value to filter out those modes.
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@...nel.org>
>
> Signed-off-by: Fabien Parent <fparent@...libre.com>
> Signed-off-by: Neil Armstrong <narmstrong@...libre.com>
> ---
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> index 0539262e69d3..bc50d97f2553 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> @@ -149,6 +149,7 @@ struct hdmi_audio_param {
> struct mtk_hdmi_conf {
> bool tz_disabled;
> bool cea_modes_only;
> + unsigned long max_mode_clock;
> };
>
> struct mtk_hdmi {
> @@ -1226,6 +1227,10 @@ static int mtk_hdmi_bridge_mode_valid(struct drm_bridge *bridge,
> if (hdmi->conf->cea_modes_only && !drm_match_cea_mode(mode))
> return MODE_BAD;
>
> + if (hdmi->conf->max_mode_clock &&
> + mode->clock > hdmi->conf->max_mode_clock)
> + return MODE_CLOCK_HIGH;
> +
> if (mode->clock < 27000)
> return MODE_CLOCK_LOW;
> if (mode->clock > 297000)
> --
> 2.25.1
>
Powered by blists - more mailing lists