mdss: mdp: fix smmu power rail handoff configuration

mdss smmu driver turns on the power rail during probe
and leave it on for continuous splash screen scenario.
It avoids extra refcount during attach for this scenario
by relaying on MDP handoff status. However, MDP handoff
status is updated before context banks are attached for
video mode panel. This adds extra refcount to power rails
and leave them on always. This fix moves the power rail
handoff to smmu structure instead of relying on MDP
status.

Change-Id: Ifc98c0e3812c7b78224f0167886dcb49dba3b267
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
Dhaval Patel 2015-06-08 17:22:24 -07:00 committed by David Keitel
parent 41521b0bd6
commit ed2f52f863
2 changed files with 5 additions and 1 deletions

View file

@ -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;

View file

@ -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",