From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21591C44515 for ; Mon, 20 Jul 2026 14:17:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0tYagA3SgqblbYVzfHtZdehoE3ZNWuvYlmOH/bcmpA8=; b=yziZuVMP9YmUVa Y4X3TfWbOl7iQJkr/PObYZJhVOIqFqGhuMhGZVYjyqaze9CgHllNMgS/CFtTskfvNuDkkHG8dVLAd Utgzlntlv7wn1t7/CD6ANVh/BsXZvxAkxkl+onbp51iYLwuM3zCBcx7M7vaaTWxVJj809YygnfQ40 WaUkYeLsA2Yfq2NwUvuQzz0eIynsZVZap9yxfXE8Qiz75HGStz/M18x8NG6Z7DGj/QBI26piiap/u EGGALN8wuibwWCNDESDiG3VsTJIXKerQn7JNsgs2ZcR++Sq9e6mQ04t//KZ/lQe6cts04KF87xzb8 +/p8hdAysEomQ13rlNXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wlonx-00000006wGM-3YEx; Mon, 20 Jul 2026 14:17:13 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wlonv-00000006wEu-1XMu for linux-phy@lists.infradead.org; Mon, 20 Jul 2026 14:17:13 +0000 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66KDqNkO2498347 for ; Mon, 20 Jul 2026 14:17:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= XyZTxG7+Rkh2o9N/uSYU6cRoRSlOphjtgwLvLuA/HA0=; b=Ytn5/mj0JWhrVIWs cxPTq1K/nohSxW76BAh2IAcjy8DN+GzFEdiYTfifALhLJTtULkotM9bHes7Gagd0 jmFf5Cun40sHSNeN9wiGBw5quHdHNGGYk61NI6wTcKbWn6vfbK/c3fCninX6DEoV GQB9J4ySQImyAeSyTOicbYkn4qAnhxFxSoPtpmKYT81zhBl1a1jYttOrV7Hgnj4I MVmJUKyirLHnrZCAVaXcLgbOlsyeyI/MDRDi/rXSpwKie+0//8eyj3CCgETKPbvr J3+RxG/81afFNWtdZrv/jCtA4vpjAuqXbqkO2L++1OeyGvAIEBgViWN+DtszcX5j JU5kjg== Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fhh5y16xu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 20 Jul 2026 14:17:10 +0000 (GMT) Received: by mail-vs1-f71.google.com with SMTP id ada2fe7eead31-6751db2792dso5920835137.3 for ; Mon, 20 Jul 2026 07:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784557029; x=1785161829; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=XyZTxG7+Rkh2o9N/uSYU6cRoRSlOphjtgwLvLuA/HA0=; b=dMNOHzB5GKiCIaCpzr83LxbVEhMFli6bZCEAEctXOY0DdGVUbKPV7FQ2ZjcAz4ZqS9 elyTu5eda6ieVaZtb9JKCAnFgEyu8gzJ8Ep1UqBqKvsxnOEZHVlqsDv8Jlx//uvAmtN0 t7AISdvecwVY0wDjuziPHBFqQhSj1T2zItkXNPwAjfTV0Ujp/vXCmZzJwgMCCxgsUTjG NZSZ7fW8mOyKrYbk9dDDVjQXNh4YRmaCtSalKtpj8zQcVIiYYBKQzK5O144IRd+32Rtj 3TJ9AHQZsn7VNqAPoVWaYhgbx3SSm14OweaN7+KorweWbi/cgi3Z3t7UzysnP+3zdCL4 tlKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784557029; x=1785161829; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=XyZTxG7+Rkh2o9N/uSYU6cRoRSlOphjtgwLvLuA/HA0=; b=jNwoN7CfjzyUxwFUQNcy5PEPvLZ+afln+W58PBVMaDQA5uJ3JzxrOQEOG4QQHQsYrH L2Dp3uM2+0je+sl/7P+UTD/6MkySIDrGUhdiPI2HCKxUofxDpvzVVhaT+hR+4qFKUkLb jwKdjrk76gWmcbAa2w/KDD41pWGoug5bgBTHryCOw0UnomN2zVltBv3Bl2NQtl8CFKtW Pi2ttmgow2otzyZzOt7EgwDXKZwej0weRhr511cqah5ql9yiMsVbzRRhrQwwGNxioHG2 PQFVLFxusj9mylp8xdEz3XshCpqb210rYk0AewtpjAk59ySYNFxGTVpdo1Y/1BZD7S8k xNcg== X-Forwarded-Encrypted: i=1; AHgh+RruBfbqEdiObzBEDFAt/cX5Mfr7V0E75DySALqjnivVM9eyFWv90deW5uESWzkj64eOuDraWbsL2dM=@lists.infradead.org X-Gm-Message-State: AOJu0Yzzqd24RVr/V/Ng3SFn6H6Z2Rr4hT+KHTrXbL9qvwPTbS9h1HZv zP1N5jAAymFSgTjULqIyuD2yeYaHUR/gepbyPCUWHWlh9BQV0rMNsc/A6sr55N/Zh42AR1Dbj1q ytjSaPKYuR5vmFUzMTnkfb/f0Kxl7gPL2mZI/jxKLN70Dq36mz43ZzsNebzKYLJ97z8w2PtM48d VA X-Gm-Gg: AfdE7ckZE2/HOCj/OHqJx3YvmOZ3ssxJldGnQmAChkrQrtERpqyjtA6opqxBio33LmW tnlWKQl0LPmW2c42MSpeebTKDXrOpb0bujqBG8F5LXss8QMCLJjYI/WZq6xji59qRqVzE6YIVd5 iBeZiSNjly102zPqiO+G83+daoBOo0aKSzyAWaSvXR6HLVhWRF7bJunfyGh0dRH+57Wf2PRp1wO OesKbH5hkX3m9/CRk1tchOoFbYapKCThRz07bU38/tkG/bCk6U570V2MLB7FY+s3H/GAz+IUSct NciV/GyRm422gsMQWR09jgVW2c0vU9CyIXXcQgG4uA8K4QK9HaXXRUkKPcE5asoUlffj5kwOvrC 0YQdNghNBuYxvXjOf0ipsJj0Ax2gGp5HZRH75HQh7Z0IPekdji0dgzCI3bUmBliK6K4BfxHFHAj Ih2wI2CnyEy9U9KQ== X-Received: by 2002:a05:6102:3751:b0:73f:7bca:217d with SMTP id ada2fe7eead31-747536f091bmr3504161137.20.1784557029395; Mon, 20 Jul 2026 07:17:09 -0700 (PDT) X-Received: by 2002:a05:6102:3751:b0:73f:7bca:217d with SMTP id ada2fe7eead31-747536f091bmr3504137137.20.1784557028783; Mon, 20 Jul 2026 07:17:08 -0700 (PDT) Received: from umbar.lan (2001-14ba-a073-af00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a073:af00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b291e189c7sm2365363e87.57.2026.07.20.07.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 07:17:07 -0700 (PDT) Date: Mon, 20 Jul 2026 17:17:05 +0300 From: Dmitry Baryshkov To: Cristian Ciocaltea Cc: Vinod Koul , Neil Armstrong , Heiko Stuebner , Algea Cao , Dmitry Baryshkov , kernel@collabora.com, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas =?iso-8859-1?Q?Niederpr=FCm?= , Simon Wright Subject: Re: [PATCH v4 4/8] phy: rockchip: samsung-hdptx: Handle uncommitted PHY config changes Message-ID: References: <20260612-hdptx-clk-fixes-v4-0-ce5e1d456cda@collabora.com> <20260612-hdptx-clk-fixes-v4-4-ce5e1d456cda@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20260612-hdptx-clk-fixes-v4-4-ce5e1d456cda@collabora.com> X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIwMDE1OSBTYWx0ZWRfX0rN/rgQMC8il 8GfR3SeyAVl2XwqvYNa09EQ+DaWD7fPEVOpzVd3w9l9x6zTSYuBXsXJ6CivvjVfXC+Tj1tB1164 zDGxYPeSq4xGqS3Tx1dHMS6RyA8uq14= X-Proofpoint-GUID: awBhz3aOtdJd8fofNkatbS8QwvP4dEBf X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIwMDE1OSBTYWx0ZWRfX7UhUmQcpLDQl iwpdqGJQVgNEhNOhfv1XwuK7YdMtFEn0Yyt4UgKyiiq7zBKqKumJWHCSZVImiLk+ywH2j3fS83o ltVtyCVMm17PLa3fwK2GnPOnVWCt1Nch9ypw+Py4afigTgy8y/zbcAiKRNL+9QHsMbMGvRhH29S ChLyW15lK4zn77M9l6GKDqU8ZUH7DLeByEtlLyW6+FOjIj6JYAJk77PKuhZotfBjumdESCMJMuk WIG5H2xLi9hZdhgijO3T1j2rmV7mBek9lADsTe6aMI6CWW39bzNcAb+2rPpIbdpqr5h+RjRe6II 521knEtyTW91dV023Xs8d8Wk1NrYZmcfSu0e1EgyD0actT9PwMz1lovDkww5eNnjmQwiLVEX3TO qMTXowcc63mmuKH+VK8D8T52mtqFzs/8XLHd1TB4ceqfPbpWmfaV5tAHdArpj18s9cntfbgypee 7mXi+T+2SZAqPtz3RQw== X-Proofpoint-ORIG-GUID: awBhz3aOtdJd8fofNkatbS8QwvP4dEBf X-Authority-Analysis: v=2.4 cv=f/x4wuyM c=1 sm=1 tr=0 ts=6a5e2de6 cx=c_pps a=P2rfLEam3zuxRRdjJWA2cw==:117 a=xqWC_Br6kY4A:10 a=8nJEP1OIZ-IA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=QX4gbG5DAAAA:8 a=shz021jzHIKqnGQv9qIA:9 a=3ZKOabzyN94A:10 a=wPNLvfGTeEIA:10 a=ODZdjJIeia2B_SHc_B0f:22 a=AbAUZ8qAyYyZVLSsDulk:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-20_03,2026-07-20_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 adultscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607200159 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260720_071711_411549_9F39FB89 X-CRM114-Status: GOOD ( 28.36 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On Fri, Jun 12, 2026 at 02:45:23AM +0300, Cristian Ciocaltea wrote: > Any changes to the PHY link rate and/or color depth done via the HDMI > PHY configuration API are not immediately programmed into the hardware, > but are delayed until the PHY usage count gets incremented from 0 to 1, > that is when it is powered on or when the PLL clock exposed through > the CCF API is prepared, whichever comes first. Why do you need either-of here? Can it be just one path? > = > Since the clock might remain in prepared state after subsequent PHY > config changes, the programming can also be triggered via > clk_ops.set_rate(). However, from the clock consumer perspective (i.e. > VOP2 display controller), the (pixel) clock rate doesn't vary with bpc, > as that is handled internally by the PHY and reflected in the TDMS > character rate only. > = > As a consequence, changing the bpc while preserving the modeline may > lead to out-of-sync issues between CCF and HDMI PHY config state, > because the .set_rate() callback is not invoked when clock rate remains > constant. This may also happen when the PHY PLL has been pre-programmed > by an external entity, e.g. the bootloader, which is actually a > regression introduced by the recent FRL patches. > = > Introduce a pll_config_dirty flag to keep track of uncommitted PHY > config changes and use it in clk_ops.determine_rate() to invalidate the > current clock rate (as known by CCF) and, consequently, ensure those > changes are programmed into hardware via clk_ops.set_rate(). > = > Moreover, proceed with a similar fix in phy_ops.power_on() callback, to > handle the scenario where the CCF API is not used due to operating in > FRL mode, while the clock is still in a prepared state and thus > preventing rk_hdptx_phy_consumer_get() to apply the updated PHY > configuration. > = > Fixes: de5dba833118 ("phy: rockchip: samsung-hdptx: Add HDMI 2.1 FRL supp= ort") > Fixes: 9d0ec51d7c22 ("phy: rockchip: samsung-hdptx: Add high color depth = management") > Tested-by: Thomas Niederpr=FCm > Tested-by: Simon Wright > Signed-off-by: Cristian Ciocaltea > --- > drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 84 +++++++++++++----= ------ > 1 file changed, 48 insertions(+), 36 deletions(-) > = > diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/= phy/rockchip/phy-rockchip-samsung-hdptx.c > index b210c1a88b25..25bd821cd039 100644 > --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > @@ -413,6 +413,7 @@ struct rk_hdptx_phy { > = > /* clk provider */ > struct clk_hw hw; > + bool pll_config_dirty; Which lock protects it? > bool restrict_rate_change; > = > atomic_t usage_count; -- = With best wishes Dmitry -- = linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 8F25542FCD0 for ; Mon, 20 Jul 2026 14:17:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784557033; cv=none; b=kMOY0z6la4LXh5D1wNP3Nv9nB3865H9InjJpLpqX9pm88fUDWVsh5MF12jTrFhi5WCTg7611/f3dc6D+drQpauHVm0v2RxmqZS4QALXjcnHtw36DReP6Mhv1vjj9KhOSHN0Hmfz0NlcpdTy8QMb4jWE+cADEQ8Zho8wsU5kU+8I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784557033; c=relaxed/simple; bh=fxE7Q/mp6fruQbUKbYqGMI5JKo0O55yzerMVWtbt/m0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XEXpQ/3sXT4QIcBYGWnxyrm4ubbFOW1MQd+6Z7lSfTu+nhHfhpPaswLYW9oj4MyuA8prXaBA+6lBj0DpxTjAJyPNH4ez81MvNzYOW1m4E2qBn8wIpPIJe+pWlor8GiuCR5PR4D52Su5X2gebs1j4TLxG3aCIEszrMCiW6on04Jo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=Ytn5/mj0; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=EF897LpW; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="Ytn5/mj0"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="EF897LpW" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66KDr55Z2878713 for ; Mon, 20 Jul 2026 14:17:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= XyZTxG7+Rkh2o9N/uSYU6cRoRSlOphjtgwLvLuA/HA0=; b=Ytn5/mj0JWhrVIWs cxPTq1K/nohSxW76BAh2IAcjy8DN+GzFEdiYTfifALhLJTtULkotM9bHes7Gagd0 jmFf5Cun40sHSNeN9wiGBw5quHdHNGGYk61NI6wTcKbWn6vfbK/c3fCninX6DEoV GQB9J4ySQImyAeSyTOicbYkn4qAnhxFxSoPtpmKYT81zhBl1a1jYttOrV7Hgnj4I MVmJUKyirLHnrZCAVaXcLgbOlsyeyI/MDRDi/rXSpwKie+0//8eyj3CCgETKPbvr J3+RxG/81afFNWtdZrv/jCtA4vpjAuqXbqkO2L++1OeyGvAIEBgViWN+DtszcX5j JU5kjg== Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fhf0kstxr-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 20 Jul 2026 14:17:10 +0000 (GMT) Received: by mail-vs1-f71.google.com with SMTP id ada2fe7eead31-6751db2792dso5920837137.3 for ; Mon, 20 Jul 2026 07:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784557029; x=1785161829; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=XyZTxG7+Rkh2o9N/uSYU6cRoRSlOphjtgwLvLuA/HA0=; b=EF897LpWaZGBndUTqypU635d91Q6aNATqRsJ77YWFg3PH9VxWfQqf+TJRcr+oua4IG p3VoeA6BkK9d5vfSISiHbqkvXUtZtm9rwUpYOYBUMMXcMKtUgBwm0Kt5cXTafdqmbsBl B39cBLK82mh7x0LGeSy20L0Onw/GuJp7eUa8LLMYT+Y7EskrVThrLzpu9GOBQ/8PJysg dAksHLcdEZdY28QclsVg9NrSfPBHiRfehSN+MYb4Kt4BoNdREpI0dK47AtQIU81B6TX/ Sb9npLo7R+W9Fm7zULTLWTBLRABksQanbXmUPVID+Q5W9+a0yRaZwcBCnT4ERdxKzFNA a2aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784557029; x=1785161829; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=XyZTxG7+Rkh2o9N/uSYU6cRoRSlOphjtgwLvLuA/HA0=; b=eFrvSbl5vZC29orTm8KJ7Bp6ptBpjFqPVk9AKP6uAllU+yuS5UFzmxvLTJgsD0qf18 Q17m5Yb2qqMqnu+dvWD/A8bC2CphI9EYKizRDr1jr7gUKHKWHbmy1MXNKU9WRH+DXOF3 QcCbqavm7KHF/VjUnmzuRcAngGECuN/xF/NyWI2JqoQJxVVH3I0MaQP+PocdVrNNRF6F A3Pl90Oo3NZWnZZHJaK9bqBJ5ytbF74i+R7dLcuzTZMMg1Gy6wrLjv0RDmyl2AjHaJwX KXq2uknfKsDrzp8/b4kY6QAe5FWVRififWdZ2y7IY3dkVLjY1T2cAzWq1BHfUJ7DmkTW YrRw== X-Forwarded-Encrypted: i=1; AHgh+RqBBY8PrnwG1N8LiZVRX0RWo7vhNCtEhlEiiwEq2OgpiOfqOwt4ynXzoJrS1nxI6NjoVu0Scrx5lGzuyH8=@vger.kernel.org X-Gm-Message-State: AOJu0YyAs1yU1xkxk5RscWi0MJHXSfxWB/WiWnGnG29VUaCReVcOuXRy yTrHs4oL1P1SmeP01WgosMpIDkrXHbmQMFO4SpZoqJs9zvgELm/0ZTBXGOWbVcDcDJ308ehXHaY hNzXYAeH+WE40Jxxsxnx/dDr3l4NE7DgrN5nY8j3xnU6di2RbuGzfQpsX3Ym/QMaLOLw= X-Gm-Gg: AfdE7cni17qpxcz62sT0JILhD5Lj0VWe3eSK3Z3Usc5TPgRh9brYXLub/Y2USivVMXJ jNgxJ6DjZ7kHRRJlEOP9uitWBteMFLyULWsc4ARO9AYtMpsxGWq8ZZlu6gao/U708NhRYUgGA7h Z9On9ZK4PG4eIJWqaOLvj75+tiNTdh1VcEVe6xejvqoOGnpDn+ib3ogd96ogX+wqbdoMSIpF+bX d0RqnNAPDahucqHbclTToQQdxSNqmMwJapgHyQdjGE3sYMok3DAU1SnOjEuQXRPYCYHOeSdEWRq Wi0q1AbQxrBqwQJNSdlWDmSiHnHMGbloco7c3yZda1HcQxdz8VH4tZLxtuytv0CFR5pVF25A+ol 1bWRey+kIBVr1Q3IJ7TJzsJcKnXtcznxpVxo3wp7/QLKpHjTtoduMPTHCXtH5e/JouxVFQR2+Jf DMCICS0cRyCslpvg== X-Received: by 2002:a05:6102:3751:b0:73f:7bca:217d with SMTP id ada2fe7eead31-747536f091bmr3504165137.20.1784557029408; Mon, 20 Jul 2026 07:17:09 -0700 (PDT) X-Received: by 2002:a05:6102:3751:b0:73f:7bca:217d with SMTP id ada2fe7eead31-747536f091bmr3504137137.20.1784557028783; Mon, 20 Jul 2026 07:17:08 -0700 (PDT) Received: from umbar.lan (2001-14ba-a073-af00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a073:af00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b291e189c7sm2365363e87.57.2026.07.20.07.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 07:17:07 -0700 (PDT) Date: Mon, 20 Jul 2026 17:17:05 +0300 From: Dmitry Baryshkov To: Cristian Ciocaltea Cc: Vinod Koul , Neil Armstrong , Heiko Stuebner , Algea Cao , Dmitry Baryshkov , kernel@collabora.com, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas =?iso-8859-1?Q?Niederpr=FCm?= , Simon Wright Subject: Re: [PATCH v4 4/8] phy: rockchip: samsung-hdptx: Handle uncommitted PHY config changes Message-ID: References: <20260612-hdptx-clk-fixes-v4-0-ce5e1d456cda@collabora.com> <20260612-hdptx-clk-fixes-v4-4-ce5e1d456cda@collabora.com> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260612-hdptx-clk-fixes-v4-4-ce5e1d456cda@collabora.com> X-Proofpoint-ORIG-GUID: Jylxioqf1dtqm2bg_XSrluwXwoBw9ynX X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIwMDE1OSBTYWx0ZWRfX78E4QUgoxMSg ktrsUQzDWBkQ0ZtyESmTlm62kWLm+k/5pYsH5huUKFZLgK2ERXtlpe3Q1NOW6tq4wckCFf2z/B0 Hm2M2vXS3f9fkz+CjREAw4cwbkPYjew= X-Authority-Analysis: v=2.4 cv=G58s1dk5 c=1 sm=1 tr=0 ts=6a5e2de6 cx=c_pps a=P2rfLEam3zuxRRdjJWA2cw==:117 a=xqWC_Br6kY4A:10 a=8nJEP1OIZ-IA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=QX4gbG5DAAAA:8 a=shz021jzHIKqnGQv9qIA:9 a=3ZKOabzyN94A:10 a=wPNLvfGTeEIA:10 a=ODZdjJIeia2B_SHc_B0f:22 a=AbAUZ8qAyYyZVLSsDulk:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIwMDE1OSBTYWx0ZWRfX+JsxtA/XeP87 i0432718viygs21kepspKpaIv3s3esCoMIKekNKBia/tfUW3D7Gg7Q5n9D3R7as8xTqgMI/BBOw x6B9Cwry4CcbZqpKXQIWuXjtsnE0joiXOBFqrYgc30Mec8yVxHbg5RmGNJ0lh3bJXBSWF3Z7qkX 3dZRh0LlGWLJK3mt3wwpq0yW6xzgcjxejK1rRjj2MnGo6/emoJilO35I8LnTLIL+RwDmTncJH78 +GO91P0yCWlEIPJUQCZxiDWdjwDuPOeIvjYUhoqIRCRQ2DvhIEV5GbbFAzTZwAWHadGnRgVRrC7 jZHwBthq0T996r1TM5lgL5ZNfXyYIStGTSGng6kd+F0a0CNjyEpfntL2VqEvbhFeXAtdU/sWBlw 3anlvT+QziAjXkniXpcm9qRXayEmCcGS2OY3f1EBRlkZuBHfa/Fe0lJgCreW1NRkv7YmXrKBJLB jOgp9PdVVxqX7XYEDug== X-Proofpoint-GUID: Jylxioqf1dtqm2bg_XSrluwXwoBw9ynX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-20_03,2026-07-20_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607200159 On Fri, Jun 12, 2026 at 02:45:23AM +0300, Cristian Ciocaltea wrote: > Any changes to the PHY link rate and/or color depth done via the HDMI > PHY configuration API are not immediately programmed into the hardware, > but are delayed until the PHY usage count gets incremented from 0 to 1, > that is when it is powered on or when the PLL clock exposed through > the CCF API is prepared, whichever comes first. Why do you need either-of here? Can it be just one path? > > Since the clock might remain in prepared state after subsequent PHY > config changes, the programming can also be triggered via > clk_ops.set_rate(). However, from the clock consumer perspective (i.e. > VOP2 display controller), the (pixel) clock rate doesn't vary with bpc, > as that is handled internally by the PHY and reflected in the TDMS > character rate only. > > As a consequence, changing the bpc while preserving the modeline may > lead to out-of-sync issues between CCF and HDMI PHY config state, > because the .set_rate() callback is not invoked when clock rate remains > constant. This may also happen when the PHY PLL has been pre-programmed > by an external entity, e.g. the bootloader, which is actually a > regression introduced by the recent FRL patches. > > Introduce a pll_config_dirty flag to keep track of uncommitted PHY > config changes and use it in clk_ops.determine_rate() to invalidate the > current clock rate (as known by CCF) and, consequently, ensure those > changes are programmed into hardware via clk_ops.set_rate(). > > Moreover, proceed with a similar fix in phy_ops.power_on() callback, to > handle the scenario where the CCF API is not used due to operating in > FRL mode, while the clock is still in a prepared state and thus > preventing rk_hdptx_phy_consumer_get() to apply the updated PHY > configuration. > > Fixes: de5dba833118 ("phy: rockchip: samsung-hdptx: Add HDMI 2.1 FRL support") > Fixes: 9d0ec51d7c22 ("phy: rockchip: samsung-hdptx: Add high color depth management") > Tested-by: Thomas Niederprüm > Tested-by: Simon Wright > Signed-off-by: Cristian Ciocaltea > --- > drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 84 +++++++++++++---------- > 1 file changed, 48 insertions(+), 36 deletions(-) > > diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > index b210c1a88b25..25bd821cd039 100644 > --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > @@ -413,6 +413,7 @@ struct rk_hdptx_phy { > > /* clk provider */ > struct clk_hw hw; > + bool pll_config_dirty; Which lock protects it? > bool restrict_rate_change; > > atomic_t usage_count; -- With best wishes Dmitry From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5D8F0C4452A for ; Mon, 20 Jul 2026 14:17:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Pap8FlQG2SSHXDqxbqCuj1UxJ4RXVwOhM+VwAxHT2hQ=; b=B8qUWF1T3v2OEz +VdrTniEyJo29nx6+EyNUmDMS+mMKhCG9LvMaobkmZ4kY/G8m4EIDDJCGAIs6PcwwNqaCGQKOzi3O Lrz/Z4TTtBj9PaR6VKeULL/Rm4TL9BLaQhrr7AFi2A3StmYOx/b0WeFuBL/x1tpFHPEqj6GVT2aXu Wyrxi3Ee8Soc/Vq+h3QeUdu3XUsSk7eUoyIB3a+YhNTBg6ZvZs4PDTJlQH3LP3B7GSImH78uS2mq6 6OSPGCuGDyeY7zgj+tjy/1zzyJhJ2nBP0u20vr/ohVrkuB97+VRxt4FeljatC4Fj5QEjgXOIbTZ8N a6XJeNMIuv2XqNFaZKJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wlonx-00000006wFy-2uZB; Mon, 20 Jul 2026 14:17:13 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wlonv-00000006wEt-1DbU for linux-rockchip@lists.infradead.org; Mon, 20 Jul 2026 14:17:12 +0000 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66KDqhKE2499113 for ; Mon, 20 Jul 2026 14:17:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= XyZTxG7+Rkh2o9N/uSYU6cRoRSlOphjtgwLvLuA/HA0=; b=Ytn5/mj0JWhrVIWs cxPTq1K/nohSxW76BAh2IAcjy8DN+GzFEdiYTfifALhLJTtULkotM9bHes7Gagd0 jmFf5Cun40sHSNeN9wiGBw5quHdHNGGYk61NI6wTcKbWn6vfbK/c3fCninX6DEoV GQB9J4ySQImyAeSyTOicbYkn4qAnhxFxSoPtpmKYT81zhBl1a1jYttOrV7Hgnj4I MVmJUKyirLHnrZCAVaXcLgbOlsyeyI/MDRDi/rXSpwKie+0//8eyj3CCgETKPbvr J3+RxG/81afFNWtdZrv/jCtA4vpjAuqXbqkO2L++1OeyGvAIEBgViWN+DtszcX5j JU5kjg== Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fhh5y16y2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 20 Jul 2026 14:17:10 +0000 (GMT) Received: by mail-vs1-f69.google.com with SMTP id ada2fe7eead31-738e5b5ef68so4004667137.1 for ; Mon, 20 Jul 2026 07:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784557030; x=1785161830; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=XyZTxG7+Rkh2o9N/uSYU6cRoRSlOphjtgwLvLuA/HA0=; b=D/ISd8LWpu5s+glA/PZ1LVf7ZMsWjWE/FzzfR6108jL0uuMdv5flm6sw2JvwKtDuul 89QfErM0Knj6mwKaA/+E0TFMX7pA2T/xadkwkrB93zq/xyT7CI7hT1knpZTiy912BqDM oLbbOGXEHQfOiCoq+AHuFgGe8PrFi6buE3/x/30POmf7MSDWaOEbvghjadiAcGTVCW3w osYRjltifGrTNAGR6ZR0MAa7YrbPGxLwCZqjNbArFT9IJ3xFhLHgWWcxA1UDK89zJErt fq16HA3PFmE6J9mDBL+v/omYui3Nk4YhoRLPY2wsZ8QZlpA2iJ6Sgjj03ap3sJ4nI+gn XViQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784557030; x=1785161830; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=XyZTxG7+Rkh2o9N/uSYU6cRoRSlOphjtgwLvLuA/HA0=; b=GZ41Z5Cx4Ux1y59aCyiRXs7sqGcX5ycg/hQwpAXKMVqavVTW4M2IH0riYEzqdgGTsJ CeuCRw/h01UhObfghabhC5tYxdFEOmWqkwwgOPoedJcRXIh7KZbo6w1u9Q+spU1NhRxg 1WfAL/TL1Ak1WjVFer7gZXCTWuJPw0im7Dzeu4Lrqow3SO22W6a9OLohgXCPjlenQEdP H62f0CWqOJvAzDB/JN+/0xHLDaMHQh1MKnhYrm774Lg8gHwxVLMxJx4YmzQ34Ynxy/KD /oFzS+w4g8VgQA4CBVxuObZ/gy/ez6ydrPR1JkHP2f4Iq0V+u7+UATNJsEaD78O9ZMbt yRhA== X-Forwarded-Encrypted: i=1; AHgh+RqBmsgfM6JKWR350IXxWPRugocOSlJEVQomGDpVp4VEgp0ysKfoMW7dG6DkizEmBA640Io1KXcyzj2OeBDy0A==@lists.infradead.org X-Gm-Message-State: AOJu0Ywmd9FLhkBuN3fNghHpx0INUqOZD6OOT1ZzAjWvKbx8MKnkFIGu exd5D8V+5oq1QIIcJRYdpSxQgLvy2Y+AVcVsVvUttlMBXOQzxbWwUBIaA56pfL5CLsRNI8MeTNV Divf5j7DKnJfeT8Lg6ThxpyllIt2ivXGe2yLvxpKN0EhUtLVDYmRHoZfWEusvKLbqGdy1Bw1yPZ 8= X-Gm-Gg: AfdE7clhfCudiBIbuKU1ImY+RBntgy2K7QYjNJwMuluUnbOqlzXbLEUuz2NfsIQJAyz ClbzutWyj0SVqqHFxu66JtcDYinDMtJQNKcZomC9waCWtj6KKawMhpHalf5sXxYDQ6VB/jdNcoa AXa5IyTgS4pSYQBr2GKsDHVnrErMQTyZAaMT+k7hfwUTl3doDwHlKGZL+FqKhoC/0n0RaaW9GP/ gTKyxNdlZgj3QTgWop/QZ7IxzAaYpbRlBteH551ASUJpOla0uCFG5uOyIHpIqPaKGE133SgiHm7 OnYgDilmEiJVFkWreYJmr2ySQagNdsrj/ISTdEQXn9ZSOo2NMMbqB3fjuJmAyPanmAFA4RimXYs OiFL4elKxOiIrVmrb+D6EdlHgdFaL+7tNLxzQRXsuyvxNCbUMEU57Hn7//ldKf2QAoSA1ubpDUr axpHkce+Nr/4udHA== X-Received: by 2002:a05:6102:3751:b0:73f:7bca:217d with SMTP id ada2fe7eead31-747536f091bmr3504166137.20.1784557029408; Mon, 20 Jul 2026 07:17:09 -0700 (PDT) X-Received: by 2002:a05:6102:3751:b0:73f:7bca:217d with SMTP id ada2fe7eead31-747536f091bmr3504137137.20.1784557028783; Mon, 20 Jul 2026 07:17:08 -0700 (PDT) Received: from umbar.lan (2001-14ba-a073-af00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a073:af00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b291e189c7sm2365363e87.57.2026.07.20.07.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 07:17:07 -0700 (PDT) Date: Mon, 20 Jul 2026 17:17:05 +0300 From: Dmitry Baryshkov To: Cristian Ciocaltea Cc: Vinod Koul , Neil Armstrong , Heiko Stuebner , Algea Cao , Dmitry Baryshkov , kernel@collabora.com, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas =?iso-8859-1?Q?Niederpr=FCm?= , Simon Wright Subject: Re: [PATCH v4 4/8] phy: rockchip: samsung-hdptx: Handle uncommitted PHY config changes Message-ID: References: <20260612-hdptx-clk-fixes-v4-0-ce5e1d456cda@collabora.com> <20260612-hdptx-clk-fixes-v4-4-ce5e1d456cda@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20260612-hdptx-clk-fixes-v4-4-ce5e1d456cda@collabora.com> X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIwMDE1OSBTYWx0ZWRfXwu2Wn5n/+2Yk 8hBHjcZc/9atqfdJYQYBaEpJXcOSOKcRDg+NJ7tyRzydirkKMjarTjsQSNpPZGeOEjwrtvV7tWK Mf0Fn3xZq6BQTTuxXzGp6joFJPXLTrA= X-Proofpoint-GUID: 4Z7GYMJFTW5kJUWMu6uenLlIp9qMvcML X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIwMDE1OSBTYWx0ZWRfX0uhi/Y4hfq6K 2BBEEn8hABFwrSLcYNx/Ie4IaODGAtWrviDAdWpgGOztZyUBOt0lNlcZVOQIasYew+R2R479RYF /f4uj1CxcmVu42Nvt3b46B1o6w2OLgPWJmtrtcNmXOAHMi91P/faK9nPy7yqrh2eO6dd/Ot8fOi TE6sM781kM2L0r9YG6Sci+9H47xfFBFn4EZFILL4oJOWTnIcwZZukvvHm8ed66jx7TbdiC9XhER Ihf4aB3Vy+WFmR56MrqzYPRmSIshdMevtgKF7rZMxfeCSNl9/ccb/y5ZYW2DShRbrG2YqavCId4 MGl9I2ajvluhviSZiYaGOawD91NFKoeDq+SHoE/35JTL6sjJuQJ1NGaJ0VIg8DypFIxj9+o+yYA YWE9caVoy8ZNQdEp0SdN2sz8zFPw7ej+qsOXZIV06vpF8NCcO2y2dyh7vjHP93Una3kR3FseZdQ Z5qyW0UzUQ4dr0B6vuA== X-Proofpoint-ORIG-GUID: 4Z7GYMJFTW5kJUWMu6uenLlIp9qMvcML X-Authority-Analysis: v=2.4 cv=f/x4wuyM c=1 sm=1 tr=0 ts=6a5e2de6 cx=c_pps a=5HAIKLe1ejAbszaTRHs9Ug==:117 a=xqWC_Br6kY4A:10 a=8nJEP1OIZ-IA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=QX4gbG5DAAAA:8 a=shz021jzHIKqnGQv9qIA:9 a=3ZKOabzyN94A:10 a=wPNLvfGTeEIA:10 a=gYDTvv6II1OnSo0itH1n:22 a=AbAUZ8qAyYyZVLSsDulk:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-20_03,2026-07-20_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 adultscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607200159 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260720_071711_324891_B9AD88E4 X-CRM114-Status: GOOD ( 28.67 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Fri, Jun 12, 2026 at 02:45:23AM +0300, Cristian Ciocaltea wrote: > Any changes to the PHY link rate and/or color depth done via the HDMI > PHY configuration API are not immediately programmed into the hardware, > but are delayed until the PHY usage count gets incremented from 0 to 1, > that is when it is powered on or when the PLL clock exposed through > the CCF API is prepared, whichever comes first. Why do you need either-of here? Can it be just one path? > = > Since the clock might remain in prepared state after subsequent PHY > config changes, the programming can also be triggered via > clk_ops.set_rate(). However, from the clock consumer perspective (i.e. > VOP2 display controller), the (pixel) clock rate doesn't vary with bpc, > as that is handled internally by the PHY and reflected in the TDMS > character rate only. > = > As a consequence, changing the bpc while preserving the modeline may > lead to out-of-sync issues between CCF and HDMI PHY config state, > because the .set_rate() callback is not invoked when clock rate remains > constant. This may also happen when the PHY PLL has been pre-programmed > by an external entity, e.g. the bootloader, which is actually a > regression introduced by the recent FRL patches. > = > Introduce a pll_config_dirty flag to keep track of uncommitted PHY > config changes and use it in clk_ops.determine_rate() to invalidate the > current clock rate (as known by CCF) and, consequently, ensure those > changes are programmed into hardware via clk_ops.set_rate(). > = > Moreover, proceed with a similar fix in phy_ops.power_on() callback, to > handle the scenario where the CCF API is not used due to operating in > FRL mode, while the clock is still in a prepared state and thus > preventing rk_hdptx_phy_consumer_get() to apply the updated PHY > configuration. > = > Fixes: de5dba833118 ("phy: rockchip: samsung-hdptx: Add HDMI 2.1 FRL supp= ort") > Fixes: 9d0ec51d7c22 ("phy: rockchip: samsung-hdptx: Add high color depth = management") > Tested-by: Thomas Niederpr=FCm > Tested-by: Simon Wright > Signed-off-by: Cristian Ciocaltea > --- > drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 84 +++++++++++++----= ------ > 1 file changed, 48 insertions(+), 36 deletions(-) > = > diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/= phy/rockchip/phy-rockchip-samsung-hdptx.c > index b210c1a88b25..25bd821cd039 100644 > --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > @@ -413,6 +413,7 @@ struct rk_hdptx_phy { > = > /* clk provider */ > struct clk_hw hw; > + bool pll_config_dirty; Which lock protects it? > bool restrict_rate_change; > = > atomic_t usage_count; -- = With best wishes Dmitry _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip