From patchwork Fri Aug 2 15:02:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Kumar K X-Patchwork-Id: 2837999 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 30E9C9F479 for ; Fri, 2 Aug 2013 15:04:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1665720489 for ; Fri, 2 Aug 2013 15:04:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 408FB2048F for ; Fri, 2 Aug 2013 15:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753769Ab3HBPDo (ORCPT ); Fri, 2 Aug 2013 11:03:44 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:53300 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751970Ab3HBPDm (ORCPT ); Fri, 2 Aug 2013 11:03:42 -0400 Received: by mail-pa0-f47.google.com with SMTP id kl13so762232pab.6 for ; Fri, 02 Aug 2013 08:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=WKNmi//2OQogpiXgVlOIUV0tDBb4XdE6SWswlz+Yyls=; b=urtepOSFFtpFX03gMK8VJe7zZaB6LzIT5G6n7lfShYcJ+z3gtIRdLN6CtzvHN4YYHF F4wiyo6bMDKelSGQ/yJjvt5VeQEOvPqjTyOZ8hlNWHhvVL36Lxm0GaYEhnc2aWl8E050 RF3uIGEVemmoz/dbuKohl9DqRER2YKbtBuzStkj1xfWIpMBte9r1cEMY1eqHCAft78i6 d7bFZGVzefustzzJilPCghrOdPvAQ0UUUV8/dJ7TVSpjMXLSH7dABbIGmTxQS78KOt7A X49sogKh0dzfraylkZ+yAmJrU5ByFTvGNLOY3ZfsTmYnYkA8nf2VAno902qhdWJTlGFc XJoQ== X-Received: by 10.68.58.97 with SMTP id p1mr8426696pbq.144.1375455821791; Fri, 02 Aug 2013 08:03:41 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id is3sm10200567pbc.25.2013.08.02.08.03.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 Aug 2013 08:03:41 -0700 (PDT) From: Arun Kumar K To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org Cc: s.nawrocki@samsung.com, hverkuil@xs4all.nl, a.hajda@samsung.com, sachin.kamat@linaro.org, shaik.ameer@samsung.com, kilyeon.im@samsung.com, arunkk.samsung@gmail.com Subject: [RFC v3 12/13] V4L: s5k6a3: Change sensor min/max resolutions Date: Fri, 2 Aug 2013 20:32:41 +0530 Message-Id: <1375455762-22071-13-git-send-email-arun.kk@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1375455762-22071-1-git-send-email-arun.kk@samsung.com> References: <1375455762-22071-1-git-send-email-arun.kk@samsung.com> 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,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 s5k6a3 sensor has actual pixel resolution of 1408x1402 against the active resolution 1392x1392. The real resolution is needed when raw sensor SRGB data is dumped to memory by fimc-lite. Signed-off-by: Arun Kumar K --- drivers/media/i2c/s5k6a3.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c index ccbb4fc..d81638d 100644 --- a/drivers/media/i2c/s5k6a3.c +++ b/drivers/media/i2c/s5k6a3.c @@ -30,6 +30,9 @@ #define S5K6A3_SENSOR_MIN_WIDTH 32 #define S5K6A3_SENSOR_MIN_HEIGHT 32 +#define S5K6A3_WIDTH_PADDING 16 +#define S5K6A3_HEIGHT_PADDING 10 + #define S5K6A3_DEF_PIX_WIDTH 1296 #define S5K6A3_DEF_PIX_HEIGHT 732 @@ -107,10 +110,13 @@ static void s5k6a3_try_format(struct v4l2_mbus_framefmt *mf) fmt = find_sensor_format(mf); mf->code = fmt->code; - v4l_bound_align_image(&mf->width, S5K6A3_SENSOR_MIN_WIDTH, - S5K6A3_SENSOR_MAX_WIDTH, 0, - &mf->height, S5K6A3_SENSOR_MIN_HEIGHT, - S5K6A3_SENSOR_MAX_HEIGHT, 0, 0); + v4l_bound_align_image(&mf->width, + S5K6A3_SENSOR_MIN_WIDTH + S5K6A3_WIDTH_PADDING, + S5K6A3_SENSOR_MAX_WIDTH + S5K6A3_WIDTH_PADDING, 0, + &mf->height, + S5K6A3_SENSOR_MIN_HEIGHT + S5K6A3_HEIGHT_PADDING, + S5K6A3_SENSOR_MAX_HEIGHT + S5K6A3_HEIGHT_PADDING, 0, + 0); } static struct v4l2_mbus_framefmt *__s5k6a3_get_format(