[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250304-romantic-truthful-sambar-deaab1@houat>
Date: Tue, 4 Mar 2025 09:18:23 +0100
From: Maxime Ripard <mripard@...nel.org>
To: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
Cc: Vinod Koul <vkoul@...nel.org>,
Kishon Vijay Abraham I <kishon@...nel.org>, Heiko Stuebner <heiko@...ech.de>,
Algea Cao <algea.cao@...k-chips.com>, Sandor Yu <Sandor.yu@....com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>, kernel@...labora.com, linux-kernel@...r.kernel.org,
linux-phy@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH v4 08/12] phy: rockchip: samsung-hdptx: Provide config
params validation support
On Tue, Mar 04, 2025 at 03:44:07AM +0200, Cristian Ciocaltea wrote:
> Implement the phy_ops.validate() callback to allow checking the PHY
> configuration parameters without actually applying them.
>
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
> ---
> drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
> index 7e1d1c10758249aa5bbddbdaae0108bba04f30df..47db1395051f5d900197871694bab90ca4d6e38e 100644
> --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
> +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
> @@ -1482,6 +1482,17 @@ static int rk_hdptx_phy_verify_hdmi_config(struct rk_hdptx_phy *hdptx,
> if (!hdmi->tmds_char_rate || hdmi->tmds_char_rate > HDMI20_MAX_RATE)
> return -EINVAL;
>
> + u32 bit_rate = hdmi->tmds_char_rate / 100;
> + int i;
> +
> + for (i = 0; i < ARRAY_SIZE(ropll_tmds_cfg); i++)
> + if (bit_rate == ropll_tmds_cfg[i].bit_rate)
> + break;
> +
> + if (i == ARRAY_SIZE(ropll_tmds_cfg) &&
> + !rk_hdptx_phy_clk_pll_calc(bit_rate, NULL))
> + return -EINVAL;
What are you calling bit_rate here? If anything, I'd expect the bit_rate
to be a multiple of the char rate, not a divisor.
Maxime
Download attachment "signature.asc" of type "application/pgp-signature" (274 bytes)
Powered by blists - more mailing lists