From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Algea Cao <algea.cao@rock-chips.com>,
Sandor Yu <Sandor.yu@nxp.com>, Maxime Ripard <mripard@kernel.org>,
kernel@collabora.com, linux-kernel@vger.kernel.org,
linux-phy@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org
Subject: Re: [PATCH v5 08/12] phy: rockchip: samsung-hdptx: Setup TMDS char rate via phy_configure_opts_hdmi
Date: Sun, 9 Mar 2025 12:15:24 +0200 [thread overview]
Message-ID: <6caefe9f-1b15-41c1-94f2-9a2a92aeec67@collabora.com> (raw)
In-Reply-To: <CAA8EJpoGu4Tq-wt09Jj+b+=eJ3dNXhPWVOg4DyCQxrJbFNFfYw@mail.gmail.com>
On 3/9/25 11:26 AM, Dmitry Baryshkov wrote:
> On Sat, 8 Mar 2025 at 14:21, Cristian Ciocaltea
> <cristian.ciocaltea@collabora.com> wrote:
>>
>> The current workaround to setup the TMDS character rate relies on the
>> unconventional usage of phy_set_bus_width().
>>
>> Make use of the recently introduced HDMI PHY configuration API to
>> properly handle the setup. The workaround will be dropped as soon as
>> the switch has been completed on both ends.
>>
>> Rename rk_hdptx_phy_verify_config() to rk_hdptx_phy_verify_dp_config()
>> and introduce the rk_hdptx_phy_verify_hdmi_config() helper to check the
>> HDMI parameters during phy_configure().
>>
>> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
>> ---
>> drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 64 +++++++++++++++++------
>> 1 file changed, 47 insertions(+), 17 deletions(-)
>>
>
>> @@ -1469,8 +1474,27 @@ static int rk_hdptx_phy_power_off(struct phy *phy)
>> return rk_hdptx_phy_consumer_put(hdptx, false);
>> }
>>
>> -static int rk_hdptx_phy_verify_config(struct rk_hdptx_phy *hdptx,
>> - struct phy_configure_opts_dp *dp)
>> +static int rk_hdptx_phy_verify_hdmi_config(struct rk_hdptx_phy *hdptx,
>> + struct phy_configure_opts_hdmi *hdmi)
>> +{
>> + int i;
>> +
>> + if (!hdmi->tmds_char_rate || hdmi->tmds_char_rate > HDMI20_MAX_RATE)
>> + return -EINVAL;
>> +
>> + for (i = 0; i < ARRAY_SIZE(ropll_tmds_cfg); i++)
>> + if (hdmi->tmds_char_rate == ropll_tmds_cfg[i].rate)
>> + break;
>
> return 0;
>
>> +
>> + if (i == ARRAY_SIZE(ropll_tmds_cfg) &&
>
> Then you can drop the first clause in the if
Sure, will do!
Thanks,
Cristian
next prev parent reply other threads:[~2025-03-09 10:21 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-08 12:21 [PATCH v5 00/12] phy: rockchip: samsung-hdptx: Support high color depth management Cristian Ciocaltea
2025-03-08 12:21 ` [PATCH v5 01/12] phy: Add HDMI configuration options Cristian Ciocaltea
2025-03-08 12:21 ` [PATCH v5 02/12] phy: hdmi: Add color depth configuration Cristian Ciocaltea
2025-03-09 9:16 ` Dmitry Baryshkov
2025-03-09 10:10 ` Cristian Ciocaltea
2025-03-09 10:10 ` Dmitry Baryshkov
2025-03-08 12:21 ` [PATCH v5 03/12] phy: rockchip: samsung-hdptx: Fix clock ratio setup Cristian Ciocaltea
2025-03-09 9:17 ` Dmitry Baryshkov
2025-03-09 10:11 ` Cristian Ciocaltea
2025-03-09 10:12 ` Dmitry Baryshkov
2025-03-09 10:17 ` Cristian Ciocaltea
2025-03-08 12:21 ` [PATCH v5 04/12] phy: rockchip: samsung-hdptx: Drop unused struct lcpll_config Cristian Ciocaltea
2025-03-09 9:18 ` Dmitry Baryshkov
2025-03-08 12:21 ` [PATCH v5 05/12] phy: rockchip: samsung-hdptx: Drop unused phy_cfg driver data Cristian Ciocaltea
2025-03-09 9:18 ` Dmitry Baryshkov
2025-03-08 12:21 ` [PATCH v5 06/12] phy: rockchip: samsung-hdptx: Drop superfluous cfgs " Cristian Ciocaltea
2025-03-09 9:19 ` Dmitry Baryshkov
2025-03-08 12:21 ` [PATCH v5 07/12] phy: rockchip: samsung-hdptx: Avoid Hz<->hHz unit conversion overhead Cristian Ciocaltea
2025-03-09 9:22 ` Dmitry Baryshkov
2025-03-09 10:13 ` Cristian Ciocaltea
2025-03-09 14:47 ` David Laight
2025-03-09 22:00 ` Cristian Ciocaltea
2025-03-08 12:21 ` [PATCH v5 08/12] phy: rockchip: samsung-hdptx: Setup TMDS char rate via phy_configure_opts_hdmi Cristian Ciocaltea
2025-03-09 9:26 ` Dmitry Baryshkov
2025-03-09 10:15 ` Cristian Ciocaltea [this message]
2025-03-18 12:48 ` Cristian Ciocaltea
2025-03-08 12:21 ` [PATCH v5 09/12] phy: rockchip: samsung-hdptx: Provide config params validation support Cristian Ciocaltea
2025-03-09 9:27 ` Dmitry Baryshkov
2025-03-08 12:21 ` [PATCH v5 10/12] phy: rockchip: samsung-hdptx: Restrict altering TMDS char rate via CCF Cristian Ciocaltea
2025-03-08 12:21 ` [PATCH v5 11/12] phy: rockchip: samsung-hdptx: Optimize internal rate handling Cristian Ciocaltea
2025-03-09 10:17 ` Dmitry Baryshkov
2025-03-09 10:32 ` Cristian Ciocaltea
2025-03-09 10:33 ` Dmitry Baryshkov
2025-03-08 12:21 ` [PATCH v5 12/12] phy: rockchip: samsung-hdptx: Add high color depth management Cristian Ciocaltea
2025-03-09 10:18 ` Dmitry Baryshkov
2025-03-18 12:56 ` Cristian Ciocaltea
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=6caefe9f-1b15-41c1-94f2-9a2a92aeec67@collabora.com \
--to=cristian.ciocaltea@collabora.com \
--cc=Sandor.yu@nxp.com \
--cc=algea.cao@rock-chips.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=heiko@sntech.de \
--cc=kernel@collabora.com \
--cc=kishon@kernel.org \
--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=mripard@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;
as well as URLs for NNTP newsgroup(s).