Skip to content

Commit 1876c78

Browse files
committed
Merge tag 'qcom-drivers-for-6.13-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers
A few more Qualcomm driver updates for v6.13 Make the Adreno driver invoke the SMMU aperture setup firmware function, which is required to allow the GPU to manage per-process page tables in some firmware versions - as an example Rb3Gen2 has no GPU without this. Add X1E Devkit to the list of devices that has functional EFI variable access through the uefisecapp. Flip the "manual slice configuration quirk" in the Qualcomm LLCC driver, as this only applies to a single platform, and introduce support for QCS8300, QCS615, SAR2130P, and SAR1130P. Lastly, add IPQ5424 and IPQ5404 to the Qualcomm socinfo driver. * tag 'qcom-drivers-for-6.13-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: ice: Remove the device_link field in qcom_ice drm/msm/adreno: Setup SMMU aparture for per-process page table firmware: qcom: scm: Introduce CP_SMMU_APERTURE_ID soc: qcom: socinfo: add IPQ5424/IPQ5404 SoC ID dt-bindings: arm: qcom,ids: add SoC ID for IPQ5424/IPQ5404 soc: qcom: llcc: Flip the manual slice configuration condition dt-bindings: firmware: qcom,scm: Document sm8750 SCM firmware: qcom: uefisecapp: Allow X1E Devkit devices soc: qcom: llcc: Add LLCC configuration for the QCS8300 platform dt-bindings: cache: qcom,llcc: Document the QCS8300 LLCC soc: qcom: llcc: Add configuration data for QCS615 dt-bindings: cache: qcom,llcc: Document the QCS615 LLCC soc: qcom: llcc: add support for SAR2130P and SAR1130P soc: qcom: llcc: use deciman integers for bit shift values dt-bindings: cache: qcom,llcc: document SAR2130P and SAR1130P Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents f335e01 + 54a8cd0 commit 1876c78

File tree

11 files changed

+676
-36
lines changed

11 files changed

+676
-36
lines changed

Documentation/devicetree/bindings/cache/qcom,llcc.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ description: |
2020
properties:
2121
compatible:
2222
enum:
23+
- qcom,qcs615-llcc
24+
- qcom,qcs8300-llcc
2325
- qcom,qdu1000-llcc
2426
- qcom,sa8775p-llcc
27+
- qcom,sar1130p-llcc
28+
- qcom,sar2130p-llcc
2529
- qcom,sc7180-llcc
2630
- qcom,sc7280-llcc
2731
- qcom,sc8180x-llcc
@@ -67,6 +71,33 @@ allOf:
6771
compatible:
6872
contains:
6973
enum:
74+
- qcom,sar1130p-llcc
75+
- qcom,sar2130p-llcc
76+
then:
77+
properties:
78+
reg:
79+
items:
80+
- description: LLCC0 base register region
81+
- description: LLCC1 base register region
82+
- description: LLCC broadcast OR register region
83+
- description: LLCC broadcast AND register region
84+
- description: LLCC scratchpad broadcast OR register region
85+
- description: LLCC scratchpad broadcast AND register region
86+
reg-names:
87+
items:
88+
- const: llcc0_base
89+
- const: llcc1_base
90+
- const: llcc_broadcast_base
91+
- const: llcc_broadcast_and_base
92+
- const: llcc_scratchpad_broadcast_base
93+
- const: llcc_scratchpad_broadcast_and_base
94+
95+
- if:
96+
properties:
97+
compatible:
98+
contains:
99+
enum:
100+
- qcom,qcs615-llcc
70101
- qcom,sc7180-llcc
71102
- qcom,sm6350-llcc
72103
then:
@@ -165,6 +196,7 @@ allOf:
165196
compatible:
166197
contains:
167198
enum:
199+
- qcom,qcs8300-llcc
168200
- qcom,sdm845-llcc
169201
- qcom,sm8150-llcc
170202
- qcom,sm8250-llcc

Documentation/devicetree/bindings/firmware/qcom,scm.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ properties:
6767
- qcom,scm-sm8450
6868
- qcom,scm-sm8550
6969
- qcom,scm-sm8650
70+
- qcom,scm-sm8750
7071
- qcom,scm-qcs404
7172
- qcom,scm-x1e80100
7273
- const: qcom,scm
@@ -198,6 +199,7 @@ allOf:
198199
- qcom,scm-sm8450
199200
- qcom,scm-sm8550
200201
- qcom,scm-sm8650
202+
- qcom,scm-sm8750
201203
then:
202204
properties:
203205
interrupts: false

drivers/firmware/qcom/qcom_scm.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,32 @@ int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare)
903903
}
904904
EXPORT_SYMBOL_GPL(qcom_scm_restore_sec_cfg);
905905

906+
#define QCOM_SCM_CP_APERTURE_CONTEXT_MASK GENMASK(7, 0)
907+
908+
bool qcom_scm_set_gpu_smmu_aperture_is_available(void)
909+
{
910+
return __qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_MP,
911+
QCOM_SCM_MP_CP_SMMU_APERTURE_ID);
912+
}
913+
EXPORT_SYMBOL_GPL(qcom_scm_set_gpu_smmu_aperture_is_available);
914+
915+
int qcom_scm_set_gpu_smmu_aperture(unsigned int context_bank)
916+
{
917+
struct qcom_scm_desc desc = {
918+
.svc = QCOM_SCM_SVC_MP,
919+
.cmd = QCOM_SCM_MP_CP_SMMU_APERTURE_ID,
920+
.arginfo = QCOM_SCM_ARGS(4),
921+
.args[0] = 0xffff0000 | FIELD_PREP(QCOM_SCM_CP_APERTURE_CONTEXT_MASK, context_bank),
922+
.args[1] = 0xffffffff,
923+
.args[2] = 0xffffffff,
924+
.args[3] = 0xffffffff,
925+
.owner = ARM_SMCCC_OWNER_SIP
926+
};
927+
928+
return qcom_scm_call(__scm->dev, &desc, NULL);
929+
}
930+
EXPORT_SYMBOL_GPL(qcom_scm_set_gpu_smmu_aperture);
931+
906932
int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size)
907933
{
908934
struct qcom_scm_desc desc = {
@@ -1740,6 +1766,7 @@ static const struct of_device_id qcom_scm_qseecom_allowlist[] __maybe_unused = {
17401766
{ .compatible = "microsoft,romulus13", },
17411767
{ .compatible = "microsoft,romulus15", },
17421768
{ .compatible = "qcom,sc8180x-primus" },
1769+
{ .compatible = "qcom,x1e001de-devkit" },
17431770
{ .compatible = "qcom,x1e80100-crd" },
17441771
{ .compatible = "qcom,x1e80100-qcp" },
17451772
{ }

drivers/firmware/qcom/qcom_scm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ struct qcom_tzmem_pool *qcom_scm_get_tzmem_pool(void);
116116
#define QCOM_SCM_MP_IOMMU_SET_CP_POOL_SIZE 0x05
117117
#define QCOM_SCM_MP_VIDEO_VAR 0x08
118118
#define QCOM_SCM_MP_ASSIGN 0x16
119+
#define QCOM_SCM_MP_CP_SMMU_APERTURE_ID 0x1b
119120
#define QCOM_SCM_MP_SHM_BRIDGE_ENABLE 0x1c
120121
#define QCOM_SCM_MP_SHM_BRIDGE_DELETE 0x1d
121122
#define QCOM_SCM_MP_SHM_BRIDGE_CREATE 0x1e

drivers/gpu/drm/msm/adreno/adreno_gpu.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,19 @@ struct drm_gem_object *adreno_fw_create_bo(struct msm_gpu *gpu,
572572

573573
int adreno_hw_init(struct msm_gpu *gpu)
574574
{
575+
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
576+
int ret;
577+
575578
VERB("%s", gpu->name);
576579

580+
if (adreno_gpu->info->family >= ADRENO_6XX_GEN1 &&
581+
qcom_scm_set_gpu_smmu_aperture_is_available()) {
582+
/* We currently always use context bank 0, so hard code this */
583+
ret = qcom_scm_set_gpu_smmu_aperture(0);
584+
if (ret)
585+
DRM_DEV_ERROR(gpu->dev->dev, "unable to set SMMU aperture: %d\n", ret);
586+
}
587+
577588
for (int i = 0; i < gpu->nr_rings; i++) {
578589
struct msm_ringbuffer *ring = gpu->rb[i];
579590

drivers/soc/qcom/ice.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
struct qcom_ice {
4545
struct device *dev;
4646
void __iomem *base;
47-
struct device_link *link;
4847

4948
struct clk *core_clk;
5049
};
@@ -268,6 +267,7 @@ struct qcom_ice *of_qcom_ice_get(struct device *dev)
268267
struct qcom_ice *ice;
269268
struct resource *res;
270269
void __iomem *base;
270+
struct device_link *link;
271271

272272
if (!dev || !dev->of_node)
273273
return ERR_PTR(-ENODEV);
@@ -311,8 +311,8 @@ struct qcom_ice *of_qcom_ice_get(struct device *dev)
311311
return ERR_PTR(-EPROBE_DEFER);
312312
}
313313

314-
ice->link = device_link_add(dev, &pdev->dev, DL_FLAG_AUTOREMOVE_SUPPLIER);
315-
if (!ice->link) {
314+
link = device_link_add(dev, &pdev->dev, DL_FLAG_AUTOREMOVE_SUPPLIER);
315+
if (!link) {
316316
dev_err(&pdev->dev,
317317
"Failed to create device link to consumer %s\n",
318318
dev_name(dev));

0 commit comments

Comments
 (0)