Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ab148db authored by Nirmal Abraham's avatar Nirmal Abraham Committed by Gerrit - the friendly Code Review server
Browse files

fbdev: msm: remove mappings before iommu detach



The smmu device mappings should be removed before
calling iommu_detach_device.

Change-Id: I514c3241cc5659ec69611fe9998437152fbd69b5
Signed-off-by: default avatarNirmal Abraham <nabrah@codeaurora.org>
parent 32735954
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -370,6 +370,7 @@ static int mdss_smmu_attach_v2(struct mdss_data_type *mdata)
	for (i--; i >= 0; i--) {
		mdss_smmu = mdss_smmu_get_cb(i);
		if (mdss_smmu && mdss_smmu->base.dev) {
			msm_dma_unmap_all_for_dev(mdss_smmu->base.dev);
			iommu_detach_device(mdss_smmu->domain,
						mdss_smmu->base.dev);
			mdss_smmu_enable_power(mdss_smmu, false);
@@ -402,6 +403,8 @@ static int mdss_smmu_detach_v2(struct mdss_data_type *mdata)
				mdss_smmu->domain_attached &&
				mdss_smmu_is_valid_domain_condition(mdata,
					i, false)) {
				MDSS_XLOG(0x100);
				msm_dma_unmap_all_for_dev(mdss_smmu->base.dev);
				/*
				 * if entering in secure display or
				 * secure camera use case(for secured contexts