From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C07221CFFB for ; Fri, 24 Jan 2025 08:59:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737709157; cv=none; b=ZtRwUiWUeedZtZuhbteN8ISrIyeTj+MFO3OuMcaGrZgBK7LAYP3sE34NFeRwBa2BpKSqWfx1kU1kBhkFsu7WjEdRLn8ZQmpPA2CfEue7NdOk/rL7GRKdQA8Y3wiTSAl4TDZwdNVnaeHxxc/XItDkk7CrD5j2VpeId9+c8KWnsX4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737709157; c=relaxed/simple; bh=Gx5tAkuM3tQafFNc5Mhe6PmrPMAavPP6iPSppEjU5/8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ryxmErbkjbMb8rF1PD/wKREXUoFyxCn3LuM7NOMNMEr+AsO1CzFeUoSPzDEi1kVq3gfTYFINc+CbPlnc/xpgG/GZTk4Ylkr9eMMwuXmB5lwm4FrvIJ15pXsHF4+m/GW6IGAabF/eNLlmsrvWK2TSxiONbb4g0lAe6/Izn3h/61Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=qFutLe9o; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qFutLe9o" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-21a7ed0155cso31503385ad.3 for ; Fri, 24 Jan 2025 00:59:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737709155; x=1738313955; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=s94rBGytqIBo4tekti3AaboReTxXzjmT35D71HaGAY0=; b=qFutLe9oOhB3lpPmToxh/n6n6lHObAtWO+of6rVF1ON1/nxpLisgqaWc457GEgeoFr DWerTDRNEXWe5PbKGbgOfStRMaEG8kf6UbB1dZCGKLlQG01KTsG58fjqELWFgbhnkW+7 PoZUO0doDyf4PN/11pwA3RbzVUOLMMAEO5aa3UGCDwGLH714hVy6RsiGMlG5DQiWLAzv HuVQrNE4eUamLKyEm4OLbXcFnQh+jZrGZhXFV6+UXUQ3kJ4Sd+XAUXoY+kb4oxru1kK2 KX0/wSdgCgBoNICgLEgaZWGC9U2TxpSqAV6LnWvv882GQNIXPaqJWN8Di4rGq4WGTO7p 5VEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737709155; x=1738313955; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s94rBGytqIBo4tekti3AaboReTxXzjmT35D71HaGAY0=; b=G7euZEd8akhCVjPZP2oioyV1wz373usgai8vXCw0iDmW7cXMqnbw/8NwYTrg/FErpj W5rhSGycKJx7krrj347cVaDn9UtVXbAvYI39BAYISXtDbHmxhRI88YcsQ4+c1qwiEB6Q t2BBLYuOTC/nuRpW2IbV0B0HgK539R7bM+2w2qzJd5MU1KIcfEmjxaVH7gvJSSaSUXIR YOgtb02LASq2N4fKbO50uY3HlcYgAEwV++PlQXVfWmFJzEV/sWprfNq9HqzfPwbqW7xE NgiKefBzlSk8F9H93QG9Zdq9IO9oEm5SwXPWplqJx7Y+iP21rcjhS3SuTZ4RwbzyG1Pv ctJg== X-Forwarded-Encrypted: i=1; AJvYcCUkWYhQ1J+80QIfemBcE7H4foPgAVwK3eyE2A+S5OFSsTZ4HFz7KOZSe8H3dN/08nj+iJu4iHCfcL+RNSU=@vger.kernel.org X-Gm-Message-State: AOJu0YywRfMcCQKDgY0Mcb1X7E+qb+SzymhD58GZHBHvruUyH1mm5e2W ULAdGsa0BfWMp/YuGSEgOmQSHpaEsJMrjqqE3dtZk9HdjstIAxrat2JJzSq6xY8= X-Gm-Gg: ASbGncunJksGCSNKA8GRQPE97LIEborAbAXr/qHUeikYIbmesezjeFish51XdC4W7oZ eiv49/G42JXyrj7TaYIKCizrSmVAJ9ot8f3U3pE9s/K4Y/6ka87cw2WHokTVd1fkXxKcDM1ejCA 2jn1j63fDutmLobBE2kPHMNGH4Z83Ovpvhvjj4E+6DJadTSlEbq7wa7l6VGSK1K018NqYVgQcV5 bXqExnJOb4HLqULSn8NZW2Y/QioA9mF7wvygMzzi5+s9jBQXxRS4/fFWSj6s6JmTrNPhTieBns6 Z6jvCz/eZrYgPMIgiQ== X-Google-Smtp-Source: AGHT+IGd324gk3vUxN6Dj/7u4RkiZpPJbthb1QKDynr38KHf328GZ4u/AOfJCn10b0DpZhUS9hZTMg== X-Received: by 2002:a05:6a00:1412:b0:71e:4930:162c with SMTP id d2e1a72fcca58-72daf94f6a5mr41280675b3a.6.1737709155304; Fri, 24 Jan 2025 00:59:15 -0800 (PST) Received: from localhost ([122.172.84.139]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72f8a78e3e5sm1358044b3a.172.2025.01.24.00.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2025 00:59:14 -0800 (PST) From: Viresh Kumar To: "Rafael J. Wysocki" , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , Lifeng Zheng , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/15] cpufreq: qcom: Set .set_boost directly Date: Fri, 24 Jan 2025 14:28:17 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The boost feature can be controlled at two levels currently, driver level (applies to all policies) and per-policy. Currently the driver enables driver level boost support from the per-policy ->init() callback, which isn't really efficient as that gets called for each policy and then there is online/offline path too where this gets done unnecessarily. Instead set the .set_boost field directly and always enable the boost support. If a policy doesn't support boost feature, the core will not enable it for that policy. Keep the initial state of driver level boost to disabled and let the user enable it if required as ideally the boost frequencies must be used only when really required. Signed-off-by: Viresh Kumar --- drivers/cpufreq/qcom-cpufreq-hw.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index 7d83d7d2ccc8..4b3b3dbc7d38 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -566,12 +566,6 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) return -ENODEV; } - if (policy_has_boost_freq(policy)) { - ret = cpufreq_enable_boost_support(); - if (ret) - dev_warn(cpu_dev, "failed to enable boost: %d\n", ret); - } - return qcom_cpufreq_hw_lmh_init(policy, index); } @@ -610,6 +604,7 @@ static struct cpufreq_driver cpufreq_qcom_hw_driver = { .fast_switch = qcom_cpufreq_hw_fast_switch, .name = "qcom-cpufreq-hw", .ready = qcom_cpufreq_ready, + .set_boost = cpufreq_boost_set_sw, }; static unsigned long qcom_cpufreq_hw_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) -- 2.31.1.272.g89b43f80a514