From: Andy Yan <andy.yan@rock-chips.com>
To: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Heiko Stuebner <heiko@sntech.de>,
Algea Cao <algea.cao@rock-chips.com>,
Dmitry Baryshkov <lumag@kernel.org>
Cc: kernel@collabora.com, linux-phy@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
Sashiko <sashiko-bot@kernel.org>
Subject: Re: [PATCH v4 3/8] phy: rockchip: samsung-hdptx: Fix rate recalculation for 3.2GHz FRL
Date: Thu, 23 Jul 2026 19:50:02 +0800 [thread overview]
Message-ID: <3c35b6cc-2664-46fe-b3d9-d7a8edb0d4da@rock-chips.com> (raw)
In-Reply-To: <20260612-hdptx-clk-fixes-v4-3-ce5e1d456cda@collabora.com>
Hello,
On 6/12/26 07:45, Cristian Ciocaltea wrote:
> rk_hdptx_phy_clk_calc_rate_from_pll_cfg() is currently unable to handle
> cascade mode for the 3.2GHz FRL operating mode, as it relies solely on
> LCPLL_LCVCO_MODE_EN_MASK to determinate the rate from the
> rk_hdptx_frl_lcpll_cfg array. Since there is no entry for this
> particular rate, the function returns 0.
>
> This is the only rate which requires LC_REF_CLK_SEL to be set in
> GRF_HDPTX_CON0, hence extend the FRL matching accordingly.
>
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://sashiko.dev/#/patchset/20260611-hdptx-clk-fixes-v3-0-67b1b0c00e16@collabora.com?part=1
> Fixes: de5dba833118 ("phy: rockchip: samsung-hdptx: Add HDMI 2.1 FRL support")
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Andy Yan <andy.yan@rock-chips.com>
> ---
> drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 33 ++++++++++++++++-------
> 1 file changed, 24 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
> index 8c044381b83a..b210c1a88b25 100644
> --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
> +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
> @@ -2206,16 +2206,31 @@ static u64 rk_hdptx_phy_clk_calc_rate_from_pll_cfg(struct rk_hdptx_phy *hdptx)
> return 0;
> lcpll_hw.sdc_n = (val & LCPLL_SDC_N_MASK) >> 1;
>
> - for (i = 0; i < ARRAY_SIZE(rk_hdptx_frl_lcpll_cfg); i++) {
> - const struct lcpll_config *cfg = &rk_hdptx_frl_lcpll_cfg[i];
> + ret = regmap_read(hdptx->grf, GRF_HDPTX_CON0, &val);
> + if (ret)
> + return 0;
>
> - if (cfg->pms_mdiv == lcpll_hw.pms_mdiv &&
> - cfg->pms_sdiv == lcpll_hw.pms_sdiv &&
> - cfg->sdm_num_sign == lcpll_hw.sdm_num_sign &&
> - cfg->sdm_num == lcpll_hw.sdm_num &&
> - cfg->sdm_deno == lcpll_hw.sdm_deno &&
> - cfg->sdc_n == lcpll_hw.sdc_n)
> - return cfg->rate;
> + if (val & LC_REF_CLK_SEL) {
> + if (lcpll_hw.pms_mdiv == 0x6b &&
> + lcpll_hw.sdm_num_sign == 0x01 &&
> + lcpll_hw.sdm_num == 0x02 &&
> + lcpll_hw.sdm_deno == 0x09 &&
> + lcpll_hw.sdc_n == FIELD_GET(LCPLL_SDC_N_MASK, 0x02))
> + return FRL_8G4L_RATE;
> + } else {
> + const struct lcpll_config *cfg;
> +
> + for (i = 0; i < ARRAY_SIZE(rk_hdptx_frl_lcpll_cfg); i++) {
> + cfg = &rk_hdptx_frl_lcpll_cfg[i];
> +
> + if (cfg->pms_mdiv == lcpll_hw.pms_mdiv &&
> + cfg->pms_sdiv == lcpll_hw.pms_sdiv &&
> + cfg->sdm_num_sign == lcpll_hw.sdm_num_sign &&
> + cfg->sdm_num == lcpll_hw.sdm_num &&
> + cfg->sdm_deno == lcpll_hw.sdm_deno &&
> + cfg->sdc_n == lcpll_hw.sdc_n)
> + return cfg->rate;
> + }
> }
>
> dev_dbg(hdptx->dev, "%s no FRL match found\n", __func__);
>
next prev parent reply other threads:[~2026-07-23 12:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 23:45 [PATCH v4 0/8] phy: rockchip: samsung-hdptx: Clock fixes and API transition cleanups Cristian Ciocaltea
2026-06-11 23:45 ` [PATCH v4 1/8] phy: rockchip: samsung-hdptx: Fix rate recalculation for high bpc Cristian Ciocaltea
2026-07-16 12:27 ` Andy Yan
2026-07-20 13:24 ` Dmitry Baryshkov
2026-06-11 23:45 ` [PATCH v4 2/8] phy: rockchip: samsung-hdptx: Prevent divide-by-zero when computing clk rate Cristian Ciocaltea
2026-07-23 11:49 ` Andy Yan
2026-06-11 23:45 ` [PATCH v4 3/8] phy: rockchip: samsung-hdptx: Fix rate recalculation for 3.2GHz FRL Cristian Ciocaltea
2026-07-20 14:12 ` Dmitry Baryshkov
2026-07-23 11:50 ` Andy Yan [this message]
2026-06-11 23:45 ` [PATCH v4 4/8] phy: rockchip: samsung-hdptx: Handle uncommitted PHY config changes Cristian Ciocaltea
2026-07-20 14:17 ` Dmitry Baryshkov
2026-07-20 19:22 ` Cristian Ciocaltea
2026-07-23 11:50 ` Andy Yan
2026-06-11 23:45 ` [PATCH v4 5/8] phy: rockchip: samsung-hdptx: Drop TMDS rate setup workaround Cristian Ciocaltea
2026-07-20 14:19 ` Dmitry Baryshkov
2026-07-20 19:24 ` Cristian Ciocaltea
2026-07-23 11:51 ` Andy Yan
2026-07-23 12:11 ` Cristian Ciocaltea
2026-06-11 23:45 ` [PATCH v4 6/8] phy: rockchip: samsung-hdptx: Drop restrict_rate_change handling Cristian Ciocaltea
2026-07-20 14:26 ` Dmitry Baryshkov
2026-06-11 23:45 ` [PATCH v4 7/8] phy: rockchip: samsung-hdptx: Simplify GRF access with FIELD_PREP_WM16() Cristian Ciocaltea
2026-07-20 14:30 ` Dmitry Baryshkov
2026-06-11 23:45 ` [PATCH v4 8/8] phy: rockchip: samsung-hdptx: Consistently use bitfield macros Cristian Ciocaltea
2026-07-20 14:31 ` Dmitry Baryshkov
2026-07-01 18:50 ` [PATCH v4 0/8] phy: rockchip: samsung-hdptx: Clock fixes and API transition cleanups Diederik de Haas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3c35b6cc-2664-46fe-b3d9-d7a8edb0d4da@rock-chips.com \
--to=andy.yan@rock-chips.com \
--cc=algea.cao@rock-chips.com \
--cc=cristian.ciocaltea@collabora.com \
--cc=heiko@sntech.de \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=lumag@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=sashiko-bot@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®