diff --git a/drivers/gpu/msm/Kconfig b/drivers/gpu/msm/Kconfig index fbcdea99ca6a..fc01862f5641 100644 --- a/drivers/gpu/msm/Kconfig +++ b/drivers/gpu/msm/Kconfig @@ -70,3 +70,11 @@ config QCOM_KGSL_CONTEXT_DEBUG When enabled, total number of KGSL contexts, number of attached and detached contexts are dumped into kernel log for all the processes. This gives insight about the number of contexts held by each process. + +config QCOM_KGSL_QDSS_STM + bool "Enable support for QDSS STM for Adreno GPU" + depends on QCOM_KGSL && CORESIGHT + help + When enabled, the Adreno GPU QDSS STM support is enabled. GPU QDSS STM + memory will be mapped to GPU and QDSS clock needed to access this memory + is voted. Debug kernels should say 'Y' here. diff --git a/drivers/gpu/msm/adreno_a6xx_gmu.c b/drivers/gpu/msm/adreno_a6xx_gmu.c index acd6a97cb66c..cf3506a06372 100644 --- a/drivers/gpu/msm/adreno_a6xx_gmu.c +++ b/drivers/gpu/msm/adreno_a6xx_gmu.c @@ -2664,11 +2664,11 @@ int a6xx_gmu_probe(struct kgsl_device *device, return ret; /* * Voting for apb_pclk will enable power and clocks required for - * QDSS path to function. However, if CORESIGHT is not enabled, + * QDSS path to function. However, if QCOM_KGSL_QDSS_STM is not enabled, * QDSS is essentially unusable. Hence, if QDSS cannot be used, * don't vote for this clock. */ - if (!IS_ENABLED(CONFIG_CORESIGHT)) { + if (!IS_ENABLED(CONFIG_QCOM_KGSL_QDSS_STM)) { for (i = 0; i < ret; i++) { if (!strcmp(gmu->clks[i].id, "apb_pclk")) { gmu->clks[i].clk = NULL; diff --git a/drivers/gpu/msm/adreno_a6xx_rgmu.c b/drivers/gpu/msm/adreno_a6xx_rgmu.c index 4e82413092e9..49d71e5318e5 100644 --- a/drivers/gpu/msm/adreno_a6xx_rgmu.c +++ b/drivers/gpu/msm/adreno_a6xx_rgmu.c @@ -1258,11 +1258,11 @@ static int a6xx_rgmu_clocks_probe(struct a6xx_rgmu_device *rgmu, return ret; /* * Voting for apb_pclk will enable power and clocks required for - * QDSS path to function. However, if CORESIGHT is not enabled, + * QDSS path to function. However, if QCOM_KGSL_QDSS_STM is not enabled, * QDSS is essentially unusable. Hence, if QDSS cannot be used, * don't vote for this clock. */ - if (!IS_ENABLED(CONFIG_CORESIGHT)) { + if (!IS_ENABLED(CONFIG_QCOM_KGSL_QDSS_STM)) { for (i = 0; i < ret; i++) { if (!strcmp(rgmu->clks[i].id, "apb_pclk")) { rgmu->clks[i].clk = NULL; diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c index 945f2a3838e0..2cacf6dfe490 100644 --- a/drivers/gpu/msm/kgsl_iommu.c +++ b/drivers/gpu/msm/kgsl_iommu.c @@ -2511,8 +2511,8 @@ int kgsl_iommu_probe(struct kgsl_device *device) */ kgsl_iommu_map_globals(mmu, mmu->defaultpagetable); kgsl_iommu_map_globals(mmu, mmu->lpac_pagetable); - /* QDSS is supported only when CORESIGHT is enabled */ - if (IS_ENABLED(CONFIG_CORESIGHT)) + /* QDSS is supported only when QCOM_KGSL_QDSS_STM is enabled */ + if (IS_ENABLED(CONFIG_QCOM_KGSL_QDSS_STM)) device->qdss_desc = kgsl_allocate_global_fixed(device, "qcom,gpu-qdss-stm", "gpu-qdss"); diff --git a/drivers/gpu/msm/kgsl_pwrctrl.c b/drivers/gpu/msm/kgsl_pwrctrl.c index 7003d76d933f..2117d69c5e7d 100644 --- a/drivers/gpu/msm/kgsl_pwrctrl.c +++ b/drivers/gpu/msm/kgsl_pwrctrl.c @@ -1427,8 +1427,8 @@ static int _get_clocks(struct kgsl_device *device) for (i = 0; i < KGSL_MAX_CLKS; i++) { if (pwr->grp_clks[i] || strcmp(clocks[i], name)) continue; - /* apb_pclk should only be enabled if CORESIGHT is enabled */ - if (!strcmp(name, "apb_pclk") && !IS_ENABLED(CONFIG_CORESIGHT)) + /* apb_pclk should only be enabled if QCOM_KGSL_QDSS_STM is enabled */ + if (!strcmp(name, "apb_pclk") && !IS_ENABLED(CONFIG_QCOM_KGSL_QDSS_STM)) continue; pwr->grp_clks[i] = devm_clk_get(dev, name);