From patchwork Wed Dec 18 18:25:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Chan X-Patchwork-Id: 13914042 X-Patchwork-Delegate: viresh.linux@gmail.com Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 764071FCFC0; Wed, 18 Dec 2024 18:29:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734546559; cv=none; b=Ei0i2dljspzn98dZ+74FnKuojda/P0f8gVW2khdOKY1OZWuqZwVZjiOUbZBAGbbYFQ4nt4MNDFRo0J/kIPG8uLdNwHHs4Iist8kcaep60bri6A7Nigx8Pb7/8LFs+H2NlkiAdlC4dvFr2xlnFFBx9F2cEL5XY16TCnwv69DQ4UM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734546559; c=relaxed/simple; bh=fCCg/V03dlTVApvfdzM+UzWAAxzMgivnQ9qaZgFnZ0g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NYNn6SoSzxaHScbAmSS9mBpRmdViulZ4LwSKYwjqUOd3CPe5TLvr7zR27v7P28LzA1ndPd3CaHXYawcSV7JI70gq+WYCfQsDGeEvIilGsO3adbpdyYIjTRlzwFISfcwTW+WAChx33fDvi7HOAli5NsywQ4PZEjeThZyPuA8nkNI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=S6yH2rLY; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S6yH2rLY" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-21654fdd5daso5095ad.1; Wed, 18 Dec 2024 10:29:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734546558; x=1735151358; 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=O1e4i2yJb6M8JWolS3FF1qtbGtdKGQDJ3R3qFDxNx2w=; b=S6yH2rLY4KugWbgc+1EJwTDw0ZE6Q8L7qsYyxqYKig0+swiJtrfRCQnS761Vc9BiU3 snL4DjI5xTHZ8LOcGIChI/hHeEGxF7wNrfzQ4EIEqVeuvW4e8QkshoIVwsjrC/HQVXX3 6KrJmw1+/XLGaN+Jjn5Imu0N/w0zPmRcgqoBlLW+SAqBc7DcDLeUxvmPHOaB0jlj9MPk g9O2c4/EgTQxtN/OFc6pl4i7u67JkEZ2YLAscqBgB3cWQClDMiVsaRY9Ex1+TYWVthz+ EsvYEycASLOMsSiKxbGQtvcX4OFg2k2fjo8xlj+OdpZbyvIdyrgoC6Q5qOKE+f/JZ5eT 0Ohg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734546558; x=1735151358; 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=O1e4i2yJb6M8JWolS3FF1qtbGtdKGQDJ3R3qFDxNx2w=; b=gcnGJAAEclSbZr+TfGoEr76QdL1YcKupw1B5D7SuqxuPKwPhMH6GdKhP3BTEyVv8FQ sPI15ontwZutnNBGXR6B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Received: by 2002:a17:903:2306:b0:215:a190:ba10 with SMTP id d9443c01a7336-218d6fe1a96mr58866725ad.15.1734546557853; Wed, 18 Dec 2024 10:29:17 -0800 (PST) Received: from nick-mbp.. ([59.188.211.160]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-218a1dcb3ffsm79202565ad.75.2024.12.18.10.29.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 10:29:17 -0800 (PST) From: Nick Chan To: Hector Martin , Sven Peter , Alyssa Rosenzweig , "Rafael J . Wysocki" , Viresh Kumar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Asahi Linux , Linux ARM Kernel Architecture , Linux power management , Devicetree , LKML Cc: Nick Chan , Christian Loehle Subject: [PATCH v3 6/7] cpufreq: apple-soc: Set fallback transition latency to APPLE_DVFS_TRANSITION_TIMEOUT Date: Thu, 19 Dec 2024 02:25:08 +0800 Message-ID: <20241218182834.22334-7-towinchenmi@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241218182834.22334-1-towinchenmi@gmail.com> References: <20241218182834.22334-1-towinchenmi@gmail.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The driver already assumes transitions will not take longer than APPLE_DVFS_TRANSITION_TIMEOUT in apple_soc_cpufreq_set_target(), so it makes little sense to set CPUFREQ_ETERNAL as the transition latency when the transistion latency is not given by the opp-table. Reviewed-by: Christian Loehle Signed-off-by: Nick Chan --- drivers/cpufreq/apple-soc-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/apple-soc-cpufreq.c b/drivers/cpufreq/apple-soc-cpufreq.c index 94e57f055a5f..879ddec9e557 100644 --- a/drivers/cpufreq/apple-soc-cpufreq.c +++ b/drivers/cpufreq/apple-soc-cpufreq.c @@ -291,7 +291,7 @@ static int apple_soc_cpufreq_init(struct cpufreq_policy *policy) transition_latency = dev_pm_opp_get_max_transition_latency(cpu_dev); if (!transition_latency) - transition_latency = CPUFREQ_ETERNAL; + transition_latency = APPLE_DVFS_TRANSITION_TIMEOUT * NSEC_PER_USEC; policy->cpuinfo.transition_latency = transition_latency; policy->dvfs_possible_from_any_cpu = true;