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 9031438D00A for ; Fri, 3 Apr 2026 18:14:58 +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=1775240101; cv=none; b=YW8x8ie2l7PSztO7KMBoJT6uD5jiM5XgD6j5x8hfl8pMMtp96ADLCdgeM0XHxDS29bm7vtyhm6/ZqlylszOZDgQdFxzfdl/EXoj5AY83HYUv1woipMbGatlzv64/R2Ybzlvn6hKnC6+jon6xyTFFvW18IiuhiticeTwrOa3/FBg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775240101; c=relaxed/simple; bh=NSDlO7P8GT2uL0RUBWckhyg8j1c54WcUGo+OSmr/9X4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=V+ijtIJaYtaBHhaimMkjOhJD2E8cQQkF2/lUbLptEpccpHE9/GEjdFGUOBIZgyH2zmA8KJnDmsB+4PytqBysmo1QR2MyTUtaAnf+xzKYlQ/OBdhMquHxndPawWgWNsVQTGob5yk5gHyoS05nOa4gMWssm0R58dtaP24XFIX3hH8= 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=NUeCRTJB; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=XfCsXv7M; 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="NUeCRTJB"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="XfCsXv7M" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 633FuxlC258380 for ; Fri, 3 Apr 2026 18:14:57 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= 8eq4fAPdzfCHluO00XoTQB0jQyUIHHbRnBpp5SfKGF8=; b=NUeCRTJBwDqgy/ww RMPKFTAjW382xf2KqarMzVJkfOhcSTO/ZTAeLb5+UFvLyBvHzpZ5UnYaG7SM+kHm uCmbT1FBLPY+dt5/8MXEzS2E/GJl7fSHmuvMsURT9wscL1AUeR2qpinDhu7uJ7jC 4e1Ka4gIAJrZVfW9X2G5KKZiun+qLJXa8lz6/C1hT6mv4+o0Bq2+QipIHozHM5iL /LOsJ+uKKNErgA9kYqoeF7j0wMVFxFxzkheiyTTbE3Kozek3sIDdPknWEdDJPWqF uyNMI3i+2SoOWEj9Hcpq5+UvQMCgHe0DSL6ZBXBpQvHpcN9Swd6OAq9RlzJX8T6T qhHAuA== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dagn20d16-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 03 Apr 2026 18:14:57 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2b0c96f5d9aso28739105ad.3 for ; Fri, 03 Apr 2026 11:14:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775240096; x=1775844896; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=8eq4fAPdzfCHluO00XoTQB0jQyUIHHbRnBpp5SfKGF8=; b=XfCsXv7MG8jc7IV84/ejK39WQZbNH16D9HNT4RxqF/DeJviqurB6jaKQVI+Q2yakIt x9yOObPLJdm8KI+69BtywbSQ33o1MHGMKqn9ZFDG1Ew5ffq3mWFNW1g71/aRnadqTEpp jFbWJnik0n7Ff3+HkIvH8U3gd3dGtqrrQbS/pJsf8LY7yZ6gc6Ykorqc4OBERyRWdAug Xdx01ycQw2A9LEPwTfIk5iICiXvxa7P+dbz3w6cSl+1babfC8vpA6xCDuhIKiKrW7s2g cCOnAAocXtKO4Fy1ktnrlhhIsTXJrywwCEu+QD8iPS+Io7UzXQCZu2Eh8I6C+UNzkPDy ZMxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775240096; x=1775844896; h=in-reply-to:content-transfer-encoding:content-disposition :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; bh=8eq4fAPdzfCHluO00XoTQB0jQyUIHHbRnBpp5SfKGF8=; b=nn+ZO9iy0jVHwlejSe1C9OgVzuitjdq/zt6fsNsqfb2vGALyJwn5qi3NraoAjfBwfL AiWL+hA2Iz/F3haXvFaRp8xai1ZhhjE+Aa8SyMua5gvaDIsX1IncmCw85NAhM/IXwi++ z+8sVPudikllUkY1LOyvKDnptcyPV8PWN8rkMrK9Cy/ajTH/w5fnmqa8RAP4oQYxGP8S Zi5DvPt+DjU46Nz0Zhp1OXpSUR0SG6wDucTGuUvLwnpUot3VgLAjgjGTKRf1K9lqXLsX NnLfxstmUOgSLzkvpBG3vqHeK4i0BfJbUr5u2Q/ARh7OeBxxRJPKOOo6n12GoxqWJLE7 uK2A== X-Forwarded-Encrypted: i=1; AJvYcCUjtlLS/cIW/1tbg6muYpWve9bVIrrhTBCVV/6gx0vgpZNxkSK+36C+Fz0ZY9MZ9r9I6r5DFmVXOu3g@vger.kernel.org X-Gm-Message-State: AOJu0YzkuXxM3fVHXLMraiztrpdxBx6DceNLIqI8ZzTDdjmzrF90D+zx z/iqmKlSu5H4XSVaHY68751o7Ma+ZMSn48OzghpvaxCWMTHwX6nkXgflUnCt1t5SLgdELvOy2t6 7W075R5TnO4Q8/h4uzZHeJi+NoVa/pi+3/Kkf+HHLJMkqVmYCO/vA9VUlBSwtYYjz X-Gm-Gg: AeBDievnpTFVHEOZZcrwLzV+vEFjB96Q4c0J8lFRw9w3b6rTaSbcW2voNgRRHOPv8Dq Cfy6FHCjQKuuutZsm+rWdJNKe/i8pn465vuj1BgtrGhMqM31LQxbh0zqVg+XKWgmIO6/LixyiuF 6JCakst9FXXexWQoGeDorFJhOZh7gy7X9Oo6hNzm4rLlMHzwuGPUtfy3ExftyvgLDqDbcSLzyJq dvMOGYlKvHABD4YiV3d3087maQaUFw2YHoUPQ6gEk4MN4SxKjXrJieZIz8e446ziiHT5QjltahZ qM853hQ2ltZShhcle6KsF/8n7ZRnHvPJAM75TiEoD5LRbXQ0I8kW2uVhrMiDy0Y8fjvGNtZAKpY CooJzWNFP152ZWNSjdmRpf/d6NvOw0fOCLxF3VV5tt6XOE8pDNGRBwCjQpnE= X-Received: by 2002:a17:903:360c:b0:2b0:6df2:8cd8 with SMTP id d9443c01a7336-2b2817d3f7bmr40518155ad.40.1775240096396; Fri, 03 Apr 2026 11:14:56 -0700 (PDT) X-Received: by 2002:a17:903:360c:b0:2b0:6df2:8cd8 with SMTP id d9443c01a7336-2b2817d3f7bmr40517825ad.40.1775240095763; Fri, 03 Apr 2026 11:14:55 -0700 (PDT) Received: from hu-arakshit-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b27472d1a2sm67923515ad.7.2026.04.03.11.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2026 11:14:55 -0700 (PDT) Date: Fri, 3 Apr 2026 23:44:48 +0530 From: Abhinaba Rakshit To: Harshal Dev Cc: Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Manivannan Sadhasivam , "James E.J. Bottomley" , "Martin K. Petersen" , Neeraj Soni , linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Konrad Dybcio Subject: Re: [PATCH v7 3/3] soc: qcom: ice: Set ICE clk to TURBO on probe Message-ID: References: <20260302-enable-ufs-ice-clock-scaling-v7-0-669b96ecadd8@oss.qualcomm.com> <20260302-enable-ufs-ice-clock-scaling-v7-3-669b96ecadd8@oss.qualcomm.com> <90375d37-0440-48d9-a3d3-b0b442839d89@oss.qualcomm.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <90375d37-0440-48d9-a3d3-b0b442839d89@oss.qualcomm.com> X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDAzMDE2MiBTYWx0ZWRfX0iH8pxvHnL7G bbbyduSlkspoABwScUaBxdit5NG7iQTjNg1qXOYezRqiY7w02QZA9DVDsomV5Uy/xP4F6bWkOpZ zA92FOLCfxS7gZLPjN/3CrpOjq4JxGGkhS4JMQOEm1pI7fYtK6zms/49KoYGoeOhUA4+Po8zTeK EZQy3Wr7l+rFyDs30rfbdMuRgdCR6wrD+GdCgqMfKuWJvV4n6dHdbWkr6xT6SqO/PhLi0rqkms2 two3BbFlxuNfF+/bf37JL2GrQpOQcvQJm3uXsOGVpG2+6yo+zPYFcZKesD7X0EtmJ8KJSFGZaDo Oa9MUNHyGl/0GkBlJdegC1JDi1CqVbs1ZTqCm5/wTu7wfl8t/rnf4BBaDEQwiggPbLTYZbvPzvY WDmhuxk9/mB3ypxyTGpDe5ZDf7iuSDZ34GfPjlcp8M8/Tq8h+Pqa+CR8MHbveBe/AkxVmUcZBGH OddSpKOZKr2MJq80EXQ== X-Authority-Analysis: v=2.4 cv=Cc4FJbrl c=1 sm=1 tr=0 ts=69d003a1 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=VwQbUJbxAAAA:8 a=y-8eonv6uMWv_09NrVoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 X-Proofpoint-GUID: rruNXQ0cGzFWXM60QgtyVikvNAGh3LtL X-Proofpoint-ORIG-GUID: rruNXQ0cGzFWXM60QgtyVikvNAGh3LtL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-03_05,2026-04-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 spamscore=0 clxscore=1015 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2604030162 On Mon, Mar 30, 2026 at 08:14:13PM +0530, Harshal Dev wrote: > >> diff --git a/drivers/soc/qcom/ice.c b/drivers/soc/qcom/ice.c > >> index 7976a18d9a4cda1ad6b62b66ce011e244d0f6856..e8ee02a709574afa4ebb8e4395a8d899bf1d4976 100644 > >> --- a/drivers/soc/qcom/ice.c > >> +++ b/drivers/soc/qcom/ice.c > >> @@ -659,6 +659,13 @@ static struct qcom_ice *qcom_ice_create(struct device *dev, > >> dev_info(dev, "ICE OPP table is not registered, please update your DT\n"); > >> } > >> > >> + if (engine->has_opp) { > >> + /* Vote for maximum clock rate for maximum performance */ > >> + err = dev_pm_opp_set_rate(dev, INT_MAX); > >> + if (err) > >> + dev_warn(dev, "Failed boosting the ICE clk to TURBO\n"); > >> + } > >> + > >> engine->core_clk_freq = clk_get_rate(engine->core_clk); > >> if (!qcom_ice_check_supported(engine)) > >> return ERR_PTR(-EOPNOTSUPP); > > > > Hi Konrad > > > > Since you previously reviewed this change, I wanted to share an improved approach > > that I recently realized for handling ICE clock scaling in the MMC use‑case. > > > > So far, we have been voting for the maximum frequency during the ICE device probe > > to align with MMC requirements. > > But because the ICE probe is common across different storage clients, applying > > the MAX vote at probe time may unintentionally impact other storage paths. > > > > Now that we have a generic scaling API exposed, we can make this logic > > MMC‑specific instead. In particular, within sdhci_msm_ice_init(). > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/mmc/host/sdhci-msm.c#n1966, > > we can invoke: qcom_ice_scale_clk(ice, INT_MAX, false); > > > > I agree, this is better instead of blindly turning the clk freq to maximum. > > I was about to ask you to move this to qcom_ice_probe() as per comments in previous > commit. However, since you have mentioned this now, I suggest adding a call in > sdhci_msm_ice_init() to qcom_ice_clk_scale() immediately after it calls qcom_ice_create(). Sure, thanks. Will update it in patchset v8. Abinaba Rakshit