Merge "msm: mdss: Set default fps for dedicated WB"

This commit is contained in:
Linux Build Service Account 2017-01-05 02:08:50 -08:00 committed by Gerrit - the friendly Code Review server
commit a5d7c799af
3 changed files with 24 additions and 13 deletions

View file

@ -703,6 +703,7 @@ int mdss_mdp_get_panel_params(struct mdss_mdp_pipe *pipe,
*v_total = mixer->height; *v_total = mixer->height;
*xres = mixer->width; *xres = mixer->width;
*h_total = mixer->width; *h_total = mixer->width;
*fps = DEFAULT_FRAME_RATE;
} }
return 0; return 0;
@ -714,7 +715,8 @@ int mdss_mdp_get_pipe_overlap_bw(struct mdss_mdp_pipe *pipe,
struct mdss_data_type *mdata = mdss_mdp_get_mdata(); struct mdss_data_type *mdata = mdss_mdp_get_mdata();
struct mdss_mdp_mixer *mixer = pipe->mixer_left; struct mdss_mdp_mixer *mixer = pipe->mixer_left;
struct mdss_rect src, dst; struct mdss_rect src, dst;
u32 v_total, fps, h_total, xres, src_h; u32 v_total = 0, h_total = 0, xres = 0, src_h = 0;
u32 fps = DEFAULT_FRAME_RATE;
*quota = 0; *quota = 0;
*quota_nocr = 0; *quota_nocr = 0;

View file

@ -177,7 +177,6 @@ static int mdss_smmu_attach_v2(struct mdss_data_type *mdata)
struct mdss_smmu_client *mdss_smmu; struct mdss_smmu_client *mdss_smmu;
int i, rc = 0; int i, rc = 0;
mutex_lock(&mdp_iommu_lock);
for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) { for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) {
if (!mdss_smmu_is_valid_domain_type(mdata, i)) if (!mdss_smmu_is_valid_domain_type(mdata, i))
continue; continue;
@ -211,11 +210,9 @@ static int mdss_smmu_attach_v2(struct mdss_data_type *mdata)
} }
} else { } else {
pr_err("iommu device not attached for domain[%d]\n", i); pr_err("iommu device not attached for domain[%d]\n", i);
mutex_unlock(&mdp_iommu_lock);
return -ENODEV; return -ENODEV;
} }
} }
mutex_unlock(&mdp_iommu_lock);
return 0; return 0;
@ -228,7 +225,6 @@ err:
mdss_smmu->domain_attached = false; mdss_smmu->domain_attached = false;
} }
} }
mutex_unlock(&mdp_iommu_lock);
return rc; return rc;
} }
@ -245,7 +241,6 @@ static int mdss_smmu_detach_v2(struct mdss_data_type *mdata)
struct mdss_smmu_client *mdss_smmu; struct mdss_smmu_client *mdss_smmu;
int i; int i;
mutex_lock(&mdp_iommu_lock);
for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) { for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) {
if (!mdss_smmu_is_valid_domain_type(mdata, i)) if (!mdss_smmu_is_valid_domain_type(mdata, i))
continue; continue;
@ -270,7 +265,6 @@ static int mdss_smmu_detach_v2(struct mdss_data_type *mdata)
} }
} }
} }
mutex_unlock(&mdp_iommu_lock);
return 0; return 0;
} }

View file

@ -150,18 +150,26 @@ static inline int mdss_smmu_attach(struct mdss_data_type *mdata)
{ {
int rc; int rc;
mdata->mdss_util->iommu_lock();
MDSS_XLOG(mdata->iommu_attached); MDSS_XLOG(mdata->iommu_attached);
if (mdata->iommu_attached) { if (mdata->iommu_attached) {
pr_debug("mdp iommu already attached\n"); pr_debug("mdp iommu already attached\n");
return 0; rc = 0;
goto end;
} }
if (!mdata->smmu_ops.smmu_attach) if (!mdata->smmu_ops.smmu_attach) {
return -ENOSYS; rc = -ENODEV;
goto end;
}
rc = mdata->smmu_ops.smmu_attach(mdata); rc = mdata->smmu_ops.smmu_attach(mdata);
if (!rc) if (!rc)
mdata->iommu_attached = true; mdata->iommu_attached = true;
end:
mdata->mdss_util->iommu_unlock();
return rc; return rc;
} }
@ -169,19 +177,26 @@ static inline int mdss_smmu_detach(struct mdss_data_type *mdata)
{ {
int rc; int rc;
mdata->mdss_util->iommu_lock();
MDSS_XLOG(mdata->iommu_attached); MDSS_XLOG(mdata->iommu_attached);
if (!mdata->iommu_attached) { if (!mdata->iommu_attached) {
pr_debug("mdp iommu already dettached\n"); pr_debug("mdp iommu already dettached\n");
return 0; rc = 0;
goto end;
} }
if (!mdata->smmu_ops.smmu_detach) if (!mdata->smmu_ops.smmu_detach) {
return -ENOSYS; rc = -ENODEV;
goto end;
}
rc = mdata->smmu_ops.smmu_detach(mdata); rc = mdata->smmu_ops.smmu_detach(mdata);
if (!rc) if (!rc)
mdata->iommu_attached = false; mdata->iommu_attached = false;
end:
mdata->mdss_util->iommu_unlock();
return rc; return rc;
} }