From patchwork Tue Jul 11 10:40:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nitin Rawat X-Patchwork-Id: 118419 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp387160vqm; Tue, 11 Jul 2023 03:55:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlEZKjB93Vixp4miPvM/N6tBcTn4eAfpOJOVXrnaHENPv7a5sliTT+dwrbD05wb/Up6eO8I7 X-Received: by 2002:a17:907:a420:b0:982:26c5:6525 with SMTP id sg32-20020a170907a42000b0098226c56525mr17015148ejc.60.1689072953036; Tue, 11 Jul 2023 03:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689072953; cv=none; d=google.com; s=arc-20160816; b=yp/yb+3lfdJViKgKDb3CmYVwuCp30jcRYuXz7dWZ9v7Uhrum6/KjrLpaAsEu6H2QVV wePOBL/Ze+ziNw5iOf40FhYNCunF5ow19EKgg0BfLQ2MQ2KswzSGaIsLUuBzLe/unKRF LW0MayICx6cwqNy0t3A9K0KLb2tT0rSrpeA+7jVPs4+FjL5dapLzbz1omeMqzl2QrVhn CmaNB7mp4nX1+YcOpXzL2JXOLAuqEfaPRyXfPVpQqGk1JfEmJyU+X+pAv1p7jOvdsmiJ RZCklB47Rs3zHCgHrFtqGbxCc72yxhRS2/n+1Q0CfNX9BWA6gG1+p6BhIbZPguc/gDJj G9YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=wz/c7LCVr71XpNiEk8lSRfuaqQwPsMz6br/H0UTYKSk=; fh=tRJbHlUMFkw0mMWIz3cc19j6Li/DWMedvysEuFDvqQ4=; b=dxcuAZ8WeIxasYiLkqgPO9uew4DEcPQATVRpm9/Cam3Yw3hTP6TV4vAgI34EvpEldT ud/o5U2jTTRDuY2OkOEuCyCk9A/xW6dphg7zSQxRTNL5I8n/JQPcyUrL3TIv+Vb68dWj O/e6+RBU7CgTq0NQ4dj3PiMZREq5jBLUE9NUzW13wtaFnAfp3pPa/K0NAloY9hxi4cRK fbviw8CuOyRZXSVUgJP9BCxpVEgFj/uFAAQOWSsz/XX3Vx7/JnKeDgxChWHE8OSxqL6l cb19JhtlKqryne+vH4Fa08+NYtLQjwOunlXMWbFQKXG6kYHAuCJMpF2lZX4riVVdvfeD 340A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hYzeoJuT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a170906960200b00993860a6d40si1658843ejx.387.2023.07.11.03.55.29; Tue, 11 Jul 2023 03:55:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hYzeoJuT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231213AbjGKKka (ORCPT + 99 others); Tue, 11 Jul 2023 06:40:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229837AbjGKKk2 (ORCPT ); Tue, 11 Jul 2023 06:40:28 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 753651A2; Tue, 11 Jul 2023 03:40:27 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36BAQvTB007755; Tue, 11 Jul 2023 10:40:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id; s=qcppdkim1; bh=wz/c7LCVr71XpNiEk8lSRfuaqQwPsMz6br/H0UTYKSk=; b=hYzeoJuTsLXZbZUO7ncwKpCXfl7q5ZA8vwHNuz3bNUX2rs41kFJt+dUlw0Or/ZiEyXn6 JB7EvjF2b1c7KI3haJlzeTJGmGZ0eaRFEc012N4JRYfgcPyhRPxVKhZm3D68PtnrUAqY E2JxM1s2hAOQvuLEDXu+QoC4wAq5Km00bBybVo6WUFag2M9PiyhOTv+wWsaBJWCuMFhN /F/pIMr14/EpIdXgTjKmE4UcbKJ0oviOtR1aoPmmube+zRjAudXYcCXaT10yqj9WADwD mMRv6795bBjUl2FziXjoyfW1gs9G1hquSzfwmGCRTBwVnkWyHub/ePnIGULURs4QCJj+ 1g== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rs3vh866v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jul 2023 10:40:17 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 36BAeCwb021490; Tue, 11 Jul 2023 10:40:12 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 3rq0vkm64b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 11 Jul 2023 10:40:12 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 36BAeCxO021485; Tue, 11 Jul 2023 10:40:12 GMT Received: from hu-maiyas-hyd.qualcomm.com (hu-nitirawa-hyd.qualcomm.com [10.213.109.152]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 36BAeCNq021482; Tue, 11 Jul 2023 10:40:12 +0000 Received: by hu-maiyas-hyd.qualcomm.com (Postfix, from userid 2342877) id 7D7CD5000AA; Tue, 11 Jul 2023 16:10:11 +0530 (+0530) From: Nitin Rawat To: mani@kernel.org, quic_cang@quicinc.com, stanley.chu@mediatek.com, bvanassche@acm.org, quic_asutoshd@quicinc.com, avri.altman@wdc.com, martin.petersen@oracle.com, beanhuo@micron.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, jejb@linux.ibm.com, linux-arm-msm@vger.kernel.org, quic_ziqichen@quicinc.com, Nitin Rawat Subject: [PATCH V1] scsi: ufs: ufs-qcom: Update UFS devfreq Parameters Date: Tue, 11 Jul 2023 16:10:06 +0530 Message-Id: <20230711104006.15872-1-quic_nitirawa@quicinc.com> X-Mailer: git-send-email 2.17.1 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: UJ7Y_BAWWPbSWNj90E_0Y0dohvJHr415 X-Proofpoint-ORIG-GUID: UJ7Y_BAWWPbSWNj90E_0Y0dohvJHr415 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-11_05,2023-07-11_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=931 clxscore=1011 mlxscore=0 malwarescore=0 phishscore=0 suspectscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307110094 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771121360805832340 X-GMAIL-MSGID: 1771121360805832340 To support the periodic polling mode without stop caused by CPU idle state, enable delayed timer as default instead of deferrable timer for qualcomm platforms. And change UFS devfreq downdifferential threshold to 65 for less aggresive downscaling. Signed-off-by: Nitin Rawat Signed-off-by: Asutosh Das --- drivers/ufs/host/ufs-qcom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 82d02e7f3b4f..a15815c951ca 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -1388,8 +1388,9 @@ static void ufs_qcom_config_scaling_param(struct ufs_hba *hba, struct devfreq_simple_ondemand_data *d) { p->polling_ms = 60; + p->timer = DEVFREQ_TIMER_DELAYED; d->upthreshold = 70; - d->downdifferential = 5; + d->downdifferential = 65; } #else static void ufs_qcom_config_scaling_param(struct ufs_hba *hba,