From patchwork Tue Mar 12 09:47:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 13589753 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 7A19AC54E58 for ; Tue, 12 Mar 2024 09:48:12 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HBqMBB7I951wpK88DeFXqAKE7rp5bTDAkAi+jOB98xI=; b=xqMIvwFLIg72jB OVfoSJ1D0qcu708oYwKhL20eEjd74npVLbYf7UKKwU4Uwn7Ng2M46T10YEsj9vgxyEz6QuIbpU9YV vo0Y/7RReuTmEEKja4sSe+ShXEjqmDNNda9JKkQsAAFiDpIpjCH4YySEIjiF35UNzezptrUAiKg9q nA33LvTyuMoG9oA7sSlR+gbkU3G31kq86UL/dJZ/Cr8JKuGVehQgAxv5bT51ZBDnj0BqeON7h6Lnm s3wH32U0Zx3POL2d9riJbL7w6GAU8xR7ABo56FWcv41FOb1JGg0u6asN2Px36YPd9fEzaeduELajy RoUkT1J567YY2aGwzI9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjyjp-00000005Bqz-45Dt; Tue, 12 Mar 2024 09:48:01 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjyjm-00000005Boy-1uV4 for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2024 09:48:00 +0000 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42C9SPTo030392; Tue, 12 Mar 2024 09:47:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=D5LZWiLOWQpngWGT4bXQc0SDCzUoOfCGQlV5TPWe1FQ=; b=WA jKeaUF5K4Wr258dFytnXDVO4O9kj9ZHZ4IMvaRaFym2YVG0whcL6xLF27i+FtOLU nT92PtlzZj9uisT871RxHkh23GdDrC2YZo/ktrKl7iYE2NHyWv6EHyrowcn7e3kj HYiUgoh/xxWJ5GxxNzzzmscScSwp6+s875NsBT3ovZpAkFLbs7lwV3Cva8L5Bkif RBOfxR1PifZBBRcblajtHe/AVXyqVjAggTTe08HXMxbz6CooRLRxPgrAFOMyaJbe 4xLj9Cs1Aj75+dSUcxG2z+VY8U5LPRYE1YR1bIRqchcDBZmclu7ZyM7bWTRPNhmI PXYUwYAufqQVGwQTlM1g== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wtmewg1f0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Mar 2024 09:47:52 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42C9lpwd024214 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Mar 2024 09:47:51 GMT Received: from hu-sibis-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 12 Mar 2024 02:47:46 -0700 From: Sibi Sankar To: , , , , , , , , CC: , , , , , , Sibi Sankar Subject: [PATCH V4 1/2] firmware: arm_scmi: Add support for marking certain frequencies as turbo Date: Tue, 12 Mar 2024 15:17:25 +0530 Message-ID: <20240312094726.3438322-2-quic_sibis@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312094726.3438322-1-quic_sibis@quicinc.com> References: <20240312094726.3438322-1-quic_sibis@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: uCkPitqaQXqNm7KZTWNlLOK02cdsjCQi X-Proofpoint-GUID: uCkPitqaQXqNm7KZTWNlLOK02cdsjCQi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-12_08,2024-03-11_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 spamscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2403120074 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240312_024758_714448_49EE763C X-CRM114-Status: GOOD ( 11.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org All opps above the sustained frequency are treated as turbo, so mark them accordingly. Suggested-by: Sudeep Holla Reviewed-by: Sudeep Holla Signed-off-by: Sibi Sankar Reviewed-by: Dhruva Gole --- v4: * Pickup Rbs * Use turbo and simplify setting turbo. [Dhruva/Viresh] drivers/firmware/arm_scmi/perf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index 8e832d1ad825..345fff167b52 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -871,6 +871,9 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph, else freq = dom->opp[idx].indicative_freq * dom->mult_factor; + /* All OPPs above the sustained frequency are treated as turbo */ + data.turbo = freq > dom->sustained_freq_khz * 1000; + data.level = dom->opp[idx].perf; data.freq = freq;