summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-01-02 22:15:07 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 11:12:30 -0300
commit2a6dc96b973c8d1defd39bf21e89e6907b1c72f1 (patch)
tree4fa432d3ca328c314c0211cd8975ebd0e1b81717 /drivers/media
parentc60e153d3407b5a94b72ebfcf274fae98979eed9 (diff)
downloadop-kernel-dev-2a6dc96b973c8d1defd39bf21e89e6907b1c72f1.zip
op-kernel-dev-2a6dc96b973c8d1defd39bf21e89e6907b1c72f1.tar.gz
[media] omap3isp: video: Set the buffer bytesused field at completion time
The v4l buffer bytesused field is a value that will be returned to userspace when the buffer gets dequeued. As such it doesn't need to be set early at buffer queue time. Move the assignment to buffer completion in the omap3isp_video_buffer_next() function to prepare for the video buffers queue refactoring. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/omap3isp/ispvideo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c
index 85b4036..e0f594f3 100644
--- a/drivers/media/platform/omap3isp/ispvideo.c
+++ b/drivers/media/platform/omap3isp/ispvideo.c
@@ -431,7 +431,6 @@ static int isp_video_buffer_prepare(struct isp_video_buffer *buf)
return -EINVAL;
}
- buf->vbuf.bytesused = vfh->format.fmt.pix.sizeimage;
buffer->isp_addr = addr;
return 0;
}
@@ -514,6 +513,8 @@ struct isp_buffer *omap3isp_video_buffer_next(struct isp_video *video)
{
struct isp_pipeline *pipe = to_isp_pipeline(&video->video.entity);
struct isp_video_queue *queue = video->queue;
+ struct isp_video_fh *vfh =
+ container_of(queue, struct isp_video_fh, queue);
enum isp_pipeline_state state;
struct isp_video_buffer *buf;
unsigned long flags;
@@ -530,6 +531,8 @@ struct isp_buffer *omap3isp_video_buffer_next(struct isp_video *video)
list_del(&buf->irqlist);
spin_unlock_irqrestore(&queue->irqlock, flags);
+ buf->vbuf.bytesused = vfh->format.fmt.pix.sizeimage;
+
ktime_get_ts(&ts);
buf->vbuf.timestamp.tv_sec = ts.tv_sec;
buf->vbuf.timestamp.tv_usec = ts.tv_nsec / NSEC_PER_USEC;
OpenPOWER on IntegriCloud