Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp949727lqp; Sun, 14 Apr 2024 07:08:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW94Jue7qowV6PYfa0K+aQgGlXcZxX4wyjudrplg11we29BwrAQ9KFBn4H2sTO86oC7BohKkdjuXBzLGJidhedLzlSQr2w7Oi8USEh4eA== X-Google-Smtp-Source: AGHT+IH/Mn3pm93csDM4Upu86qcyyzFu0ypQLDqIfOtbtJcVBBQcj128GPJx7bCObQqTMDRsNVAo X-Received: by 2002:a17:902:ec8b:b0:1e2:bdef:3971 with SMTP id x11-20020a170902ec8b00b001e2bdef3971mr14704659plg.16.1713103681948; Sun, 14 Apr 2024 07:08:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713103681; cv=pass; d=google.com; s=arc-20160816; b=A1ghNb4tvmJHPkR70S6I8j4jMpcW7zhd8KZMeTSYhZkL9ntOMwiMlMQd2sDBxm1VqG Z9v5q+/xZVE3n5pa7uroOCi/XhGmffCH89G6cL9K0t0UAebZ5gG6+O2Pyj/T2zOXYUc5 3kWLhnPTQhlDimgHHibEXnOAE9Pi/MmA3vtUyGLBbGyfayBDpWMIeVY7+Pkg2lEhERer DntLK8ewLWjUhy5Abmjs0/qCPfXm2jd/M0/UEz4j/pwuq6pmypBrIjnRwNNARnnp8gki 2EvXDdeiDjoegXEXRryDSY+H/zor7GBqau3XhzqUOZfIEwHQNzBOhlboSeAdE20HOi5N K2Wg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0NqDjazNs/I5J82m8yuxVfPhwV7Xjn9SbFHf1PFgG2o=; fh=ubgSGivyX1a6nEb6mxS2lPUzB/FQ53Lzp2BE7D6lOQ4=; b=GHfbuF8cT2ZlvgNpmVMwsD8v14pbzvErMXj3H/B28PZAcblOy24eSkjA/UpBl81WWd VLeJVmMDg2TLGsQlitaznuyIjNhA6MywlF32JzWm77A2g973aoJS5crdE34Wo4gG6qM0 Ak8okRvwXz31UWhoGqi6rRxGSX4BZRUcWzZ7L+Rh/uwACc2fBQn53R2B2/dfZkVsUNfd uWYU9kxAV4uMfRcPjMsOGLcEd15myWO4Z0fgsf9xTNJ8filFTlfq9+AUOt7fzQAix8Ai oZxWKNE7VMR/4Hjqmw/6A0oZfvdLfl9PTcnaat0gclg50nCKIwHiWr2sMmhsTrrvOxN7 R0Zg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=eHcv+Gmu; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-144178-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144178-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e11-20020a631e0b000000b005dc496a3597si6429180pge.417.2024.04.14.07.08.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 07:08:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144178-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=eHcv+Gmu; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-144178-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144178-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9D30F281498 for ; Sun, 14 Apr 2024 14:08:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FB815A117; Sun, 14 Apr 2024 14:06:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="eHcv+Gmu" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BB6E59B7E; Sun, 14 Apr 2024 14:06:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713103606; cv=none; b=YFSvmTIMLNkXeEOYAwfIr4IP8RyI4LYDAEFlsWz8Cr1Z283ZD87Ti1izRFwOcQ4wIbpcJ1KsF6o1hUxSj6YlTeamlpT2XYXgh+zOe/B6lM3vJWscD4CZEhvT9/V+2VBwOHCw3sz6FWUC4oaY64wbz2gTm0dbLHu/9eC6Ih0NNs4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713103606; c=relaxed/simple; bh=oVLTIRnsLiywaaA58tZdbnC3bT4/p5J0VJqlMZgfG0M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d3dOklXNtg0h2ke+TL47Q9S83/7hnU8gZm015GfP8C6z4PT7bIyh9VOi1EeIChVc+etb15j7qOTmb7YGngsEsuzsO6sPiJ4IT2nJyCjs91YPXoYJxg1gLpdhRVSUO9whTll/oNYQwhP5llp8nWi/E0Lv8eIcsucdAYJKhemdJbc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=eHcv+Gmu; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from umang.jain (unknown [103.86.18.238]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B783114AF; Sun, 14 Apr 2024 16:05:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1713103558; bh=oVLTIRnsLiywaaA58tZdbnC3bT4/p5J0VJqlMZgfG0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eHcv+GmuS9erBtlSXrR8oljhg4+sDxAD7snKaBy2HMoURgBsaL4Q5/f2QuNrmOF+w btrKX4KSUjBuV+yYkiYAjoUB19XJP4q7ZW6cTVN6jfSQ938bF5JmN6AzG9Z5whBGjq ZKcDE1qNpHHwgHrUeOpCdMJxRQCUYRcktAE1WcWQ= From: Umang Jain To: linux-media@vger.kernel.org Cc: Alexander Shiyan , Kieran Bingham , Sakari Ailus , open list , Umang Jain Subject: [PATCH v7 5/6] media: imx335: Fix active area height discrepency Date: Sun, 14 Apr 2024 19:36:20 +0530 Message-ID: <20240414140621.167717-6-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240414140621.167717-1-umang.jain@ideasonboard.com> References: <20240414140621.167717-1-umang.jain@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The imx335 reports a recommended pixel area of - 2592x1944. The driver supported mode however limits it to height=1940. Fix the height discrepency by correctly the value of height (with updates to vblank and mode registers). The IMX335_REG_HTRIMMING should also be corrected to the start offset(i.e. 48) instead of chosing a abritrary crop start of 384. Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham --- drivers/media/i2c/imx335.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c index d25fb0ecdf20..31d3b95cc0ef 100644 --- a/drivers/media/i2c/imx335.c +++ b/drivers/media/i2c/imx335.c @@ -255,9 +255,9 @@ static const struct cci_reg_sequence mode_2592x1940_regs[] = { { IMX335_REG_MODE_SELECT, IMX335_MODE_STANDBY }, { IMX335_REG_MASTER_MODE, 0x00 }, { IMX335_REG_WINMODE, 0x04 }, - { IMX335_REG_HTRIMMING_START, 384 }, + { IMX335_REG_HTRIMMING_START, 48 }, { IMX335_REG_HNUM, 2592 }, - { IMX335_REG_Y_OUT_SIZE, 1940 }, + { IMX335_REG_Y_OUT_SIZE, 1944 }, { IMX335_REG_AREA3_ST_ADR_1, 176 }, { IMX335_REG_AREA3_WIDTH_1, 3928 }, { IMX335_REG_OPB_SIZE_V, 0 }, @@ -408,10 +408,10 @@ static const u32 imx335_mbus_codes[] = { /* Supported sensor mode configurations */ static const struct imx335_mode supported_mode = { .width = 2592, - .height = 1940, + .height = 1944, .hblank = 342, - .vblank = 2560, - .vblank_min = 2560, + .vblank = 2556, + .vblank_min = 2556, .vblank_max = 133060, .pclk = 396000000, .reg_list = { -- 2.43.0