From 50ae563cd85b6e2dcdfdd0726e79ce3c5b0ce5a3 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Mon, 30 Mar 2020 12:24:00 -0600 Subject: [PATCH 1/2] msm: kgsl: Set the I/O coherent feature earlier Some of the KGSL core code needs to make a decision about I/O coherency so set the MMU property earlier to prevent an unneeded warning. Change-Id: Ic0dedbadf9e4665b3e20460cb6f2ca81d74847e0 Signed-off-by: Jordan Crouse --- drivers/gpu/msm/adreno.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c index f3d6b6ccdb9b..d1fb8d4772de 100644 --- a/drivers/gpu/msm/adreno.c +++ b/drivers/gpu/msm/adreno.c @@ -1418,6 +1418,9 @@ static int adreno_bind(struct device *dev) if (adreno_is_a6xx(adreno_dev)) kgsl_mmu_set_feature(device, KGSL_MMU_SMMU_APERTURE); + if (ADRENO_FEATURE(adreno_dev, ADRENO_IOCOHERENT)) + kgsl_mmu_set_feature(device, KGSL_MMU_IO_COHERENT); + device->pwrctrl.bus_width = adreno_dev->gpucore->bus_width; device->mmu.secured = (IS_ENABLED(CONFIG_QCOM_SECURE_BUFFER) && @@ -1449,9 +1452,6 @@ static int adreno_bind(struct device *dev) adreno_isense_probe(device); - if (ADRENO_FEATURE(adreno_dev, ADRENO_IOCOHERENT)) - kgsl_mmu_set_feature(device, KGSL_MMU_IO_COHERENT); - /* Allocate the memstore for storing timestamps and other useful info */ if (ADRENO_FEATURE(adreno_dev, ADRENO_APRIV)) From 0da17b7033375d509e79a9a72c268bae87fbdaf4 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Thu, 2 Apr 2020 11:47:17 -0600 Subject: [PATCH 2/2] msm: kgsl: Check the return value of regulator_enable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following compiler error: drivers/gpu/msm/kgsl_iommu.c:845:3: error: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result Fixes: 1c6fcc54eca9 ("msm: kgsl: Enable the CX GSDC before accessing IOMMU registers") Change-Id: Ic0dedbad7d68d3dfb2344525d79d9d563e28d6d6 Signed-off-by: Jordan Crouse --- drivers/gpu/msm/kgsl_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c index 2b19b6632b23..e2f0855b8a2a 100644 --- a/drivers/gpu/msm/kgsl_iommu.c +++ b/drivers/gpu/msm/kgsl_iommu.c @@ -842,7 +842,7 @@ static void kgsl_iommu_enable_clk(struct kgsl_mmu *mmu) struct kgsl_iommu *iommu = _IOMMU_PRIV(mmu); if (!IS_ERR_OR_NULL(iommu->cx_gdsc)) - regulator_enable(iommu->cx_gdsc); + WARN_ON(regulator_enable(iommu->cx_gdsc)); for (j = 0; j < KGSL_IOMMU_MAX_CLKS; j++) { if (iommu->clks[j])