Loading drivers/media/platform/msm/sde/rotator/sde_rotator_core.c +1 −1 Original line number Diff line number Diff line Loading @@ -2415,7 +2415,7 @@ static int sde_rotator_register_clk(struct platform_device *pdev, static void sde_rotator_unregister_clk(struct sde_rot_mgr *mgr) { kfree(mgr->rot_clk); devm_kfree(mgr->device, mgr->rot_clk); mgr->rot_clk = NULL; mgr->num_rot_clk = 0; } Loading drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c +37 −18 Original line number Diff line number Diff line Loading @@ -214,10 +214,9 @@ static int sde_smmu_attach(struct sde_rot_data_type *mdata) SDEROT_DBG("iommu v2 domain[%i] attached\n", i); } } else { SDEROT_ERR( SDEROT_DBG( "iommu device not attached for domain[%d]\n", i); return -ENODEV; } } return 0; Loading Loading @@ -492,11 +491,13 @@ int sde_smmu_probe(struct platform_device *pdev) mp->num_vreg = 1; } if (mp->vreg_config) { rc = sde_rot_config_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, true); if (rc) { SDEROT_ERR("vreg config failed rc=%d\n", rc); return rc; goto release_vreg; } } rc = sde_smmu_clk_register(pdev, mp); Loading @@ -504,18 +505,16 @@ int sde_smmu_probe(struct platform_device *pdev) SDEROT_ERR( "smmu clk register failed for domain[%d] with err:%d\n", smmu_domain.domain, rc); sde_rot_config_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, false); return rc; goto disable_vreg; } snprintf(name, MAX_CLIENT_NAME_LEN, "smmu:%u", smmu_domain.domain); sde_smmu->reg_bus_clt = sde_reg_bus_vote_client_create(name); if (IS_ERR_OR_NULL(sde_smmu->reg_bus_clt)) { SDEROT_ERR("mdss bus client register failed\n"); sde_rot_config_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, false); return PTR_ERR(sde_smmu->reg_bus_clt); rc = PTR_ERR(sde_smmu->reg_bus_clt); sde_smmu->reg_bus_clt = NULL; goto unregister_clk; } rc = sde_smmu_enable_power(sde_smmu, true); Loading @@ -531,6 +530,7 @@ int sde_smmu_probe(struct platform_device *pdev) SDEROT_ERR("iommu create mapping failed for domain[%d]\n", smmu_domain.domain); rc = PTR_ERR(sde_smmu->mmu_mapping); sde_smmu->mmu_mapping = NULL; goto disable_power; } Loading Loading @@ -558,13 +558,20 @@ int sde_smmu_probe(struct platform_device *pdev) release_mapping: arm_iommu_release_mapping(sde_smmu->mmu_mapping); sde_smmu->mmu_mapping = NULL; disable_power: sde_smmu_enable_power(sde_smmu, false); bus_client_destroy: sde_reg_bus_vote_client_destroy(sde_smmu->reg_bus_clt); sde_smmu->reg_bus_clt = NULL; sde_rot_config_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, false); unregister_clk: disable_vreg: sde_rot_config_vreg(&pdev->dev, sde_smmu->mp.vreg_config, sde_smmu->mp.num_vreg, false); release_vreg: devm_kfree(&pdev->dev, sde_smmu->mp.vreg_config); sde_smmu->mp.vreg_config = NULL; sde_smmu->mp.num_vreg = 0; return rc; } Loading @@ -575,9 +582,21 @@ int sde_smmu_remove(struct platform_device *pdev) for (i = 0; i < SDE_IOMMU_MAX_DOMAIN; i++) { sde_smmu = sde_smmu_get_cb(i); if (sde_smmu && sde_smmu->dev && (sde_smmu->dev == &pdev->dev)) if (!sde_smmu || !sde_smmu->dev || (sde_smmu->dev != &pdev->dev)) continue; sde_smmu->dev = NULL; arm_iommu_release_mapping(sde_smmu->mmu_mapping); sde_smmu->mmu_mapping = NULL; sde_smmu_enable_power(sde_smmu, false); sde_reg_bus_vote_client_destroy(sde_smmu->reg_bus_clt); sde_smmu->reg_bus_clt = NULL; sde_rot_config_vreg(&pdev->dev, sde_smmu->mp.vreg_config, sde_smmu->mp.num_vreg, false); devm_kfree(&pdev->dev, sde_smmu->mp.vreg_config); sde_smmu->mp.vreg_config = NULL; sde_smmu->mp.num_vreg = 0; } return 0; } Loading Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_core.c +1 −1 Original line number Diff line number Diff line Loading @@ -2415,7 +2415,7 @@ static int sde_rotator_register_clk(struct platform_device *pdev, static void sde_rotator_unregister_clk(struct sde_rot_mgr *mgr) { kfree(mgr->rot_clk); devm_kfree(mgr->device, mgr->rot_clk); mgr->rot_clk = NULL; mgr->num_rot_clk = 0; } Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c +37 −18 Original line number Diff line number Diff line Loading @@ -214,10 +214,9 @@ static int sde_smmu_attach(struct sde_rot_data_type *mdata) SDEROT_DBG("iommu v2 domain[%i] attached\n", i); } } else { SDEROT_ERR( SDEROT_DBG( "iommu device not attached for domain[%d]\n", i); return -ENODEV; } } return 0; Loading Loading @@ -492,11 +491,13 @@ int sde_smmu_probe(struct platform_device *pdev) mp->num_vreg = 1; } if (mp->vreg_config) { rc = sde_rot_config_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, true); if (rc) { SDEROT_ERR("vreg config failed rc=%d\n", rc); return rc; goto release_vreg; } } rc = sde_smmu_clk_register(pdev, mp); Loading @@ -504,18 +505,16 @@ int sde_smmu_probe(struct platform_device *pdev) SDEROT_ERR( "smmu clk register failed for domain[%d] with err:%d\n", smmu_domain.domain, rc); sde_rot_config_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, false); return rc; goto disable_vreg; } snprintf(name, MAX_CLIENT_NAME_LEN, "smmu:%u", smmu_domain.domain); sde_smmu->reg_bus_clt = sde_reg_bus_vote_client_create(name); if (IS_ERR_OR_NULL(sde_smmu->reg_bus_clt)) { SDEROT_ERR("mdss bus client register failed\n"); sde_rot_config_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, false); return PTR_ERR(sde_smmu->reg_bus_clt); rc = PTR_ERR(sde_smmu->reg_bus_clt); sde_smmu->reg_bus_clt = NULL; goto unregister_clk; } rc = sde_smmu_enable_power(sde_smmu, true); Loading @@ -531,6 +530,7 @@ int sde_smmu_probe(struct platform_device *pdev) SDEROT_ERR("iommu create mapping failed for domain[%d]\n", smmu_domain.domain); rc = PTR_ERR(sde_smmu->mmu_mapping); sde_smmu->mmu_mapping = NULL; goto disable_power; } Loading Loading @@ -558,13 +558,20 @@ int sde_smmu_probe(struct platform_device *pdev) release_mapping: arm_iommu_release_mapping(sde_smmu->mmu_mapping); sde_smmu->mmu_mapping = NULL; disable_power: sde_smmu_enable_power(sde_smmu, false); bus_client_destroy: sde_reg_bus_vote_client_destroy(sde_smmu->reg_bus_clt); sde_smmu->reg_bus_clt = NULL; sde_rot_config_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, false); unregister_clk: disable_vreg: sde_rot_config_vreg(&pdev->dev, sde_smmu->mp.vreg_config, sde_smmu->mp.num_vreg, false); release_vreg: devm_kfree(&pdev->dev, sde_smmu->mp.vreg_config); sde_smmu->mp.vreg_config = NULL; sde_smmu->mp.num_vreg = 0; return rc; } Loading @@ -575,9 +582,21 @@ int sde_smmu_remove(struct platform_device *pdev) for (i = 0; i < SDE_IOMMU_MAX_DOMAIN; i++) { sde_smmu = sde_smmu_get_cb(i); if (sde_smmu && sde_smmu->dev && (sde_smmu->dev == &pdev->dev)) if (!sde_smmu || !sde_smmu->dev || (sde_smmu->dev != &pdev->dev)) continue; sde_smmu->dev = NULL; arm_iommu_release_mapping(sde_smmu->mmu_mapping); sde_smmu->mmu_mapping = NULL; sde_smmu_enable_power(sde_smmu, false); sde_reg_bus_vote_client_destroy(sde_smmu->reg_bus_clt); sde_smmu->reg_bus_clt = NULL; sde_rot_config_vreg(&pdev->dev, sde_smmu->mp.vreg_config, sde_smmu->mp.num_vreg, false); devm_kfree(&pdev->dev, sde_smmu->mp.vreg_config); sde_smmu->mp.vreg_config = NULL; sde_smmu->mp.num_vreg = 0; } return 0; } Loading