lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5e9516bc-66ac-4583-b949-5714e89d73ee@collabora.com>
Date: Tue, 18 Mar 2025 14:48:08 +0200
From: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
To: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.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>,
 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 08/12] phy: rockchip: samsung-hdptx: Setup TMDS char
 rate via phy_configure_opts_hdmi

On 3/9/25 12:15 PM, Cristian Ciocaltea wrote:
> On 3/9/25 11:26 AM, Dmitry Baryshkov wrote:
>> On Sat, 8 Mar 2025 at 14:21, Cristian Ciocaltea
>> <cristian.ciocaltea@...labora.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@...labora.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!

I actually ended up submitting v6 [1] without these changes, since the last
patch "phy: rockchip: samsung-hdptx: Add high color depth management" would
need to revert them, i.e. it extends the verification and cannot really do
"return 0;" early.

[1] https://lore.kernel.org/lkml/20250318-phy-sam-hdptx-bpc-v6-0-8cb1678e7663@collabora.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ