From patchwork Sat May 7 05:05:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ayaka X-Patchwork-Id: 9037591 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7F651BF29F for ; Sat, 7 May 2016 05:08:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B599B203B4 for ; Sat, 7 May 2016 05:08:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2AA4203A9 for ; Sat, 7 May 2016 05:08:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ayuRr-0006kH-0I; Sat, 07 May 2016 05:06:39 +0000 Received: from kozue.soulik.info ([108.61.200.231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ayuRo-0006iP-47 for linux-arm-kernel@lists.infradead.org; Sat, 07 May 2016 05:06:36 +0000 Received: from ritsuko.sumomo.pri (unknown [IPv6:2001:470:b30d:2::3bd]) by kozue.soulik.info (Postfix) with ESMTPA id B5A2310533B; Sat, 7 May 2016 14:07:25 +0900 (JST) From: ayaka To: linux-kernel@vger.kernel.org Subject: [PATCH 1/3] [media] s5p-mfc: Add handling of buffer freeing reqbufs request Date: Sat, 7 May 2016 13:05:24 +0800 Message-Id: <1462597526-31559-2-git-send-email-ayaka@soulik.info> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1462597526-31559-1-git-send-email-ayaka@soulik.info> References: <1462597526-31559-1-git-send-email-ayaka@soulik.info> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160506_220636_290733_B7D33B7A X-CRM114-Status: UNSURE ( 6.31 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.0 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: k.debski@samsung.com, linux-media@vger.kernel.org, mchehab@osg.samsung.com, ayaka , shuahkh@osg.samsung.com, jtp.park@samsung.com, javier@osg.samsung.com, kyungmin.park@samsung.com, nicolas.dufresne@collabora.com, linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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; }