Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] qcom-geni: Fix QUP Core ICC votes
@ 2026-09-15 13:26 Viken Dadhaniya
  2026-09-15 13:26 ` [PATCH v2 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants Viken Dadhaniya
  2026-09-15 13:26 ` [PATCH v2 2/2] tty: serial: qcom_geni_serial: Keep console RX functional after deep idle Viken Dadhaniya
  0 siblings, 2 replies; 6+ messages in thread
From: Viken Dadhaniya @ 2026-09-15 13:26 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Akash Asthana, Matthias Kaehlcke,
	Greg Kroah-Hartman, Jiri Slaby
  Cc: mukesh.savaliya, linux-arm-msm, linux-kernel, linux-serial,
	Viken Dadhaniya, stable, Konrad Dybcio

The GENI_TO_CORE ("qup-core") interconnect vote selects the QUP Core 2X
clock rate. The Core 2X bandwidth constants currently contain values that
are several orders of magnitude too small. Also, at baud rates up to
115200, the serial console uses only a 1 kBps keepalive vote, which does
not request a Core clock and can leave console RX unresponsive after the
system enters a deep CPU idle state.

Correct the common Core 2X bandwidth constants and use the 19.2 MHz Core
2X vote for the low-baud console path. Higher baud rates continue to use
the 50 MHz vote.

Patch 1 corrects the common Core 2X bandwidth constants. Patch 2 updates
the serial console's low-baud vote to use the corrected 19.2 MHz value.

Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
---
Changes in v2:
- Drop the unused definitions.
- Remove parentheses.
- Link to v1: https://patch.msgid.link/20260909-correct-icc-bandwidth-vote-constants-v1-0-fbebf6b3c341@oss.qualcomm.com

---
Viken Dadhaniya (2):
      soc: qcom: geni-se: Correct QUP Core ICC vote constants
      tty: serial: qcom_geni_serial: Keep console RX functional after deep idle

 drivers/tty/serial/qcom_geni_serial.c |  5 ++---
 include/linux/soc/qcom/geni-se.h      | 15 +++++----------
 2 files changed, 7 insertions(+), 13 deletions(-)
---
base-commit: 944a035ecca915ae947905dcfb03f2b9dc6d032c
change-id: 20260908-correct-icc-bandwidth-vote-constants-49001bf6e03b

Best regards,
--  
Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants
  2026-09-15 13:26 [PATCH v2 0/2] qcom-geni: Fix QUP Core ICC votes Viken Dadhaniya
@ 2026-09-15 13:26 ` Viken Dadhaniya
  2026-09-15 13:33   ` sashiko-bot
  2026-09-21 13:35   ` Konrad Dybcio
  2026-09-15 13:26 ` [PATCH v2 2/2] tty: serial: qcom_geni_serial: Keep console RX functional after deep idle Viken Dadhaniya
  1 sibling, 2 replies; 6+ messages in thread
From: Viken Dadhaniya @ 2026-09-15 13:26 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Akash Asthana, Matthias Kaehlcke,
	Greg Kroah-Hartman, Jiri Slaby
  Cc: mukesh.savaliya, linux-arm-msm, linux-kernel, linux-serial,
	Viken Dadhaniya, stable

The GENI_TO_CORE ("qup-core") ICC vote selects the QUP Core 2X clock
rate. The CORE_2X_*_MHZ constants are expressed in Bps, but their
values are several orders of magnitude too small. For example, the
50 MHz threshold is represented by 2500 rather than 25000000 Bps.

As a result, clients using these constants can severely under-vote the
QUP Core clock.

Correct the constants to their intended Bps thresholds so that the ICC
provider selects the corresponding QUP Core 2X clock rate. Drop the unused
definitions.

Fixes: 58ffbba6a399 ("soc: qcom: geni: Support for ICC voting")
Cc: stable@vger.kernel.org
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
---
 include/linux/soc/qcom/geni-se.h | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/include/linux/soc/qcom/geni-se.h b/include/linux/soc/qcom/geni-se.h
index 29a53bbc0dd4..5f18d281e6a4 100644
--- a/include/linux/soc/qcom/geni-se.h
+++ b/include/linux/soc/qcom/geni-se.h
@@ -347,17 +347,12 @@ struct geni_se {
 #define QUP_SE_VERSION_2_5                  0x20050000
 
 /*
- * Define bandwidth thresholds that cause the underlying Core 2X interconnect
- * clock to run at the named frequency. These baseline values are recommended
- * by the hardware team, and are not dynamically scaled with GENI bandwidth
- * beyond basic on/off.
+ * QUP Core 2X clock votes used by GENI clients through the "qup-core" ICC
+ * path. Values are in Bps and must be converted with Bps_to_icc() before
+ * setting avg_bw.
  */
-#define CORE_2X_19_2_MHZ		960
-#define CORE_2X_50_MHZ			2500
-#define CORE_2X_100_MHZ			5000
-#define CORE_2X_150_MHZ			7500
-#define CORE_2X_200_MHZ			10000
-#define CORE_2X_236_MHZ			16383
+#define CORE_2X_19_2_MHZ		9600000
+#define CORE_2X_50_MHZ			25000000
 
 #define GENI_DEFAULT_BW			Bps_to_icc(1000)
 

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] tty: serial: qcom_geni_serial: Keep console RX functional after deep idle
  2026-09-15 13:26 [PATCH v2 0/2] qcom-geni: Fix QUP Core ICC votes Viken Dadhaniya
  2026-09-15 13:26 ` [PATCH v2 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants Viken Dadhaniya
@ 2026-09-15 13:26 ` Viken Dadhaniya
  2026-09-15 13:35   ` sashiko-bot
  1 sibling, 1 reply; 6+ messages in thread
From: Viken Dadhaniya @ 2026-09-15 13:26 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Akash Asthana, Matthias Kaehlcke,
	Greg Kroah-Hartman, Jiri Slaby
  Cc: mukesh.savaliya, linux-arm-msm, linux-kernel, linux-serial,
	Viken Dadhaniya, stable, Konrad Dybcio

At baud rates up to 115200, the serial console uses only a 1 kBps keepalive
vote for the GENI_TO_CORE ("qup-core") ICC path. This vote keeps the path
active but does not request a QUP Core 2X clock rate.

When the CPU enters a deeper idle state, the missing Core clock vote can
leave the console RX path unresponsive.

Use the 19.2 MHz Core 2X vote at low baud rates, while retaining the 50 MHz
vote at higher baud rates, so that console RX remains functional after deep
idle transitions.

Fixes: 7cf563b2c846 ("tty: serial: qcom_geni_serial: Add interconnect support")
Cc: stable@vger.kernel.org
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
---
 drivers/tty/serial/qcom_geni_serial.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 3633723acef8..f7e81b652255 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -1482,9 +1482,8 @@ static int geni_serial_set_rate(struct geni_se *se, unsigned long baud)
 	 * Bump up BW vote on CPU and CORE path as driver supports FIFO mode
 	 * only.
 	 */
-	avg_bw_core = (baud > 115200) ? Bps_to_icc(CORE_2X_50_MHZ)
-						: GENI_DEFAULT_BW;
-	port->se.icc_paths[GENI_TO_CORE].avg_bw = avg_bw_core;
+	avg_bw_core = baud > 115200 ? CORE_2X_50_MHZ : CORE_2X_19_2_MHZ;
+	port->se.icc_paths[GENI_TO_CORE].avg_bw = Bps_to_icc(avg_bw_core);
 	port->se.icc_paths[CPU_TO_GENI].avg_bw = Bps_to_icc(baud);
 	geni_icc_set_bw(&port->se);
 

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants
  2026-09-15 13:26 ` [PATCH v2 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants Viken Dadhaniya
@ 2026-09-15 13:33   ` sashiko-bot
  2026-09-21 13:35   ` Konrad Dybcio
  1 sibling, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-09-15 13:33 UTC (permalink / raw)
  To: Viken Dadhaniya; +Cc: linux-serial

> The GENI_TO_CORE ("qup-core") ICC vote selects the QUP Core 2X clock
> rate. The CORE_2X_*_MHZ constants are expressed in Bps, but their
> values are several orders of magnitude too small. For example, the
> 50 MHz threshold is represented by 2500 rather than 25000000 Bps.
> 
> As a result, clients using these constants can severely under-vote the
> QUP Core clock.
> 
> Correct the constants to their intended Bps thresholds so that the ICC
> provider selects the corresponding QUP Core 2X clock rate. Drop the unused
> definitions.
> 
> Fixes: 58ffbba6a399 ("soc: qcom: geni: Support for ICC voting")
> Cc: stable@vger.kernel.org
> Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260915-correct-icc-bandwidth-vote-constants-v2-0-f78eb611204e@oss.qualcomm.com?part=1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/2] tty: serial: qcom_geni_serial: Keep console RX functional after deep idle
  2026-09-15 13:26 ` [PATCH v2 2/2] tty: serial: qcom_geni_serial: Keep console RX functional after deep idle Viken Dadhaniya
@ 2026-09-15 13:35   ` sashiko-bot
  0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-09-15 13:35 UTC (permalink / raw)
  To: Viken Dadhaniya; +Cc: linux-serial

> At baud rates up to 115200, the serial console uses only a 1 kBps keepalive
> vote for the GENI_TO_CORE ("qup-core") ICC path. This vote keeps the path
> active but does not request a QUP Core 2X clock rate.
> 
> When the CPU enters a deeper idle state, the missing Core clock vote can
> leave the console RX path unresponsive.
> 
> Use the 19.2 MHz Core 2X vote at low baud rates, while retaining the 50 MHz
> vote at higher baud rates, so that console RX remains functional after deep
> idle transitions.
> 
> Fixes: 7cf563b2c846 ("tty: serial: qcom_geni_serial: Add interconnect support")
> Cc: stable@vger.kernel.org
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260915-correct-icc-bandwidth-vote-constants-v2-0-f78eb611204e@oss.qualcomm.com?part=2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants
  2026-09-15 13:26 ` [PATCH v2 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants Viken Dadhaniya
  2026-09-15 13:33   ` sashiko-bot
@ 2026-09-21 13:35   ` Konrad Dybcio
  1 sibling, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-09-21 13:35 UTC (permalink / raw)
  To: Viken Dadhaniya, Bjorn Andersson, Konrad Dybcio, Akash Asthana,
	Matthias Kaehlcke, Greg Kroah-Hartman, Jiri Slaby
  Cc: mukesh.savaliya, linux-arm-msm, linux-kernel, linux-serial,
	stable

On 9/15/26 3:26 PM, Viken Dadhaniya wrote:
> The GENI_TO_CORE ("qup-core") ICC vote selects the QUP Core 2X clock
> rate. The CORE_2X_*_MHZ constants are expressed in Bps, but their
> values are several orders of magnitude too small. For example, the
> 50 MHz threshold is represented by 2500 rather than 25000000 Bps.
> 
> As a result, clients using these constants can severely under-vote the
> QUP Core clock.
> 
> Correct the constants to their intended Bps thresholds so that the ICC
> provider selects the corresponding QUP Core 2X clock rate. Drop the unused
> definitions.
> 
> Fixes: 58ffbba6a399 ("soc: qcom: geni: Support for ICC voting")
> Cc: stable@vger.kernel.org
> Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-21 13:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 13:26 [PATCH v2 0/2] qcom-geni: Fix QUP Core ICC votes Viken Dadhaniya
2026-09-15 13:26 ` [PATCH v2 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants Viken Dadhaniya
2026-09-15 13:33   ` sashiko-bot
2026-09-21 13:35   ` Konrad Dybcio
2026-09-15 13:26 ` [PATCH v2 2/2] tty: serial: qcom_geni_serial: Keep console RX functional after deep idle Viken Dadhaniya
2026-09-15 13:35   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox