summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
diff options
context:
space:
mode:
authorayaka2016-05-07 07:05:24 +0200
committerMauro Carvalho Chehab2016-06-07 18:02:47 +0200
commitbcbf298669a88bde7846c8ce0595f77aa4113e04 (patch)
tree8a512c1e9b7843d711dc3a03706004e7b9f7c567 /drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
parentMAINTAINERS: Add Sony Helene TV tuner entry (diff)
downloadkernel-qcow2-linux-bcbf298669a88bde7846c8ce0595f77aa4113e04.tar.gz
kernel-qcow2-linux-bcbf298669a88bde7846c8ce0595f77aa4113e04.tar.xz
kernel-qcow2-linux-bcbf298669a88bde7846c8ce0595f77aa4113e04.zip
[media] s5p-mfc: Add handling of buffer freeing reqbufs request
The encoder forget the work to call hardware to release its buffers. This patch came from chromium project. I just change its code style and make the API match with new kernel. Signed-off-by: ayaka <ayaka@soulik.info> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/s5p-mfc/s5p_mfc_enc.c')
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_enc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index 034b5c1d35a1..a66a9f906b04 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -1144,7 +1144,10 @@ static int vidioc_reqbufs(struct file *file, void *priv,
return -EINVAL;
if (reqbufs->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
if (reqbufs->count == 0) {
+ mfc_debug(2, "Freeing buffers\n");
ret = vb2_reqbufs(&ctx->vq_dst, reqbufs);
+ s5p_mfc_hw_call(dev->mfc_ops, release_codec_buffers,
+ ctx);
ctx->capture_state = QUEUE_FREE;
return ret;
}