[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0fe4388f-3374-409b-8383-ee5200961583@collabora.com>
Date: Mon, 10 Mar 2025 00:00:52 +0200
From: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
To: David Laight <david.laight.linux@...il.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
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>, Maxime Ripard <mripard@...nel.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 v5 07/12] phy: rockchip: samsung-hdptx: Avoid Hz<->hHz
unit conversion overhead
On 3/9/25 4:47 PM, David Laight wrote:
> On Sun, 9 Mar 2025 12:13:32 +0200
> Cristian Ciocaltea <cristian.ciocaltea@...labora.com> wrote:
>
>> On 3/9/25 11:22 AM, Dmitry Baryshkov wrote:
>>> On Sat, 8 Mar 2025 at 14:21, Cristian Ciocaltea
>>> <cristian.ciocaltea@...labora.com> wrote:
>>>>
>>>> The ropll_tmds_cfg table used to identify the configuration params for
>>>> the supported rates expects the search key, i.e. bit_rate member of
>>>> struct ropll_config, to be provided in hHz rather than Hz (1 hHz = 100
>>>> Hz). This requires multiple conversions between these units being
>>>> performed at runtime.
>>>>
>>>> Improve implementation clarity and efficiency by consistently using the
>>>> Hz unit throughout driver's internal data structures and functions.
>>>> Also rename the rather misleading struct member.
>>>>
>>>> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
>>>> ---
>>>> drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 79 +++++++++++------------
>>>> 1 file changed, 39 insertions(+), 40 deletions(-)
>>>>
>>>> diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
>>>> index 2bf525514c1991a1299265d12e1e85f66333c604..e58a01bdb3ce82d66acdcb02c06de2816288b574 100644
>>>> --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
>>>> +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
>>>> @@ -330,7 +330,7 @@ enum dp_link_rate {
>>>> };
>>>>
>>>> struct ropll_config {
>>>> - u32 bit_rate;
>>>> + u32 rate;
>>>
>>> unsigned long long, please, to match the tmds_char_rate type.
>
> Isn't 'bit_rate' more descriptive?
> But maybe rate_hz to make the units more obvious.
>
> If the max frequency might get near 4Gz then the you need something
The max freq. intended to be handled by the related config table is 600
MHz, that is for supporting HDMI 2.0 (TMDS). Anything above that
requires HDMI 2.1 (FRL), which is currently not provided and would
anyway not rely on this data structure.
Regards,
Cristian
Powered by blists - more mailing lists