aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/mx2_camera.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index e635ab3c71e7..04aab0c538aa 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -258,6 +258,7 @@ struct mx2_camera_dev {
258 dma_addr_t discard_buffer_dma; 258 dma_addr_t discard_buffer_dma;
259 size_t discard_size; 259 size_t discard_size;
260 struct mx2_fmt_cfg *emma_prp; 260 struct mx2_fmt_cfg *emma_prp;
261 u32 frame_count;
261}; 262};
262 263
263/* buffer for one video frame */ 264/* buffer for one video frame */
@@ -371,6 +372,7 @@ static int mx2_camera_add_device(struct soc_camera_device *icd)
371 writel(pcdev->csicr1, pcdev->base_csi + CSICR1); 372 writel(pcdev->csicr1, pcdev->base_csi + CSICR1);
372 373
373 pcdev->icd = icd; 374 pcdev->icd = icd;
375 pcdev->frame_count = 0;
374 376
375 dev_info(icd->parent, "Camera driver attached to camera %d\n", 377 dev_info(icd->parent, "Camera driver attached to camera %d\n",
376 icd->devnum); 378 icd->devnum);
@@ -1374,7 +1376,8 @@ static void mx27_camera_frame_done_emma(struct mx2_camera_dev *pcdev,
1374 list_del(&vb->queue); 1376 list_del(&vb->queue);
1375 vb->state = state; 1377 vb->state = state;
1376 do_gettimeofday(&vb->ts); 1378 do_gettimeofday(&vb->ts);
1377 vb->field_count++; 1379 vb->field_count = pcdev->frame_count * 2;
1380 pcdev->frame_count++;
1378 1381
1379 wake_up(&vb->done); 1382 wake_up(&vb->done);
1380 } 1383 }