* [PATCH 0/2] qcom-geni: Fix QUP Core ICC votes
@ 2026-09-08 19:05 Viken Dadhaniya
2026-09-08 19:05 ` [PATCH 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants Viken Dadhaniya
2026-09-08 19:05 ` [PATCH 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-08 19:05 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
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>
---
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 | 21 +++++++++++----------
2 files changed, 13 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 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants
2026-09-08 19:05 [PATCH 0/2] qcom-geni: Fix QUP Core ICC votes Viken Dadhaniya
@ 2026-09-08 19:05 ` Viken Dadhaniya
2026-09-09 11:42 ` Konrad Dybcio
2026-09-08 19:05 ` [PATCH 2/2] tty: serial: qcom_geni_serial: Keep console RX functional after deep idle Viken Dadhaniya
1 sibling, 1 reply; 6+ messages in thread
From: Viken Dadhaniya @ 2026-09-08 19:05 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
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.
Fixes: 58ffbba6a399 ("soc: qcom: geni: Support for ICC voting")
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
---
include/linux/soc/qcom/geni-se.h | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/include/linux/soc/qcom/geni-se.h b/include/linux/soc/qcom/geni-se.h
index 29a53bbc0dd4..2243005f5e2e 100644
--- a/include/linux/soc/qcom/geni-se.h
+++ b/include/linux/soc/qcom/geni-se.h
@@ -347,17 +347,18 @@ 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.
+ * ICC bandwidth values in Bps for the GENI_TO_CORE ("qup-core") path.
+ * Convert them with Bps_to_icc() before setting avg_bw. The QUP ICC provider
+ * maps each threshold to the Core 2X rate named by the macro suffix.
+ *
+ * These values are core clock votes, not GENI transfer bandwidths.
*/
-#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 CORE_2X_100_MHZ 50000000
+#define CORE_2X_150_MHZ 75000000
+#define CORE_2X_200_MHZ 100000000
+#define CORE_2X_236_MHZ 118000000
#define GENI_DEFAULT_BW Bps_to_icc(1000)
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] tty: serial: qcom_geni_serial: Keep console RX functional after deep idle
2026-09-08 19:05 [PATCH 0/2] qcom-geni: Fix QUP Core ICC votes Viken Dadhaniya
2026-09-08 19:05 ` [PATCH 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants Viken Dadhaniya
@ 2026-09-08 19:05 ` Viken Dadhaniya
2026-09-09 11:44 ` Konrad Dybcio
1 sibling, 1 reply; 6+ messages in thread
From: Viken Dadhaniya @ 2026-09-08 19:05 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
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")
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..b4b4724f1c5b 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 [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants
2026-09-08 19:05 ` [PATCH 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants Viken Dadhaniya
@ 2026-09-09 11:42 ` Konrad Dybcio
2026-09-13 8:42 ` Viken Dadhaniya
0 siblings, 1 reply; 6+ messages in thread
From: Konrad Dybcio @ 2026-09-09 11:42 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
On 9/8/26 9:05 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.
[...]
> /*
> - * 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.
> + * ICC bandwidth values in Bps for the GENI_TO_CORE ("qup-core") path.
> + * Convert them with Bps_to_icc() before setting avg_bw. The QUP ICC provider
> + * maps each threshold to the Core 2X rate named by the macro suffix.
> + *
> + * These values are core clock votes, not GENI transfer bandwidths.
> */
> -#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 CORE_2X_100_MHZ 50000000
> +#define CORE_2X_150_MHZ 75000000
> +#define CORE_2X_200_MHZ 100000000
> +#define CORE_2X_236_MHZ 118000000
Today, even with patch 2 applied, many of these rates are unused.
Are we going to?
Is there any logic we could apply to derive them?
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] tty: serial: qcom_geni_serial: Keep console RX functional after deep idle
2026-09-08 19:05 ` [PATCH 2/2] tty: serial: qcom_geni_serial: Keep console RX functional after deep idle Viken Dadhaniya
@ 2026-09-09 11:44 ` Konrad Dybcio
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-09-09 11:44 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
On 9/8/26 9:05 PM, Viken Dadhaniya wrote:
> 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")
> 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..b4b4724f1c5b 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;
Downstream selects this based on whether the UART is a console, but
I believe baud rate is much more likely to be a good discriminant
here
FWIW you can remove the parentheses
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants
2026-09-09 11:42 ` Konrad Dybcio
@ 2026-09-13 8:42 ` Viken Dadhaniya
0 siblings, 0 replies; 6+ messages in thread
From: Viken Dadhaniya @ 2026-09-13 8:42 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Akash Asthana,
Matthias Kaehlcke, Greg Kroah-Hartman, Jiri Slaby
Cc: mukesh.savaliya, linux-arm-msm, linux-kernel, linux-serial
On 9/9/2026 5:12 PM, Konrad Dybcio wrote:
> On 9/8/26 9:05 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.
>
> [...]
>
>> /*
>> - * 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.
>> + * ICC bandwidth values in Bps for the GENI_TO_CORE ("qup-core") path.
>> + * Convert them with Bps_to_icc() before setting avg_bw. The QUP ICC provider
>> + * maps each threshold to the Core 2X rate named by the macro suffix.
>> + *
>> + * These values are core clock votes, not GENI transfer bandwidths.
>> */
>> -#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 CORE_2X_100_MHZ 50000000
>> +#define CORE_2X_150_MHZ 75000000
>> +#define CORE_2X_200_MHZ 100000000
>> +#define CORE_2X_236_MHZ 118000000
>
> Today, even with patch 2 applied, many of these rates are unused.
> Are we going to?
>
> Is there any logic we could apply to derive them?
These represent QUP Core 2X clock-rate levels for GENI clients, not
protocol bandwidth. Currently only the 19.2 and 50 MHz levels are used;
there is no planned user for the higher levels. I’ll drop the unused
definitions.
>
> Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-09-13 8:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-08 19:05 [PATCH 0/2] qcom-geni: Fix QUP Core ICC votes Viken Dadhaniya
2026-09-08 19:05 ` [PATCH 1/2] soc: qcom: geni-se: Correct QUP Core ICC vote constants Viken Dadhaniya
2026-09-09 11:42 ` Konrad Dybcio
2026-09-13 8:42 ` Viken Dadhaniya
2026-09-08 19:05 ` [PATCH 2/2] tty: serial: qcom_geni_serial: Keep console RX functional after deep idle Viken Dadhaniya
2026-09-09 11:44 ` Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®