From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-m121180.xmail.ntesmail.com (mail-m121180.xmail.ntesmail.com [115.236.121.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F895439F8A for ; Thu, 23 Jul 2026 11:56:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.236.121.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784807786; cv=none; b=vFMslsuHdPmRuE+mTkESOAWCe0iPcuOCJA64ZIHwl3fySUo+PLKGjuXxRmuEcfi+mRCEcRLcVmvcfBn4mQmIfgrCc/yhW8DaMSJ9CSralg7sK5fyZ57/kbKiBzIOodavEUb8GKiOnUf6cnnIBZSoPwpDUpJDrz7pIkNOSGXV8YU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784807786; c=relaxed/simple; bh=AP5tmZVxuH2W+cBmyazuL0sFTSJZxwtpOi0Y8AK1eoc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Kq3i4qaN3jiFTapGVry76ehvjE25TlC68moZHziD2LP6yYnHzLVjcRNNhPequlv7CM8ZwylE/Nr6KRLdUmHls7UA9XMvq7Z5ib/wPrtPkxzp0Tofq3+YjQ9Qs/fNI6kDi9iCkmLfAML6RiMXrJkIbhOY4YctZ1VQjUjXMRRct0k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com; spf=pass smtp.mailfrom=rock-chips.com; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b=gi1JZPhr; arc=none smtp.client-ip=115.236.121.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b="gi1JZPhr" Received: from [172.16.12.77] (unknown [58.22.7.114]) by smtp.qiye.163.com (Hmail) with ESMTP id 475247b98; Thu, 23 Jul 2026 19:51:02 +0800 (GMT+08:00) Message-ID: <40179247-12ac-4768-abd9-37f34e2c8b2b@rock-chips.com> Date: Thu, 23 Jul 2026 19:51:01 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 5/8] phy: rockchip: samsung-hdptx: Drop TMDS rate setup workaround To: Cristian Ciocaltea , Vinod Koul , Neil Armstrong , Heiko Stuebner , Algea Cao , Dmitry Baryshkov 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, =?UTF-8?Q?Thomas_Niederpr=C3=BCm?= , Simon Wright References: <20260612-hdptx-clk-fixes-v4-0-ce5e1d456cda@collabora.com> <20260612-hdptx-clk-fixes-v4-5-ce5e1d456cda@collabora.com> Content-Language: en-US From: Andy Yan In-Reply-To: <20260612-hdptx-clk-fixes-v4-5-ce5e1d456cda@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Tid: 0a9f8ed094f109d8kunmaf162676577b X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1kYFggdWUFKV1ktWUFJV1kPCRoVCBIfWUFZQh9LSlYeHh1KGRhOQh hCTx9WFRQJFhoXVRMBExYaEhckFA4PWVdZGBILWUFZTkNVSUlVTFVKSk9ZV1kWGg8SFR0UWUFZT0 tIVUpLSU9PT0hVSktLVUpCS0tZBg++ DKIM-Signature: a=rsa-sha256; b=gi1JZPhr0YIKkpak6dfQ7dOY46qt66IVvlBBF2aklLgugRTUdG/tsUsFB4AJz/vN3EuXen5HbdXeemJtVNUtn1J69C0InLhPj6VLmQhzR2Nr+poutG0j95JFUWt7FGohuDlA0sFPvuRxzHni6gujjTid0DoG3C2poHDy4HhZuJc=; s=default; c=relaxed/relaxed; d=rock-chips.com; v=1; bh=UkPHHTBxsGnnTx5a9K0kYDoyQ/YqHcEwy0WwqNhrCm8=; h=date:mime-version:subject:message-id:from; Hello, On 6/12/26 07:45, Cristian Ciocaltea wrote: > Since commit ba9c2fe18c17 ("drm/rockchip: dw_hdmi_qp: Switch to > phy_configure()") the TMDS rate setup doesn't rely anymore on the > unconventional usage of the bus width, instead it is managed exclusively > through the HDMI PHY configuration API. > > Drop the now obsolete workaround to retrieve the TMDS character rate via > phy_get_bus_width() during power_on(). > > While at it, get rid of the extra call to rk_hdptx_phy_consumer_put() by > moving the statement at the end of the function. > > Tested-by: Thomas Niederprüm > Tested-by: Simon Wright > Signed-off-by: Cristian Ciocaltea Reviewed-by: Andy Yan > --- > drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 27 +++++------------------ > 1 file changed, 6 insertions(+), 21 deletions(-) > > diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > index 25bd821cd039..35997087d61c 100644 > --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > @@ -1660,22 +1660,6 @@ static int rk_hdptx_phy_power_on(struct phy *phy) > enum phy_mode mode = phy_get_mode(phy); > int ret, lane; > > - if (mode != PHY_MODE_DP) { > - if (!hdptx->hdmi_cfg.rate && hdptx->hdmi_cfg.mode != PHY_HDMI_MODE_FRL) { > - /* > - * FIXME: Temporary workaround to setup TMDS char rate > - * from the RK DW HDMI QP bridge driver. > - * Will be removed as soon the switch to the HDMI PHY > - * configuration API has been completed on both ends. > - */ > - hdptx->hdmi_cfg.rate = phy_get_bus_width(hdptx->phy) & 0xfffffff; > - hdptx->hdmi_cfg.rate *= 100; > - } > - > - dev_dbg(hdptx->dev, "%s rate=%llu bpc=%u\n", __func__, > - hdptx->hdmi_cfg.rate, hdptx->hdmi_cfg.bpc); > - } > - > ret = rk_hdptx_phy_consumer_get(hdptx); > if (ret) > return ret; > @@ -1701,9 +1685,10 @@ static int rk_hdptx_phy_power_on(struct phy *phy) > rk_hdptx_dp_pll_init(hdptx); > > ret = rk_hdptx_dp_aux_init(hdptx); > - if (ret) > - rk_hdptx_phy_consumer_put(hdptx, true); > } else { > + dev_dbg(hdptx->dev, "%s rate=%llu bpc=%u\n", __func__, > + hdptx->hdmi_cfg.rate, hdptx->hdmi_cfg.bpc); > + > if (hdptx->pll_config_dirty) > ret = rk_hdptx_pll_cmn_config(hdptx); > > @@ -1716,11 +1701,11 @@ static int rk_hdptx_phy_power_on(struct phy *phy) > else > ret = rk_hdptx_tmds_ropll_mode_config(hdptx); > } > - > - if (ret) > - rk_hdptx_phy_consumer_put(hdptx, true); > } > > + if (ret) > + rk_hdptx_phy_consumer_put(hdptx, true); > + > return ret; > } > >