Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ayaka@soulik.info (ayaka)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] [media] s5p-mfc: Add handling of buffer freeing reqbufs request
Date: Sat,  7 May 2016 13:05:24 +0800	[thread overview]
Message-ID: <1462597526-31559-2-git-send-email-ayaka@soulik.info> (raw)
In-Reply-To: <1462597526-31559-1-git-send-email-ayaka@soulik.info>

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>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index 034b5c1..a66a9f9 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;
 		}
-- 
2.5.5

  reply	other threads:[~2016-05-07  5:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-07  5:05 [RESEND PATCH] [PATCH 0/3] A few patches make s5p-mfc work with Gstreamer ayaka
2016-05-07  5:05 ` ayaka [this message]
2016-05-07  5:05 ` [PATCH 2/3] [media] s5p-mfc: remove unnecessary check in try_fmt ayaka
2016-05-07  5:05 ` [PATCH 3/3] [media] s5p-mfc: fix a typo in s5p_mfc_dec ayaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462597526-31559-2-git-send-email-ayaka@soulik.info \
    --to=ayaka@soulik.info \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox