Loading msm/vidc/hfi_common.c +34 −0 Original line number Diff line number Diff line Loading @@ -3790,7 +3790,16 @@ void __disable_unprepare_clks(struct venus_hfi_device *device) "Failed set flag NORETAIN_MEM %s\n", cl->name); } if (!__clk_is_enabled(cl->clk)) dprintk(VIDC_ERR, "%s: clock %s already disabled\n", __func__, cl->name); clk_disable_unprepare(cl->clk); if (__clk_is_enabled(cl->clk)) dprintk(VIDC_ERR, "%s: clock %s not disabled\n", __func__, cl->name); } } Loading Loading @@ -3860,6 +3869,11 @@ static inline int __prepare_enable_clks(struct venus_hfi_device *device) "Failed set flag RETAIN_MEM %s\n", cl->name); } if (__clk_is_enabled(cl->clk)) dprintk(VIDC_ERR, "%s: clock %s already enabled\n", __func__, cl->name); rc = clk_prepare_enable(cl->clk); if (rc) { dprintk(VIDC_ERR, "Failed to enable clocks\n"); Loading @@ -3867,6 +3881,10 @@ static inline int __prepare_enable_clks(struct venus_hfi_device *device) goto fail_clk_enable; } if (!__clk_is_enabled(cl->clk)) dprintk(VIDC_ERR, "%s: clock %s not enabled\n", __func__, cl->name); c++; dprintk(VIDC_HIGH, "Clock: %s prepared and enabled\n", cl->name); Loading Loading @@ -4184,6 +4202,10 @@ static int __disable_regulator(struct regulator_info *rinfo, goto disable_regulator_failed; } if (!regulator_is_enabled(rinfo->regulator)) dprintk(VIDC_ERR, "%s: regulator %s already disabled\n", __func__, rinfo->name); rc = regulator_disable(rinfo->regulator); if (rc) { dprintk(VIDC_ERR, Loading @@ -4192,6 +4214,10 @@ static int __disable_regulator(struct regulator_info *rinfo, goto disable_regulator_failed; } if (regulator_is_enabled(rinfo->regulator)) dprintk(VIDC_ERR, "%s: regulator %s not disabled\n", __func__, rinfo->name); return 0; disable_regulator_failed: Loading Loading @@ -4220,6 +4246,10 @@ static int __enable_regulators(struct venus_hfi_device *device) dprintk(VIDC_HIGH, "Enabling regulators\n"); venus_hfi_for_each_regulator(device, rinfo) { if (regulator_is_enabled(rinfo->regulator)) dprintk(VIDC_ERR, "%s: regulator %s already enabled\n", __func__, rinfo->name); rc = regulator_enable(rinfo->regulator); if (rc) { dprintk(VIDC_ERR, Loading @@ -4228,6 +4258,10 @@ static int __enable_regulators(struct venus_hfi_device *device) goto err_reg_enable_failed; } if (!regulator_is_enabled(rinfo->regulator)) dprintk(VIDC_ERR, "%s: regulator %s not enabled\n", __func__, rinfo->name); dprintk(VIDC_HIGH, "Enabled regulator %s\n", rinfo->name); c++; Loading msm/vidc/hfi_common.h +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #include <linux/platform_device.h> #include <linux/pm_qos.h> #include <linux/spinlock.h> #include <linux/clk-provider.h> #include "vidc_hfi_api.h" #include "vidc_hfi_helper.h" #include "vidc_hfi_api.h" Loading Loading
msm/vidc/hfi_common.c +34 −0 Original line number Diff line number Diff line Loading @@ -3790,7 +3790,16 @@ void __disable_unprepare_clks(struct venus_hfi_device *device) "Failed set flag NORETAIN_MEM %s\n", cl->name); } if (!__clk_is_enabled(cl->clk)) dprintk(VIDC_ERR, "%s: clock %s already disabled\n", __func__, cl->name); clk_disable_unprepare(cl->clk); if (__clk_is_enabled(cl->clk)) dprintk(VIDC_ERR, "%s: clock %s not disabled\n", __func__, cl->name); } } Loading Loading @@ -3860,6 +3869,11 @@ static inline int __prepare_enable_clks(struct venus_hfi_device *device) "Failed set flag RETAIN_MEM %s\n", cl->name); } if (__clk_is_enabled(cl->clk)) dprintk(VIDC_ERR, "%s: clock %s already enabled\n", __func__, cl->name); rc = clk_prepare_enable(cl->clk); if (rc) { dprintk(VIDC_ERR, "Failed to enable clocks\n"); Loading @@ -3867,6 +3881,10 @@ static inline int __prepare_enable_clks(struct venus_hfi_device *device) goto fail_clk_enable; } if (!__clk_is_enabled(cl->clk)) dprintk(VIDC_ERR, "%s: clock %s not enabled\n", __func__, cl->name); c++; dprintk(VIDC_HIGH, "Clock: %s prepared and enabled\n", cl->name); Loading Loading @@ -4184,6 +4202,10 @@ static int __disable_regulator(struct regulator_info *rinfo, goto disable_regulator_failed; } if (!regulator_is_enabled(rinfo->regulator)) dprintk(VIDC_ERR, "%s: regulator %s already disabled\n", __func__, rinfo->name); rc = regulator_disable(rinfo->regulator); if (rc) { dprintk(VIDC_ERR, Loading @@ -4192,6 +4214,10 @@ static int __disable_regulator(struct regulator_info *rinfo, goto disable_regulator_failed; } if (regulator_is_enabled(rinfo->regulator)) dprintk(VIDC_ERR, "%s: regulator %s not disabled\n", __func__, rinfo->name); return 0; disable_regulator_failed: Loading Loading @@ -4220,6 +4246,10 @@ static int __enable_regulators(struct venus_hfi_device *device) dprintk(VIDC_HIGH, "Enabling regulators\n"); venus_hfi_for_each_regulator(device, rinfo) { if (regulator_is_enabled(rinfo->regulator)) dprintk(VIDC_ERR, "%s: regulator %s already enabled\n", __func__, rinfo->name); rc = regulator_enable(rinfo->regulator); if (rc) { dprintk(VIDC_ERR, Loading @@ -4228,6 +4258,10 @@ static int __enable_regulators(struct venus_hfi_device *device) goto err_reg_enable_failed; } if (!regulator_is_enabled(rinfo->regulator)) dprintk(VIDC_ERR, "%s: regulator %s not enabled\n", __func__, rinfo->name); dprintk(VIDC_HIGH, "Enabled regulator %s\n", rinfo->name); c++; Loading
msm/vidc/hfi_common.h +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #include <linux/platform_device.h> #include <linux/pm_qos.h> #include <linux/spinlock.h> #include <linux/clk-provider.h> #include "vidc_hfi_api.h" #include "vidc_hfi_helper.h" #include "vidc_hfi_api.h" Loading