Loading drivers/video/msm/mdss/mdss_smmu.c +0 −6 Original line number Diff line number Diff line Loading @@ -172,7 +172,6 @@ static int mdss_smmu_attach_v2(struct mdss_data_type *mdata) struct mdss_smmu_client *mdss_smmu; int i, rc = 0; mutex_lock(&mdp_iommu_lock); for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) { if (!mdss_smmu_is_valid_domain_type(mdata, i)) continue; Loading Loading @@ -204,11 +203,9 @@ static int mdss_smmu_attach_v2(struct mdss_data_type *mdata) } } else { pr_err("iommu device not attached for domain[%d]\n", i); mutex_unlock(&mdp_iommu_lock); return -ENODEV; } } mutex_unlock(&mdp_iommu_lock); return 0; Loading @@ -221,7 +218,6 @@ err: mdss_smmu->domain_attached = false; } } mutex_unlock(&mdp_iommu_lock); return rc; } Loading @@ -237,7 +233,6 @@ static int mdss_smmu_detach_v2(struct mdss_data_type *mdata) struct mdss_smmu_client *mdss_smmu; int i; mutex_lock(&mdp_iommu_lock); for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) { if (!mdss_smmu_is_valid_domain_type(mdata, i)) continue; Loading @@ -246,7 +241,6 @@ static int mdss_smmu_detach_v2(struct mdss_data_type *mdata) if (mdss_smmu && mdss_smmu->dev && !mdss_smmu->handoff_pending) mdss_smmu_enable_power(mdss_smmu, false); } mutex_unlock(&mdp_iommu_lock); return 0; } Loading drivers/video/msm/mdss/mdss_smmu.h +21 −6 Original line number Diff line number Diff line Loading @@ -119,18 +119,26 @@ static inline int mdss_smmu_attach(struct mdss_data_type *mdata) { int rc; mdata->mdss_util->iommu_lock(); MDSS_XLOG(mdata->iommu_attached); if (mdata->iommu_attached) { pr_debug("mdp iommu already attached\n"); return 0; rc = 0; goto end; } if (!mdata->smmu_ops.smmu_attach) return -ENOSYS; if (!mdata->smmu_ops.smmu_attach) { rc = -ENOSYS; goto end; } rc = mdata->smmu_ops.smmu_attach(mdata); if (!rc) mdata->iommu_attached = true; end: mdata->mdss_util->iommu_unlock(); return rc; } Loading @@ -138,19 +146,26 @@ static inline int mdss_smmu_detach(struct mdss_data_type *mdata) { int rc; mdata->mdss_util->iommu_lock(); MDSS_XLOG(mdata->iommu_attached); if (!mdata->iommu_attached) { pr_debug("mdp iommu already dettached\n"); return 0; rc = 0; goto end; } if (!mdata->smmu_ops.smmu_detach) return -ENOSYS; if (!mdata->smmu_ops.smmu_detach) { rc = -ENOSYS; goto end; } rc = mdata->smmu_ops.smmu_detach(mdata); if (!rc) mdata->iommu_attached = false; end: mdata->mdss_util->iommu_unlock(); return rc; } Loading Loading
drivers/video/msm/mdss/mdss_smmu.c +0 −6 Original line number Diff line number Diff line Loading @@ -172,7 +172,6 @@ static int mdss_smmu_attach_v2(struct mdss_data_type *mdata) struct mdss_smmu_client *mdss_smmu; int i, rc = 0; mutex_lock(&mdp_iommu_lock); for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) { if (!mdss_smmu_is_valid_domain_type(mdata, i)) continue; Loading Loading @@ -204,11 +203,9 @@ static int mdss_smmu_attach_v2(struct mdss_data_type *mdata) } } else { pr_err("iommu device not attached for domain[%d]\n", i); mutex_unlock(&mdp_iommu_lock); return -ENODEV; } } mutex_unlock(&mdp_iommu_lock); return 0; Loading @@ -221,7 +218,6 @@ err: mdss_smmu->domain_attached = false; } } mutex_unlock(&mdp_iommu_lock); return rc; } Loading @@ -237,7 +233,6 @@ static int mdss_smmu_detach_v2(struct mdss_data_type *mdata) struct mdss_smmu_client *mdss_smmu; int i; mutex_lock(&mdp_iommu_lock); for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) { if (!mdss_smmu_is_valid_domain_type(mdata, i)) continue; Loading @@ -246,7 +241,6 @@ static int mdss_smmu_detach_v2(struct mdss_data_type *mdata) if (mdss_smmu && mdss_smmu->dev && !mdss_smmu->handoff_pending) mdss_smmu_enable_power(mdss_smmu, false); } mutex_unlock(&mdp_iommu_lock); return 0; } Loading
drivers/video/msm/mdss/mdss_smmu.h +21 −6 Original line number Diff line number Diff line Loading @@ -119,18 +119,26 @@ static inline int mdss_smmu_attach(struct mdss_data_type *mdata) { int rc; mdata->mdss_util->iommu_lock(); MDSS_XLOG(mdata->iommu_attached); if (mdata->iommu_attached) { pr_debug("mdp iommu already attached\n"); return 0; rc = 0; goto end; } if (!mdata->smmu_ops.smmu_attach) return -ENOSYS; if (!mdata->smmu_ops.smmu_attach) { rc = -ENOSYS; goto end; } rc = mdata->smmu_ops.smmu_attach(mdata); if (!rc) mdata->iommu_attached = true; end: mdata->mdss_util->iommu_unlock(); return rc; } Loading @@ -138,19 +146,26 @@ static inline int mdss_smmu_detach(struct mdss_data_type *mdata) { int rc; mdata->mdss_util->iommu_lock(); MDSS_XLOG(mdata->iommu_attached); if (!mdata->iommu_attached) { pr_debug("mdp iommu already dettached\n"); return 0; rc = 0; goto end; } if (!mdata->smmu_ops.smmu_detach) return -ENOSYS; if (!mdata->smmu_ops.smmu_detach) { rc = -ENOSYS; goto end; } rc = mdata->smmu_ops.smmu_detach(mdata); if (!rc) mdata->iommu_attached = false; end: mdata->mdss_util->iommu_unlock(); return rc; } Loading