[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3AFD1DD4-AF0A-4ECC-B4F5-E6BD6B9F1BB7@gmail.com>
Date: Sun, 13 Mar 2022 11:12:59 +0100
From: Piotr Oniszczuk <piotr.oniszczuk@...il.com>
To: Peter Geis <pgwipeout@...il.com>
Cc: Andrzej Hajda <andrzej.hajda@...el.com>,
Neil Armstrong <narmstrong@...libre.com>,
Robert Foss <robert.foss@...aro.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Pierre-Hugues Husson <phh@....me>,
Archit Taneja <architt@...eaurora.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Robin Murphy <robin.murphy@....com>,
"open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
Heiko Stübner <heiko@...ech.de>,
dri-devel@...ts.freedesktop.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/bridge: synopsys/dw-hdmi: set cec clock rate
> Wiadomość napisana przez Peter Geis <pgwipeout@...il.com> w dniu 26.01.2022, o godz. 21:24:
>
> The hdmi-cec clock must be 32khz in order for cec to work correctly.
> Ensure after enabling the clock we set it in order for the hardware to
> work as expected.
> Warn on failure, in case this is a static clock that is slighty off.
> Fixes hdmi-cec support on Rockchip devices.
>
> Fixes: ebe32c3e282a ("drm/bridge: synopsys/dw-hdmi: Enable cec clock")
>
> Signed-off-by: Peter Geis <pgwipeout@...il.com>
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 54d8fdad395f..1a96da60e357 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -48,6 +48,9 @@
>
> #define HDMI14_MAX_TMDSCLK 340000000
>
> +/* HDMI CEC needs a clock rate of 32khz */
> +#define HDMI_CEC_CLK_RATE 32768
> +
> enum hdmi_datamap {
> RGB444_8B = 0x01,
> RGB444_10B = 0x03,
> @@ -3347,6 +3350,10 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
> ret);
> goto err_iahb;
> }
> +
> + ret = clk_set_rate(hdmi->cec_clk, HDMI_CEC_CLK_RATE);
> + if (ret)
> + dev_warn(hdmi->dev, "Cannot set HDMI cec clock rate: %d\n", ret);
> }
>
> /* Product and revision IDs */
> --
> 2.25.1
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
Peter,
On my 5.17-rc7 with applied rk356x VOP2 v8 series - this patch makes CEC working on rk3566.
Unfortunately it breaks working ok CEC on rk3399 rockpi-4b.
Reverting this patch brings back CEC on rk3399 - but rk3366 becomes with non working CEC
I'm not sure how to move forward with this....
br
Powered by blists - more mailing lists