* [PATCH 1/5] arm64: dts: qcom: sm8350: Vote the GPU memory bandwidth
2026-11-05 13:29 [PATCH 0/5] SM8350 GPU: memory bandwidth vote and speed bins Demeter Barna via B4 Relay
@ 2026-11-05 13:30 ` Demeter Barna via B4 Relay
2026-11-05 13:30 ` [PATCH 2/5] dt-bindings: nvmem: qfprom: Add SM8350 compatible Demeter Barna via B4 Relay
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Demeter Barna via B4 Relay @ 2026-11-05 13:30 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Srinivas Kandagatla,
Rob Clark, Sean Paul, Akhil P Oommen, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Marijn Suijten, David Airlie,
Simona Vetter
Cc: linux-arm-msm, devicetree, linux-kernel, dri-devel, freedreno,
Demeter Barna
From: Demeter Barna <me@fromdisposition.org>
The SM8350 GPU never asks for DDR bandwidth. On A660 the GMU gets a DDR
table with only an "off" entry, so the driver leaves the vote to the OPP
core, and the OPP core votes only when the GPU has an interconnect path
and its OPPs carry a bandwidth. sm8350.dtsi has neither.
Add the GPU's path to DDR and give each OPP the peak bandwidth that
Qualcomm's GPU tables for this SoC vote at that frequency on LPDDR5, as
kodiak.dtsi does for its A635.
Signed-off-by: Demeter Barna <me@fromdisposition.org>
---
arch/arm64/boot/dts/qcom/sm8350.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 55b32050c..903b2968c 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -2050,6 +2050,10 @@ gpu: gpu@3d00000 {
iommus = <&adreno_smmu 0 0x400>, <&adreno_smmu 1 0x400>;
+ interconnects = <&gem_noc MASTER_GFX3D QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "gfx-mem";
+
operating-points-v2 = <&gpu_opp_table>;
qcom,gmu = <&gmu>;
@@ -2068,51 +2072,61 @@ gpu_opp_table: opp-table {
opp-840000000 {
opp-hz = /bits/ 64 <840000000>;
opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
+ opp-peak-kBps = <12484375>;
};
opp-778000000 {
opp-hz = /bits/ 64 <778000000>;
opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
+ opp-peak-kBps = <12484375>;
};
opp-738000000 {
opp-hz = /bits/ 64 <738000000>;
opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
+ opp-peak-kBps = <12484375>;
};
opp-676000000 {
opp-hz = /bits/ 64 <676000000>;
opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
+ opp-peak-kBps = <10687500>;
};
opp-608000000 {
opp-hz = /bits/ 64 <608000000>;
opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>;
+ opp-peak-kBps = <6074218>;
};
opp-540000000 {
opp-hz = /bits/ 64 <540000000>;
opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+ opp-peak-kBps = <6074218>;
};
opp-491000000 {
opp-hz = /bits/ 64 <491000000>;
opp-level = <RPMH_REGULATOR_LEVEL_SVS_L0>;
+ opp-peak-kBps = <6074218>;
};
opp-443000000 {
opp-hz = /bits/ 64 <443000000>;
opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ opp-peak-kBps = <6074218>;
};
opp-379000000 {
opp-hz = /bits/ 64 <379000000>;
opp-level = <80 /* RPMH_REGULATOR_LEVEL_LOW_SVS_L1 */>;
+ opp-peak-kBps = <3972656>;
};
opp-315000000 {
opp-hz = /bits/ 64 <315000000>;
opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ opp-peak-kBps = <1761718>;
};
};
};
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 2/5] dt-bindings: nvmem: qfprom: Add SM8350 compatible
2026-11-05 13:29 [PATCH 0/5] SM8350 GPU: memory bandwidth vote and speed bins Demeter Barna via B4 Relay
2026-11-05 13:30 ` [PATCH 1/5] arm64: dts: qcom: sm8350: Vote the GPU memory bandwidth Demeter Barna via B4 Relay
@ 2026-11-05 13:30 ` Demeter Barna via B4 Relay
2026-11-19 22:13 ` Rob Herring (Arm)
2026-11-05 13:30 ` [PATCH 3/5] nvmem: qfprom: Add the SM8350 keepout regions Demeter Barna via B4 Relay
` (2 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Demeter Barna via B4 Relay @ 2026-11-05 13:30 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Srinivas Kandagatla,
Rob Clark, Sean Paul, Akhil P Oommen, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Marijn Suijten, David Airlie,
Simona Vetter
Cc: linux-arm-msm, devicetree, linux-kernel, dri-devel, freedreno,
Demeter Barna
From: Demeter Barna <me@fromdisposition.org>
Document the SM8350 QFPROM. It needs its own compatible because some of
its regions cannot be read, and the driver has to know which.
Signed-off-by: Demeter Barna <me@fromdisposition.org>
---
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
index 566304ed4..f1aacc8c0 100644
--- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
@@ -60,6 +60,7 @@ properties:
- qcom,sm6375-qfprom
- qcom,sm8150-qfprom
- qcom,sm8250-qfprom
+ - qcom,sm8350-qfprom
- qcom,sm8450-qfprom
- qcom,sm8550-qfprom
- qcom,sm8650-qfprom
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 2/5] dt-bindings: nvmem: qfprom: Add SM8350 compatible
2026-11-05 13:30 ` [PATCH 2/5] dt-bindings: nvmem: qfprom: Add SM8350 compatible Demeter Barna via B4 Relay
@ 2026-11-19 22:13 ` Rob Herring (Arm)
0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring (Arm) @ 2026-11-19 22:13 UTC (permalink / raw)
To: Demeter Barna
Cc: freedreno, dri-devel, Dmitry Baryshkov, David Airlie, Abel Vesa,
Conor Dooley, Abhinav Kumar, Bjorn Andersson, linux-arm-msm,
Konrad Dybcio, devicetree, Marijn Suijten, Simona Vetter,
Srinivas Kandagatla, Rob Clark, Jessica Zhang, Akhil P Oommen,
Sean Paul, Krzysztof Kozlowski, linux-kernel
On Thu, 05 Nov 2026 13:30:01 +0000, Demeter Barna wrote:
> Document the SM8350 QFPROM. It needs its own compatible because some of
> its regions cannot be read, and the driver has to know which.
>
> Signed-off-by: Demeter Barna <me@fromdisposition.org>
> ---
> Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/5] nvmem: qfprom: Add the SM8350 keepout regions
2026-11-05 13:29 [PATCH 0/5] SM8350 GPU: memory bandwidth vote and speed bins Demeter Barna via B4 Relay
2026-11-05 13:30 ` [PATCH 1/5] arm64: dts: qcom: sm8350: Vote the GPU memory bandwidth Demeter Barna via B4 Relay
2026-11-05 13:30 ` [PATCH 2/5] dt-bindings: nvmem: qfprom: Add SM8350 compatible Demeter Barna via B4 Relay
@ 2026-11-05 13:30 ` Demeter Barna via B4 Relay
2026-11-05 13:30 ` [PATCH 4/5] drm/msm/adreno: Add speedbins for A660 GPU Demeter Barna via B4 Relay
2026-11-05 13:30 ` [PATCH 5/5] arm64: dts: qcom: sm8350: Add the GPU speed bins Demeter Barna via B4 Relay
4 siblings, 0 replies; 7+ messages in thread
From: Demeter Barna via B4 Relay @ 2026-11-05 13:30 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Srinivas Kandagatla,
Rob Clark, Sean Paul, Akhil P Oommen, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Marijn Suijten, David Airlie,
Simona Vetter
Cc: linux-arm-msm, devicetree, linux-kernel, dri-devel, freedreno,
Demeter Barna
From: Demeter Barna <me@fromdisposition.org>
Some SM8350 fuse ranges are protected by the XPU, so the AP cannot read
them: a read in 0x0-0x11f, 0x128-0x147, 0x640-0x8df or 0x2110-0x216f
resets the SoC. The nvmem file in sysfs is readable by every user, so
once the QFPROM is described, anyone who reads the whole file resets the
device.
Keep those regions out, as for SC7180 and SC7280, which share the
0x128-0x147 one; they read as zeros.
The regions were measured on a Razer Edge 5G one 32-bit word at a time,
and each boundary was checked from both sides.
Signed-off-by: Demeter Barna <me@fromdisposition.org>
---
drivers/nvmem/qfprom.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
index 1de3435df..24958ed79 100644
--- a/drivers/nvmem/qfprom.c
+++ b/drivers/nvmem/qfprom.c
@@ -124,6 +124,18 @@ static const struct qfprom_soc_compatible_data sc7280_qfprom = {
.nkeepout = ARRAY_SIZE(sc7280_qfprom_keepout)
};
+static const struct nvmem_keepout sm8350_qfprom_keepout[] = {
+ {.start = 0x0, .end = 0x120},
+ {.start = 0x128, .end = 0x148},
+ {.start = 0x640, .end = 0x8e0},
+ {.start = 0x2110, .end = 0x2170}
+};
+
+static const struct qfprom_soc_compatible_data sm8350_qfprom = {
+ .keepout = sm8350_qfprom_keepout,
+ .nkeepout = ARRAY_SIZE(sm8350_qfprom_keepout)
+};
+
/**
* qfprom_disable_fuse_blowing() - Undo enabling of fuse blowing.
* @priv: Our driver data.
@@ -460,6 +472,7 @@ static const struct of_device_id qfprom_of_match[] = {
{ .compatible = "qcom,qfprom",},
{ .compatible = "qcom,sc7180-qfprom", .data = &sc7180_qfprom},
{ .compatible = "qcom,sc7280-qfprom", .data = &sc7280_qfprom},
+ { .compatible = "qcom,sm8350-qfprom", .data = &sm8350_qfprom},
{/* sentinel */},
};
MODULE_DEVICE_TABLE(of, qfprom_of_match);
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 4/5] drm/msm/adreno: Add speedbins for A660 GPU
2026-11-05 13:29 [PATCH 0/5] SM8350 GPU: memory bandwidth vote and speed bins Demeter Barna via B4 Relay
` (2 preceding siblings ...)
2026-11-05 13:30 ` [PATCH 3/5] nvmem: qfprom: Add the SM8350 keepout regions Demeter Barna via B4 Relay
@ 2026-11-05 13:30 ` Demeter Barna via B4 Relay
2026-11-05 13:30 ` [PATCH 5/5] arm64: dts: qcom: sm8350: Add the GPU speed bins Demeter Barna via B4 Relay
4 siblings, 0 replies; 7+ messages in thread
From: Demeter Barna via B4 Relay @ 2026-11-05 13:30 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Srinivas Kandagatla,
Rob Clark, Sean Paul, Akhil P Oommen, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Marijn Suijten, David Airlie,
Simona Vetter
Cc: linux-arm-msm, devicetree, linux-kernel, dri-devel, freedreno,
Demeter Barna
From: Demeter Barna <me@fromdisposition.org>
The SM8350 GPU comes in speed bins, read from QFPROM 0x17b bits 7:5.
Qualcomm's GPU tables for this SoC give:
fuse 1, 3: up to 900 MHz
fuse 0, 5, 7: up to 840 MHz
fuse 4: up to 738 MHz
The levels below are the same in every bin. Map these fuse values to
speed bins 1, 0 and 2. An unknown fuse value falls back to speed bin 0.
Signed-off-by: Demeter Barna <me@fromdisposition.org>
---
drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_catalog.c b/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
index 4ef2bd6e7..f1ae9932d 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
@@ -1096,6 +1096,14 @@ static const struct adreno_info a6xx_gpus[] = {
.gmu_cgc_mode = 0x00020000,
.prim_fifo_threshold = 0x00300200,
},
+ .speedbins = ADRENO_SPEEDBINS(
+ { 0, 0 },
+ { 1, 1 },
+ { 3, 1 },
+ { 4, 2 },
+ { 5, 0 },
+ { 7, 0 },
+ ),
}, {
.chip_ids = ADRENO_CHIP_IDS(0x06060300),
.family = ADRENO_6XX_GEN4,
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 5/5] arm64: dts: qcom: sm8350: Add the GPU speed bins
2026-11-05 13:29 [PATCH 0/5] SM8350 GPU: memory bandwidth vote and speed bins Demeter Barna via B4 Relay
` (3 preceding siblings ...)
2026-11-05 13:30 ` [PATCH 4/5] drm/msm/adreno: Add speedbins for A660 GPU Demeter Barna via B4 Relay
@ 2026-11-05 13:30 ` Demeter Barna via B4 Relay
4 siblings, 0 replies; 7+ messages in thread
From: Demeter Barna via B4 Relay @ 2026-11-05 13:30 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Srinivas Kandagatla,
Rob Clark, Sean Paul, Akhil P Oommen, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Marijn Suijten, David Airlie,
Simona Vetter
Cc: linux-arm-msm, devicetree, linux-kernel, dri-devel, freedreno,
Demeter Barna
From: Demeter Barna <me@fromdisposition.org>
Today every SM8350 runs its GPU up to 840 MHz, including the parts that
are validated only up to 738 MHz, and no part gets the 900 MHz level the
best bin supports.
Describe the QFPROM with the GPU speed bin cell, as sm8250.dtsi does,
let the GPU read it and mark each OPP with the bins that support it:
900 MHz bin 1 (new OPP, same bandwidth as 840 MHz)
840, 778 MHz bins 0 and 1
738 MHz and below all bins
Drop the note about downstream binning above the OPP table, which this
replaces.
Reading the whole nvmem file needs the SM8350 keepout regions in the
qfprom driver; without them it resets the SoC.
Signed-off-by: Demeter Barna <me@fromdisposition.org>
---
arch/arm64/boot/dts/qcom/sm8350.dtsi | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 903b2968c..d488c9d64 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -710,6 +710,18 @@ ipcc: mailbox@408000 {
#mbox-cells = <2>;
};
+ qfprom: efuse@784000 {
+ compatible = "qcom,sm8350-qfprom", "qcom,qfprom";
+ reg = <0 0x00784000 0 0x3000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ gpu_speed_bin: gpu-speed-bin@17b {
+ reg = <0x17b 0x1>;
+ bits = <5 3>;
+ };
+ };
+
gpi_dma2: dma-controller@800000 {
compatible = "qcom,sm8350-gpi-dma", "qcom,sm6350-gpi-dma";
reg = <0 0x00800000 0 0x60000>;
@@ -2057,6 +2069,9 @@ gpu: gpu@3d00000 {
operating-points-v2 = <&gpu_opp_table>;
qcom,gmu = <&gmu>;
+
+ nvmem-cells = <&gpu_speed_bin>;
+ nvmem-cell-names = "speed_bin";
#cooling-cells = <2>;
status = "disabled";
@@ -2065,68 +2080,84 @@ gpu_zap_shader: zap-shader {
memory-region = <&pil_gpu_mem>;
};
- /* note: downstream checks gpu binning for 670 Mhz */
gpu_opp_table: opp-table {
compatible = "operating-points-v2";
+ opp-900000000 {
+ opp-hz = /bits/ 64 <900000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L2>;
+ opp-peak-kBps = <12484375>;
+ opp-supported-hw = <0x2>;
+ };
+
opp-840000000 {
opp-hz = /bits/ 64 <840000000>;
opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
opp-peak-kBps = <12484375>;
+ opp-supported-hw = <0x3>;
};
opp-778000000 {
opp-hz = /bits/ 64 <778000000>;
opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
opp-peak-kBps = <12484375>;
+ opp-supported-hw = <0x3>;
};
opp-738000000 {
opp-hz = /bits/ 64 <738000000>;
opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
opp-peak-kBps = <12484375>;
+ opp-supported-hw = <0x7>;
};
opp-676000000 {
opp-hz = /bits/ 64 <676000000>;
opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
opp-peak-kBps = <10687500>;
+ opp-supported-hw = <0x7>;
};
opp-608000000 {
opp-hz = /bits/ 64 <608000000>;
opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>;
opp-peak-kBps = <6074218>;
+ opp-supported-hw = <0x7>;
};
opp-540000000 {
opp-hz = /bits/ 64 <540000000>;
opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
opp-peak-kBps = <6074218>;
+ opp-supported-hw = <0x7>;
};
opp-491000000 {
opp-hz = /bits/ 64 <491000000>;
opp-level = <RPMH_REGULATOR_LEVEL_SVS_L0>;
opp-peak-kBps = <6074218>;
+ opp-supported-hw = <0x7>;
};
opp-443000000 {
opp-hz = /bits/ 64 <443000000>;
opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
opp-peak-kBps = <6074218>;
+ opp-supported-hw = <0x7>;
};
opp-379000000 {
opp-hz = /bits/ 64 <379000000>;
opp-level = <80 /* RPMH_REGULATOR_LEVEL_LOW_SVS_L1 */>;
opp-peak-kBps = <3972656>;
+ opp-supported-hw = <0x7>;
};
opp-315000000 {
opp-hz = /bits/ 64 <315000000>;
opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
opp-peak-kBps = <1761718>;
+ opp-supported-hw = <0x7>;
};
};
};
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread