From patchwork Tue Mar 26 17:29:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 2341731 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AB9C8E00E6 for ; Tue, 26 Mar 2013 17:30:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753336Ab3CZRaT (ORCPT ); Tue, 26 Mar 2013 13:30:19 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:62478 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753332Ab3CZRaQ (ORCPT ); Tue, 26 Mar 2013 13:30:16 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKA00D1V3ACS190@mailout4.samsung.com>; Wed, 27 Mar 2013 02:30:14 +0900 (KST) X-AuditID: cbfee61a-b7fa86d0000045ae-33-5151db2691d2 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 9B.CA.17838.62BD1515; Wed, 27 Mar 2013 02:30:14 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MKA004BH39YZW90@mmp1.samsung.com>; Wed, 27 Mar 2013 02:30:14 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: kyungmin.park@samsung.com, myungjoo.ham@samsung.com, dh09.lee@samsung.com, shaik.samsung@gmail.com, arun.kk@samsung.com, a.hajda@samsung.com, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH v2 02/10] s5p-fimc: Add error checks for pipeline stream on callbacks Date: Tue, 26 Mar 2013 18:29:44 +0100 Message-id: <1364318992-20562-3-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1364318992-20562-1-git-send-email-s.nawrocki@samsung.com> References: <1364318992-20562-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprELMWRmVeSWpSXmKPExsVy+t9jAV2124GBBju7zCxurTvHavHx1G1W i+vn7SzONr1ht+jZsJXVYsb5fUwWtxtXsFkcftPOarFu5yR2B06PnbPusnv0bVnF6PF5k1wA cxSXTUpqTmZZapG+XQJXxrRVxgX/eSten2xlbGC8w93FyMkhIWAi8ejmHlYIW0ziwr31bF2M XBxCAosYJS7PXcwC4XQwSfzc8gasik3AUKL3aB8jiC0iIC/xpPcGWAezwBNGiT8nDjCBJIQF wiU+zF3BAmKzCKhKfPu3CayZV8BNYs7Ht0DNHEDrFCTmTLIBCXMKuEssv3EErFwIqOR5wxa2 CYy8CxgZVjGKphYkFxQnpeca6hUn5haX5qXrJefnbmIEh9QzqR2MKxssDjEKcDAq8fBuCA4I FGJNLCuuzD3EKMHBrCTCK7gxMFCINyWxsiq1KD++qDQntfgQozQHi5I474FW60AhgfTEktTs 1NSC1CKYLBMHp1QDY3HwEekwnUgGXS1TkStbXG10J5V/v8tdVL90LoNkfvG+F3ebZ5cfEtqY /9/vwsHi2X7Gfgc9Lzmb3z5ra/vlm5z5ue2zVyzNy3OZ6vr4Wti6RTkLQndaBCx0/6H7I2aP 4HsTK0WeAkfDisPXE+9+evz+x8cZ267KPlso+vlVrcm7yl2HOhoCApVYijMSDbWYi4oTAXAw 6lQlAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Andrzej Hajda set_stream error for pipelines is logged or reported to user space if possible. Signed-off-by: Andrzej Hajda Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- drivers/media/platform/s5p-fimc/fimc-capture.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/s5p-fimc/fimc-capture.c b/drivers/media/platform/s5p-fimc/fimc-capture.c index 344e85e..3f3ceb2 100644 --- a/drivers/media/platform/s5p-fimc/fimc-capture.c +++ b/drivers/media/platform/s5p-fimc/fimc-capture.c @@ -286,8 +286,8 @@ static int start_streaming(struct vb2_queue *q, unsigned int count) fimc_activate_capture(ctx); if (!test_and_set_bit(ST_CAPT_ISP_STREAM, &fimc->state)) - fimc_pipeline_call(fimc, set_stream, - &fimc->pipeline, 1); + return fimc_pipeline_call(fimc, set_stream, + &fimc->pipeline, 1); } return 0; @@ -443,12 +443,17 @@ static void buffer_queue(struct vb2_buffer *vb) if (vb2_is_streaming(&vid_cap->vbq) && vid_cap->active_buf_cnt >= min_bufs && !test_and_set_bit(ST_CAPT_STREAM, &fimc->state)) { + int ret; + fimc_activate_capture(ctx); spin_unlock_irqrestore(&fimc->slock, flags); - if (!test_and_set_bit(ST_CAPT_ISP_STREAM, &fimc->state)) - fimc_pipeline_call(fimc, set_stream, - &fimc->pipeline, 1); + if (test_and_set_bit(ST_CAPT_ISP_STREAM, &fimc->state)) + return; + + ret = fimc_pipeline_call(fimc, set_stream, &fimc->pipeline, 1); + if (ret < 0) + v4l2_err(&vid_cap->vfd, "stream on failed: %d\n", ret); return; } spin_unlock_irqrestore(&fimc->slock, flags);