From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 C78AD3F6613 for ; Thu, 11 Jun 2026 12:31:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781181076; cv=none; b=AtCZ/ZTycNSwMTe/si0lpI0TQC/FQHe8xOXhP/Lm7zFRQTlY59Vh6RXuOmue4zraL+/hds4rTPHGTiRcbiMA8Z15t88Um99ZA+YS6cXlDjZBIEDpKJaqDdoUoBIT01BT84Lvb5Kl9eqCnEXyER6ZGA1FWZpWcTy9t0JGIs247TQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781181076; c=relaxed/simple; bh=2tt+VZGzka6Tx7DHWe8Il4tCKJPxHDkNXupOV2T4rBo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lyqYu0M4vDaDqP0u3+IclmaLWMRih86AbhllON/1kbm5lzMp9/PVhxBcwf80j1/oHoszt0hHGhmd/ovH/SmnOycRCdfwqleR5ZQ35L1R7IWziVEj3PGytD97xyhYRi8jdNvbVW2KTwppo9xN41YK0NAWNvLTZw2HWYta8u2han0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=aR6Fp32/; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="aR6Fp32/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1781181073; bh=2tt+VZGzka6Tx7DHWe8Il4tCKJPxHDkNXupOV2T4rBo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=aR6Fp32/5yZ1O/WpDzEfVpmyuKXqyLuY/VYvg5htIynFWhwDYD5zNzhSCbmrGCZ3Y WuUhZVkSujR2MJauS5yDZByJf23PEJoa80LqvCVHsrZ3TU3bG0IoOLign4X8EMHkNK Vj7nX19sMrh64B15f/Ki6Xup/2pzCxRi2BpF4Ris5k3mEgyX6vnfShkILLEUSZg2gy 6OTkG/nmaHBzOTm99c4mDESFCO2pBM4pktDaVu+dWHr222I7pEmK6H5cyk7MlTPSAd LW7ADokhHKhriWkMokqKDXNbz0yTzFOY9rbRFUSlceAR94xmtuE/pZ7LT6ZhyEPoGr S3wlToFl/d+gw== Received: from localhost (unknown [100.64.0.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by bali.collaboradmins.com (Postfix) with ESMTPSA id 2DA5B17E0920; Thu, 11 Jun 2026 14:31:13 +0200 (CEST) From: Cristian Ciocaltea Date: Thu, 11 Jun 2026 15:31:05 +0300 Subject: [PATCH v3 3/6] phy: rockchip: samsung-hdptx: Drop TMDS rate setup workaround Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260611-hdptx-clk-fixes-v3-3-67b1b0c00e16@collabora.com> References: <20260611-hdptx-clk-fixes-v3-0-67b1b0c00e16@collabora.com> In-Reply-To: <20260611-hdptx-clk-fixes-v3-0-67b1b0c00e16@collabora.com> To: 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 X-Mailer: b4 0.15.2 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 --- 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 5295d5f6f287..92c77e58518c 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; } -- 2.54.0