Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bcbf2986 authored by ayaka's avatar ayaka Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarayaka <ayaka@soulik.info>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent fae2080a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
		}