From patchwork Wed Aug 21 06:34:39 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: 2847503 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 95B6F9F9EC for ; Wed, 21 Aug 2013 06:36:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B250A20166 for ; Wed, 21 Aug 2013 06:35:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D208420134 for ; Wed, 21 Aug 2013 06:35:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752497Ab3HUGfz (ORCPT ); Wed, 21 Aug 2013 02:35:55 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:50603 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752196Ab3HUGfx (ORCPT ); Wed, 21 Aug 2013 02:35:53 -0400 Received: by mail-pb0-f46.google.com with SMTP id rq2so23059pbb.33 for ; Tue, 20 Aug 2013 23:35:52 -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:in-reply-to:references; bh=Ya2kGMcNWGGNuPAiSkdbBdNZ5P4Gf8f5eTuyW7usxSQ=; b=vlX6OIN6wkZXz3rAZScZuXzB1sXAW7H20bHuJk65HaXWY9NrqvpGk8L/AXyihu2KbM msL6eeM0hd8GqTQ3FbnytlzNXOVqg4g+eIrQMBnWTzd5USF2syChgZ57q6Mqqg8zFmpE C6PIhj88GU7TRdn4ElHIakZiaPxufsT/7CdtSmeOUzRH4qoqKIoCXJ/fk2UtiJ8ezFRl GyUsgDShUesiq0Lx3UCaMnWSmDuctfAEdm9b6AMzBKj8bOwepxeLxNrsUci7qBpuxBVr +BsIJWuYa7iX4+Ghp1eiLQbqVDWiFDzRaxXVatiPCMrjzfxq3u7ZU3QIrKLeeu6eN8Dw euqg== X-Received: by 10.68.58.97 with SMTP id p1mr6113863pbq.144.1377066952667; Tue, 20 Aug 2013 23:35:52 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id in2sm6284386pbc.37.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 Aug 2013 23:35:51 -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, swarren@wwwdotorg.org, mark.rutland@arm.com, Pawel.Moll@arm.com, galak@codeaurora.org, a.hajda@samsung.com, sachin.kamat@linaro.org, shaik.ameer@samsung.com, kilyeon.im@samsung.com, arunkk.samsung@gmail.com Subject: [PATCH v7 12/13] V4L: s5k6a3: Change sensor min/max resolutions Date: Wed, 21 Aug 2013 12:04:39 +0530 Message-Id: <1377066881-5423-13-git-send-email-arun.kk@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1377066881-5423-1-git-send-email-arun.kk@samsung.com> References: <1377066881-5423-1-git-send-email-arun.kk@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-9.6 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 Reviewed-by: Sylwester Nawrocki --- drivers/media/i2c/s5k6a3.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c index ccbb4fc..34c3165 100644 --- a/drivers/media/i2c/s5k6a3.c +++ b/drivers/media/i2c/s5k6a3.c @@ -25,10 +25,12 @@ #include #include -#define S5K6A3_SENSOR_MAX_WIDTH 1392 -#define S5K6A3_SENSOR_MAX_HEIGHT 1392 -#define S5K6A3_SENSOR_MIN_WIDTH 32 -#define S5K6A3_SENSOR_MIN_HEIGHT 32 +#define S5K6A3_SENSOR_MAX_WIDTH 1408 +#define S5K6A3_SENSOR_MAX_HEIGHT 1402 +#define S5K6A3_SENSOR_ACTIVE_WIDTH 1392 +#define S5K6A3_SENSOR_ACTIVE_HEIGHT 1392 +#define S5K6A3_SENSOR_MIN_WIDTH (32 + 16) +#define S5K6A3_SENSOR_MIN_HEIGHT (32 + 10) #define S5K6A3_DEF_PIX_WIDTH 1296 #define S5K6A3_DEF_PIX_HEIGHT 732 @@ -107,10 +109,11 @@ 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_SENSOR_MAX_WIDTH, 0, + &mf->height, + S5K6A3_SENSOR_MIN_HEIGHT, S5K6A3_SENSOR_MAX_HEIGHT, 0, + 0); } static struct v4l2_mbus_framefmt *__s5k6a3_get_format(