From: Alpha Lin Date: Mon, 18 Jul 2016 12:04:10 +0000 (+0800) Subject: rockchip/vcodec: set HW mode to none when hw quit work X-Git-Tag: firefly_0821_release~2096 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=57bc786045ee222d68192f21ad35c366dda59bbf;p=firefly-linux-kernel-4.4.55.git rockchip/vcodec: set HW mode to none when hw quit work Before this revision, if IOMMU isn't enable, driver don't set the HW running mode to none, it will effect next task to select its required mode properly. Change-Id: Ib4e7f23b2014813226bef994aee10b1be8a06634 Signed-off-by: Alpha Lin --- diff --git a/drivers/video/rockchip/vcodec/vcodec_service.c b/drivers/video/rockchip/vcodec/vcodec_service.c index 2ea76ed5a80f..536ad1e05937 100644 --- a/drivers/video/rockchip/vcodec/vcodec_service.c +++ b/drivers/video/rockchip/vcodec/vcodec_service.c @@ -550,8 +550,13 @@ static void vcodec_exit_mode(struct vpu_subdev_data *data) if (data->mmu_dev && test_bit(MMU_ACTIVATED, &data->state)) { clear_bit(MMU_ACTIVATED, &data->state); rockchip_iovmm_deactivate(data->dev); - data->pservice->curr_mode = VCODEC_RUNNING_MODE_NONE; } + /* + * In case of VPU Combo, it require HW switch its running mode + * before the other HW component start work. set current HW running + * mode to none, can ensure HW switch to its reqired mode properly. + */ + data->pservice->curr_mode = VCODEC_RUNNING_MODE_NONE; } static int vpu_get_clk(struct vpu_service_info *pservice)