Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp375335lqp; Thu, 21 Mar 2024 04:14:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXoTmLgwIrhIxVd+YECriXpcBbQhADzAbsDeWxS8gDtCWBihxeRRV9efDNjq1s2zMF0KXYFjT0MmoSHvq87okIYJz31vRM5IYV7nrfqNw== X-Google-Smtp-Source: AGHT+IGiV0q1QrYaYbcmfA5t7RQ5Qf5lau1sHaVude8UkQqBRBKE0GrBuQHKOwkEjIR3sl4mKG7c X-Received: by 2002:a05:6808:1512:b0:3c3:6dc5:c1a1 with SMTP id u18-20020a056808151200b003c36dc5c1a1mr1992153oiw.41.1711019686539; Thu, 21 Mar 2024 04:14:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711019686; cv=pass; d=google.com; s=arc-20160816; b=uJaqpdn59IvjgZIAbhFwXNBvBEQX3PqMrhxDsDAVNe21Qb8aj8gSZ3qxP5vx1SDPoZ YOcldS8YFAUA4MqU2KvRi5LcEVEmidXYIvzwhn7GKToJ3MV4q/EhgG3tTN5cHid87Qe1 72ZdPNj7NOzZFhHmIV9s+W91BYeM1x26HCarkZwJELAbcCXs4tdOqkq+2HPLH7nWVSt0 Fp/ywrtxVVgdH0GM44YZxPMnZupZiBmX3vCWwOyjjXlYH9GtjfdbB60fxUVRyZdxyKmG ESi+bne+8s+glaO4mRLOaVICnuP6ZpjZOBTNFCDF5s/8xVJ8jcO5G25SyIuEtZa6HI9O 7zRw== 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=PZgjteYZjPIqcovfuObOTBO9g9JWVXJRhVH9eZyyius=; fh=VB0zLWcJHcVCx9ooleiQvfkeE/C63ypkfsdq7dQrK5s=; b=CVxGPfX505+mCFp1AWVJd2DHr0na/5iTJegp9ATrSeDyv/d/BfX88b4i6W7zhAqRkw 4GKgLCkSn6g7hZpXzjtlJkPGKrpSKK0hZnML0cpRe++tX/pVCdqh5PHY/mPp801mGetJ Z61dlQ1QWJHYWzMOHQqqhLOUEAra6YBQC2y4nndymUvWO0UGzv+bwlzhI648TW3XYqyU 4PyWISEKUVMSI9MeorgipN4gcpj7MN5tHWcxzBWGGB1DiMgezP85/Id9CNDm2sWemubj eqCdtZTbtA1gZkLEinc0RPG8bcd2X75ohutfDP+mBZfSXPe6wjUJzjrhd6ym2jBHatVb mHRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=SM2LfTqd; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-109930-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109930-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s9-20020a05620a080900b00789fe94d725si8799365qks.306.2024.03.21.04.14.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 04:14:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109930-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=SM2LfTqd; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-109930-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109930-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 456691C21283 for ; Thu, 21 Mar 2024 11:14:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1814460271; Thu, 21 Mar 2024 11:13:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="SM2LfTqd" 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 9FA725FF0E; Thu, 21 Mar 2024 11:13:16 +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=1711019598; cv=none; b=FX5sYsb3btdA4gsiN9cHV0DxuFlzBUbkPKZYW6MGeMKc0Y3erUJ4I52QUGsnWRKNUIMxvhJtLxLy5pFfSxfkZo0zTYUTfS/pfygFQ4AvP7Irkd6k8TFkEIBm2rAKjtf4GtlLIgkflK6aRyaEowldr9DP4DlNHvlxSAxQLarQfUw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711019598; c=relaxed/simple; bh=44YruKIFMTjc0cJLAC1iQg1GbtFM4OBpdvY6e1NRpRU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dMTE3ClKF0XcnJ2mcceIblk5gJiFuABBuLA6D/ihbtFhHK3hP8cnECxRtm74LWlcQOuUdK2m50AQZzfSmTSlPt6x89Oc5av74P8XxkgMOqM7fZYWrVx/oXXklMRoVI/pNy7nmowynL5q2C6ZW9ohK08HB8lQF8NuIO32M4o4d7c= 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=SM2LfTqd; 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.138]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5C26A7E9; Thu, 21 Mar 2024 12:12:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1711019567; bh=44YruKIFMTjc0cJLAC1iQg1GbtFM4OBpdvY6e1NRpRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SM2LfTqdemsZOTpaeS2hRoFb6OuXwSN7OB9Oz4BY03i8Wd+pob54j+3Ghhzmyvdwr l1aJFdhYV87ALyHTBPdITSrrflhS7Jwzyds9UGd+a59u2kiw6VFXp6nGhL9vhbSRaL 7DXnjOejWSMiOss0yzBSSyRtogzZ9Ak3J/KbgHVY= From: Umang Jain To: linux-media@vger.kernel.org Cc: Alexander Shiyan , Sakari Ailus , Kieran Bingham , open list , Umang Jain Subject: [PATCH v3 5/6] media: imx335: Fix active area height discrepency Date: Thu, 21 Mar 2024 16:42:38 +0530 Message-ID: <20240321111239.808735-6-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240321111239.808735-1-umang.jain@ideasonboard.com> References: <20240321111239.808735-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). Signed-off-by: Umang Jain --- drivers/media/i2c/imx335.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c index 7609dbc537b1..10a09830dbd6 100644 --- a/drivers/media/i2c/imx335.c +++ b/drivers/media/i2c/imx335.c @@ -247,13 +247,13 @@ static const int imx335_tpg_val[] = { }; /* Sensor mode registers */ -static const struct cci_reg_sequence mode_2592x1940_regs[] = { +static const struct cci_reg_sequence mode_2592x1944_regs[] = { {IMX335_REG_MODE_SELECT, 0x01}, {IMX335_REG_MASTER_MODE, 0x00}, - {IMX335_REG_WINMODE, 0x04}, - {IMX335_REG_HTRIMMING_START, 384}, + {IMX335_REG_WINMODE, 0x00}, + {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,15 +404,15 @@ 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 = { - .num_of_regs = ARRAY_SIZE(mode_2592x1940_regs), - .regs = mode_2592x1940_regs, + .num_of_regs = ARRAY_SIZE(mode_2592x1944_regs), + .regs = mode_2592x1944_regs, }, }; -- 2.43.0