From 5100fbc87c2c004b7f8138fd8498140e78b44190 Mon Sep 17 00:00:00 2001 From: Wayne Zou Date: Fri, 13 Apr 2012 08:16:05 +0800 Subject: [PATCH] ENGR00179513-1 VDOA: update software state before start vdoa Fix a bug when vdoa interrupt happens before software state updated. Signed-off-by: Wayne Zou --- drivers/mxc/ipu3/vdoa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mxc/ipu3/vdoa.c b/drivers/mxc/ipu3/vdoa.c index 1a5266d7d7a8..2d3aaef16622 100644 --- a/drivers/mxc/ipu3/vdoa.c +++ b/drivers/mxc/ipu3/vdoa.c @@ -308,6 +308,7 @@ int vdoa_start(vdoa_handle_t handle, int timeout_ms) CHECK_NULL_PTR(vdoa); CHECK_STATE(VDOA_GET_OBUF, return -EINVAL); + vdoa->state = VDOA_START; init_completion(&vdoa->comp); vdoa_write_register(vdoa, VDOAIST, VDOAIEIST_TRANSFER_ERR | VDOAIEIST_TRANSFER_END); @@ -318,7 +319,6 @@ int vdoa_start(vdoa_handle_t handle, int timeout_ms) vdoa_write_register(vdoa, VDOASRR, VDOASRR_START_XFER); dump_registers(vdoa); - vdoa->state = VDOA_START; ret = wait_for_completion_timeout(&vdoa->comp, msecs_to_jiffies(timeout_ms)); -- 2.39.5