From 2a9e6a67a2bbae116239eec2454ceee7d78ecb93 Mon Sep 17 00:00:00 2001 From: Alpha Lin Date: Wed, 15 Jul 2015 14:49:51 +0800 Subject: [PATCH] VPU: pmu idle request before cru operation. pmu idle request before cru operation to ensure the hardware don't be reset during runing. without this hardware maybe hang up for bus access failure. Signed-off-by: Alpha Lin --- arch/arm/mach-rockchip/vcodec_service.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-rockchip/vcodec_service.c b/arch/arm/mach-rockchip/vcodec_service.c index 09e591e74b53..cb260d89d414 100755 --- a/arch/arm/mach-rockchip/vcodec_service.c +++ b/arch/arm/mach-rockchip/vcodec_service.c @@ -779,6 +779,11 @@ static void vpu_put_clk(struct vpu_service_info *pservice) static void vpu_reset(struct vpu_subdev_data *data) { struct vpu_service_info *pservice = data->pservice; + enum pmu_idle_req type = IDLE_REQ_VIDEO; + + if (pservice->dev_id == VCODEC_DEVICE_ID_HEVC) + type = IDLE_REQ_HEVC; + pr_info("%s: resetting...", dev_name(pservice->dev)); #if defined(CONFIG_ARCH_RK29) @@ -817,6 +822,9 @@ static void vpu_reset(struct vpu_subdev_data *data) pr_info("for 3288/3368..."); #ifdef CONFIG_RESET_CONTROLLER if (pservice->rst_a && pservice->rst_h) { + if (rockchip_pmu_ops.set_idle_request) + rockchip_pmu_ops.set_idle_request(type, true); + pr_info("reset in\n"); if (pservice->rst_v) reset_control_assert(pservice->rst_v); reset_control_assert(pservice->rst_a); @@ -826,6 +834,8 @@ static void vpu_reset(struct vpu_subdev_data *data) reset_control_deassert(pservice->rst_a); if (pservice->rst_v) reset_control_deassert(pservice->rst_v); + if (rockchip_pmu_ops.set_idle_request) + rockchip_pmu_ops.set_idle_request(type, false); } #endif -- 2.34.1