diff options
author | Prabhakar Lad <prabhakar.csengg@gmail.com> | 2014-10-12 16:40:33 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-10-28 14:06:18 -0400 |
commit | 488735bfed9bc17e244d1fc8da4a090dc0af58a9 (patch) | |
tree | fbeeb03930a67fef26e67e72b2823b3a72ded505 /drivers/media/platform | |
parent | f92a4e2d96387368e460f74e2c652d4ad34b0906 (diff) |
[media] media: davinci: vpbe: use vb2_ops_wait_prepare/finish helper functions
this patch makes use of vb2_ops_wait_prepare/finish helper functions.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/davinci/vpbe_display.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index e2bda17f0ffd..6f9599deb355 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c | |||
@@ -308,20 +308,6 @@ static void vpbe_buf_cleanup(struct vb2_buffer *vb) | |||
308 | spin_unlock_irqrestore(&layer->irqlock, flags); | 308 | spin_unlock_irqrestore(&layer->irqlock, flags); |
309 | } | 309 | } |
310 | 310 | ||
311 | static void vpbe_wait_prepare(struct vb2_queue *vq) | ||
312 | { | ||
313 | struct vpbe_layer *layer = vb2_get_drv_priv(vq); | ||
314 | |||
315 | mutex_unlock(&layer->opslock); | ||
316 | } | ||
317 | |||
318 | static void vpbe_wait_finish(struct vb2_queue *vq) | ||
319 | { | ||
320 | struct vpbe_layer *layer = vb2_get_drv_priv(vq); | ||
321 | |||
322 | mutex_lock(&layer->opslock); | ||
323 | } | ||
324 | |||
325 | static int vpbe_start_streaming(struct vb2_queue *vq, unsigned int count) | 311 | static int vpbe_start_streaming(struct vb2_queue *vq, unsigned int count) |
326 | { | 312 | { |
327 | struct vpbe_layer *layer = vb2_get_drv_priv(vq); | 313 | struct vpbe_layer *layer = vb2_get_drv_priv(vq); |
@@ -394,8 +380,8 @@ static void vpbe_stop_streaming(struct vb2_queue *vq) | |||
394 | 380 | ||
395 | static struct vb2_ops video_qops = { | 381 | static struct vb2_ops video_qops = { |
396 | .queue_setup = vpbe_buffer_queue_setup, | 382 | .queue_setup = vpbe_buffer_queue_setup, |
397 | .wait_prepare = vpbe_wait_prepare, | 383 | .wait_prepare = vb2_ops_wait_prepare, |
398 | .wait_finish = vpbe_wait_finish, | 384 | .wait_finish = vb2_ops_wait_finish, |
399 | .buf_prepare = vpbe_buffer_prepare, | 385 | .buf_prepare = vpbe_buffer_prepare, |
400 | .start_streaming = vpbe_start_streaming, | 386 | .start_streaming = vpbe_start_streaming, |
401 | .stop_streaming = vpbe_stop_streaming, | 387 | .stop_streaming = vpbe_stop_streaming, |
@@ -1749,7 +1735,7 @@ static int vpbe_display_probe(struct platform_device *pdev) | |||
1749 | q->buf_struct_size = sizeof(struct vpbe_disp_buffer); | 1735 | q->buf_struct_size = sizeof(struct vpbe_disp_buffer); |
1750 | q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; | 1736 | q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; |
1751 | q->min_buffers_needed = 1; | 1737 | q->min_buffers_needed = 1; |
1752 | 1738 | q->lock = &disp_dev->dev[i]->opslock; | |
1753 | err = vb2_queue_init(q); | 1739 | err = vb2_queue_init(q); |
1754 | if (err) { | 1740 | if (err) { |
1755 | v4l2_err(v4l2_dev, "vb2_queue_init() failed\n"); | 1741 | v4l2_err(v4l2_dev, "vb2_queue_init() failed\n"); |