]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00274493 mx6sl: csi/v4l: Fix capture incorrect data with format UYVY
authorRobby Cai <R63905@freescale.com>
Thu, 8 Aug 2013 09:45:17 +0000 (17:45 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:14:17 +0000 (14:14 +0200)
There's an interim buffer which should only be used when PxP CSC is used.
Otherwise the video buffer gets incorrect data by copying the content of
interim buffer. The patch fixes this by moving the memcpy to the right place.

Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 8e0b8ff485dd7cdeabc653f1e27c271ac923710e)

drivers/media/video/mxc/capture/csi_v4l2_capture.c

index 045a3885a7e5e082db38140ca27896cbacb4d5b4..adc77d3b64a1cf6f8bc560c03e137f6aa57ed1a0 100644 (file)
@@ -1065,11 +1065,11 @@ static int csi_v4l_dqueue(cam_data *cam, struct v4l2_buffer *buf)
                        return retval;
                }
                pxp_complete_update(cam);
+               memcpy(cam->frame[buf->index].vaddress,
+                       cam->frame[req_buf_number].vaddress,
+                       cam->v2f.fmt.pix.sizeimage);
        }
        up(&cam->busy_lock);
-       memcpy(cam->frame[buf->index].vaddress,
-               cam->frame[req_buf_number].vaddress,
-               cam->v2f.fmt.pix.sizeimage);
 
        return retval;
 }