]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00179513-1 VDOA: update software state before start vdoa
authorWayne Zou <b36644@freescale.com>
Fri, 13 Apr 2012 00:16:05 +0000 (08:16 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:26 +0000 (08:34 +0200)
Fix a bug when vdoa interrupt happens
before software state updated.

Signed-off-by: Wayne Zou <b36644@freescale.com>
drivers/mxc/ipu3/vdoa.c

index 1a5266d7d7a8212c641379e2858d7ae0bb4bfcd6..2d3aaef166227be234bf59d20dc384cfe480b9e1 100644 (file)
@@ -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));