From patchwork Tue Jun 25 10:52:33 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: 2775881 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 153CAC0AB1 for ; Tue, 25 Jun 2013 10:53:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29F4D2021B for ; Tue, 25 Jun 2013 10:53:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D07820219 for ; Tue, 25 Jun 2013 10:53:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752614Ab3FYKxH (ORCPT ); Tue, 25 Jun 2013 06:53:07 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:18958 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751812Ab3FYKxG (ORCPT ); Tue, 25 Jun 2013 06:53:06 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MOY00GJ63KGYX20@mailout1.samsung.com> for linux-media@vger.kernel.org; Tue, 25 Jun 2013 19:53:04 +0900 (KST) X-AuditID: cbfee61a-b7f3b6d000006edd-d6-51c9769014b3 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id C9.0B.28381.09679C15; Tue, 25 Jun 2013 19:53:04 +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 <0MOY005X93JQYJK0@mmp1.samsung.com>; Tue, 25 Jun 2013 19:53:04 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: kyungmin.park@samsung.com, a.hajda@samsung.com, j.anaszewski@samsung.com, Sylwester Nawrocki Subject: [PATCH v2 4/6] exynos4-is: Set valid initial format on FIMC-IS-ISP subdev pads Date: Tue, 25 Jun 2013 12:52:33 +0200 Message-id: <1372157555-29557-2-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1372157555-29557-1-git-send-email-s.nawrocki@samsung.com> References: <1372157555-29557-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFJMWRmVeSWpSXmKPExsVy+t9jAd0JZScDDXqn6FrcWneO1aL36nNG i7NNb9gtejZsZbU4/Kad1YHVo2/LKkaPz5vkApiiuGxSUnMyy1KL9O0SuDK+frvNWLCXp2LO nu/sDYz3uLoYOTkkBEwkDuy/zwJhi0lcuLeerYuRi0NIYBGjxK+ux6wQTgeTxIa/05hBqtgE DCV6j/YxgtgiAvIST3pvsIHYzALVEje/TWUCsYUFIiV+T1wKNpVFQFVidvdjsHpeATeJm4un s3cxcgBtU5CYM8kGJMwp4C7RMOMOWLkQUMnBTW/YJzDyLmBkWMUomlqQXFCclJ5rqFecmFtc mpeul5yfu4kRHCLPpHYwrmywOMQowMGoxMMbuetEoBBrYllxZe4hRgkOZiUR3kNZJwOFeFMS K6tSi/Lji0pzUosPMUpzsCiJ8x5otQ4UEkhPLEnNTk0tSC2CyTJxcEo1MHZ9l2uIfmvTGRC4 f9eqKX3PGE43zulTeLl/Xuan26yc9/+WdXwUP3aVuyf9YdAMtrMNVxot29unP5fPKTIMfaTw rj5Zcj/fvhjTTDPDr/K3Jiole1rWvRE4+aVzy9xrRzjkjwSf+hFY9Hcf9+/lta7LD/PfuTI1 sklr/Qqeb19frn29cGfX+SNKLMUZiYZazEXFiQBBeSewDQIAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Ensure there is a valid initial resolution and pixel format set at the FIMC-IS-ISP subdev pads. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- drivers/media/platform/exynos4-is/fimc-isp.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/media/platform/exynos4-is/fimc-isp.c b/drivers/media/platform/exynos4-is/fimc-isp.c index 30aa46f..de9eed5 100644 --- a/drivers/media/platform/exynos4-is/fimc-isp.c +++ b/drivers/media/platform/exynos4-is/fimc-isp.c @@ -672,6 +672,22 @@ static const struct v4l2_ctrl_ops fimc_isp_ctrl_ops = { .s_ctrl = fimc_is_s_ctrl, }; +static void __isp_subdev_set_default_format(struct fimc_isp *isp) +{ + struct fimc_is *is = fimc_isp_to_is(isp); + + isp->sink_fmt.width = DEFAULT_PREVIEW_STILL_WIDTH + + FIMC_ISP_CAC_MARGIN_WIDTH; + isp->sink_fmt.height = DEFAULT_PREVIEW_STILL_HEIGHT + + FIMC_ISP_CAC_MARGIN_HEIGHT; + isp->sink_fmt.code = V4L2_MBUS_FMT_SGRBG10_1X10; + + isp->src_fmt.width = DEFAULT_PREVIEW_STILL_WIDTH; + isp->src_fmt.height = DEFAULT_PREVIEW_STILL_HEIGHT; + isp->src_fmt.code = V4L2_MBUS_FMT_SGRBG10_1X10; + __is_set_frame_size(is, &isp->src_fmt); +} + int fimc_isp_subdev_create(struct fimc_isp *isp) { const struct v4l2_ctrl_ops *ops = &fimc_isp_ctrl_ops; @@ -752,6 +768,8 @@ int fimc_isp_subdev_create(struct fimc_isp *isp) sd->entity.ops = &fimc_is_subdev_media_ops; v4l2_set_subdevdata(sd, isp); + __isp_subdev_set_default_format(isp); + return 0; }