summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Kushwaha <quic_amitkush@quicinc.com>2023-01-31 15:24:42 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2023-02-25 20:01:14 -0800
commit23fb0f089b60ff8564f7aff5cf5285e4c265769d (patch)
treea6b131ae6e079f0d514aa5e682b9f5f4e2d3494d
parenta631d6f2b4419c58a40c5fa2665220c198559a81 (diff)
downloadgraphics-23fb0f089b60ff8564f7aff5cf5285e4c265769d.tar.gz
msm: kgsl: Add deep sleep config for ZAP unload
Use CONFIG_DEEPSLEEP to unload ZAP shader and passed context info during SMMU aperture set. Change-Id: I455c01822e5bc657689784f5dfcf3077ae6363ac Signed-off-by: Amit Kushwaha <quic_amitkush@quicinc.com> Signed-off-by: Abhishek Barman <quic_abarman@quicinc.com>
-rw-r--r--adreno.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/adreno.c b/adreno.c
index ace12d7..20c8afd 100644
--- a/adreno.c
+++ b/adreno.c
@@ -117,7 +117,7 @@ int adreno_zap_shader_load(struct adreno_device *adreno_dev,
return ret;
}
-#if IS_ENABLED(CONFIG_QCOM_KGSL_HIBERNATION)
+#if (IS_ENABLED(CONFIG_QCOM_KGSL_HIBERNATION) || IS_ENABLED(CONFIG_DEEPSLEEP))
static void adreno_zap_shader_unload(struct adreno_device *adreno_dev)
{
struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
@@ -1491,7 +1491,8 @@ static int adreno_pm_resume(struct device *dev)
#if IS_ENABLED(CONFIG_DEEPSLEEP)
if (pm_suspend_via_firmware()) {
- int status = kgsl_set_smmu_aperture(device);
+ struct kgsl_iommu *iommu = &device->mmu.iommu;
+ int status = kgsl_set_smmu_aperture(device, &iommu->user_context);
if (status)
return status;