Received: by 2002:a05:7208:3228:b0:82:47:81bb with SMTP id cb40csp547246rbb; Fri, 12 Apr 2024 09:02:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX05/kMVCf7Bppscq9lUFalF8yyIVibfeaYuq54pQ+ouZM3Dsg0xSxxQVevOVS8x8WYAI/mvQQNrd1yBMtuCiRMq/9vgEXUhIXXXTSLVA== X-Google-Smtp-Source: AGHT+IHtl6TdPxXmr1gcZFX+ZSRLi28oPlMm0k2L4KZZKoRLPyfUuwn4xWX9Txgw2wkdjr7LT1IO X-Received: by 2002:a19:4346:0:b0:516:bdf6:8db9 with SMTP id m6-20020a194346000000b00516bdf68db9mr1805900lfj.61.1712937752191; Fri, 12 Apr 2024 09:02:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712937752; cv=pass; d=google.com; s=arc-20160816; b=veLur3f/R4FadCzcLGsY2dYekxoXFz7nNvYYkm+L0E+qIsdBrNIQd/7bPRqdzDbhF6 xb68BIY7+dLsWsU6FIBNLd2KViZly9XTyM/NExj6LyKc1v1Uws+l7805kUZHh+rd9kUj ZRoCUWuzjmMNhok+7N5z0AF9djWOWkjZ2u6yhRaewRg6io843Cm0rW91+Q0TB96yiTR2 p3cCwKwWzqbtrJhs4oZWK0cz/wDn3V6eKTO+21M5PJKkcdFdOEdGQOTmErN1ObI9MlJF FaTkdp8kJugIA3MOetxoWJ7CwdaiPmTn0W2qIvV6Ru3aea+M2W8akbE8FFWp2bm31wOv vKhg== 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=5shM2RcNcd8cbQMCrsO0xItWKxWmKYilb1ycLe+mPTk=; fh=ubgSGivyX1a6nEb6mxS2lPUzB/FQ53Lzp2BE7D6lOQ4=; b=Pkg7clZ29ye9I1vD2sF1QTXPBrNe7zjaSIwkMiX/M1Y0beI7yFCGOzldVYY+Xm+2Aa V8k1Ja7tN8E5xVTbXMvYc8rfFBDHrs7MREwHCPnNgmZreV81T6FkAy8roJ8+Cx/iNGrh jDB68aVBIfijt/hR7vrcAJR/QdEeafdX4rud+pfNu5kb9bh/QXelaYeNSV8+1w2jbGOG wpQLjGS98ivJR5xBxBu2Fe/zLVBKrBFDw/86cFgjaihzM0figxEn70DEo2iMhCLdT4b+ IxmVcLfKz1c656CyWn/sHoKtOtmKdcCBrYlRawrTuCnRWKYz92Es223RxM84c4VHOf1d zPhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=nMYekYB4; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-142998-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142998-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m4-20020a50d7c4000000b0056dfb36c385si1861651edj.111.2024.04.12.09.02.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 09:02:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142998-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=nMYekYB4; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-142998-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142998-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 am.mirrors.kernel.org (Postfix) with ESMTPS id E84AF1F21977 for ; Fri, 12 Apr 2024 16:02:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E2BF014A0A3; Fri, 12 Apr 2024 16:01:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nMYekYB4" 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 BA565149E1B; Fri, 12 Apr 2024 16:01:08 +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=1712937670; cv=none; b=mSU+DPdZvgw0D6PTBiaFnAT8g4iEE+yZnlJUmwKKrc9223PvTuyEnvVg1lWZo65Dj8GhBZTJekZ0QiRXYUz5PkK+YgQIhxerHNd7FAry+VwuaD7qRM/cF6JaiFD44hq6Mt9q5iar8j1+D8YGKtQY33DVIsIxf/VJBuwEwJojP6s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712937670; c=relaxed/simple; bh=/h8CcxylegMAKWKZugzBnB81wb7Qm9AKKVd/DWM8vBM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SnA4GtuglzGpofkMVSduUw0lB5D2lwEGNtNN9xh+Prca6AWLDQ+1UFSk1cZJoBeLnKEGzEaGAfSNyRCqO8Iq2tk/PJQRofIjEIzjJTC5n3IIct37I4yqzfRccHzzZpH2Q0w4ZX66SkV5wOEmTlb/mbyIvehEsNOb1rJB4TMKXT4= 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=nMYekYB4; 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.251.226.65]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3485BD01; Fri, 12 Apr 2024 18:00:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1712937624; bh=/h8CcxylegMAKWKZugzBnB81wb7Qm9AKKVd/DWM8vBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nMYekYB4DKMis5bvo+HzYDHb3Ih4gaTA0+NQX6MuyXQk7lVrL7svjKBgW9dtqIrVH iMGRAkFob7HuFs4jLmRZ8Y/8f0sKAeEbvMLSsgnXKZoK+5HU273BFDKVlms/3+mTWj cY8oMlCVBqmGiu6JCXAYGbIPYoKHyGbN/8EyCPXA= From: Umang Jain To: linux-media@vger.kernel.org Cc: Alexander Shiyan , Kieran Bingham , Sakari Ailus , open list , Umang Jain Subject: [PATCH v6 5/6] media: imx335: Fix active area height discrepency Date: Fri, 12 Apr 2024 21:30:38 +0530 Message-ID: <20240412160039.276743-6-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240412160039.276743-1-umang.jain@ideasonboard.com> References: <20240412160039.276743-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 7548518359bc..dfbab39d69b9 100644 --- a/drivers/media/i2c/imx335.c +++ b/drivers/media/i2c/imx335.c @@ -251,9 +251,9 @@ static const struct cci_reg_sequence mode_2592x1940_regs[] = { { IMX335_REG_MODE_SELECT, 0x01 }, { 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 }, @@ -404,10 +404,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