#include <linux/mfd/syscon.h>
#include <linux/uaccess.h>
#include <linux/debugfs.h>
+#include <linux/pm_runtime.h>
#include <linux/rockchip/cpu.h>
#include <linux/rockchip/cru.h>
if (pservice->clk_cabac)
clk_disable_unprepare(pservice->clk_cabac);
#endif
+ pm_runtime_put(pservice->dev);
atomic_add(1, &pservice->power_off_cnt);
wake_unlock(&pservice->wake_lock);
if (pservice->pd_video)
clk_prepare_enable(pservice->pd_video);
#endif
+ pm_runtime_get_sync(pservice->dev);
udelay(5);
atomic_add(1, &pservice->power_on_cnt);
clear_bit(MMU_ACTIVATED, &data->state);
vcodec_enter_mode(data);
+
+ vpu_service_power_on(pservice);
ret = vpu_service_check_hw(data);
if (ret < 0) {
vpu_err("error: hw info check faild\n");
if (0 > vpu_get_clk(pservice))
goto err;
- vpu_service_power_on(pservice);
-
if (of_property_read_bool(np, "reg")) {
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
pservice->reg_base = 0;
}
+ pm_runtime_enable(dev);
+
if (of_property_read_bool(np, "subcnt")) {
for (i = 0; i < pservice->subcnt; i++) {
struct device_node *sub_np;
struct vpu_subdev_data *data = platform_get_drvdata(pdev);
vcodec_subdev_remove(data);
+
+ pm_runtime_disable(data->pservice->dev);
+
return 0;
}