diff --git a/drivers/video/fbdev/msm/mdss.h b/drivers/video/fbdev/msm/mdss.h index fbaa083ba06b..975018ad5965 100644 --- a/drivers/video/fbdev/msm/mdss.h +++ b/drivers/video/fbdev/msm/mdss.h @@ -181,6 +181,7 @@ struct mdss_smmu_client { struct dma_iommu_mapping *mmu_mapping; struct dss_module_power mp; bool domain_attached; + bool handoff_pending; }; struct mdss_data_type; diff --git a/drivers/video/fbdev/msm/mdss_smmu.c b/drivers/video/fbdev/msm/mdss_smmu.c index 6f2d34aff5cb..51afa03c8bbf 100644 --- a/drivers/video/fbdev/msm/mdss_smmu.c +++ b/drivers/video/fbdev/msm/mdss_smmu.c @@ -152,7 +152,7 @@ static int mdss_smmu_attach_v2(struct mdss_data_type *mdata) mdss_smmu = mdss_smmu_get_cb(i); if (mdss_smmu->dev) { mp = &mdss_smmu->mp; - if (!mdata->handoff_pending) { + if (!mdss_smmu->handoff_pending) { rc = mdss_smmu_enable_power(mp, true); if (rc) { pr_err("power enable failed - domain:[%d] rc:%d\n", @@ -160,6 +160,7 @@ static int mdss_smmu_attach_v2(struct mdss_data_type *mdata) goto err; } } + mdss_smmu->handoff_pending = false; if (!mdss_smmu->domain_attached) { rc = arm_iommu_attach_device(mdss_smmu->dev, @@ -598,6 +599,8 @@ int mdss_smmu_probe(struct platform_device *pdev) if (!mdata->handoff_pending) mdss_smmu_enable_power(mp, false); + else + mdss_smmu->handoff_pending = true; mdss_smmu->dev = dev; pr_info("iommu v2 domain[%d] mapping and clk register successful!\n",