Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp407045lqc; Fri, 8 Mar 2024 00:35:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXOX9eYx+hpIvRNlLC0WYm6F7vLEJBMc0ZISHTUGAGNyu3sqRURvVtwN93AYLWUyX+vrnAk/Hl8AN2/CYfzRPedIfTiUepwtjWbJWgGOQ== X-Google-Smtp-Source: AGHT+IH2Mg8xuh1gjP10XAlJNV4QMUaEHdcHtQa1sEOxfLb8AXarRM7jWtvd30+TZproU2W36JlG X-Received: by 2002:a05:6808:1c4:b0:3c2:17b0:df0e with SMTP id x4-20020a05680801c400b003c217b0df0emr8587365oic.53.1709886903986; Fri, 08 Mar 2024 00:35:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709886903; cv=pass; d=google.com; s=arc-20160816; b=QfeZgzVnfTtI0ykBNeiCbMgqfjLNMg1x5mf632hBD4LKjm3bHdCYHauC7v2spu4LLZ iFt7EYVaHiCQdKnFeU20NM6K/UPEtinzwzMN4rsnXtrWM0J1Ul0nbC/bDHR917rw8Qf0 bfNMUNJ6yvGh9JRL/yLkdWhLjA4MKJMsa5dICTVAVnw5+14tNDu98+bcDIA+Pn4RsDTu epCZRF+fyrGJaCEwzvCxiJddXfzTL4goWrm+9gB9qvARdA5aY7eB5qhCjjbX/7oiiyCC sQKL6NNZvrSaVw9CFbbRAEnByL5TIuLYK1DImOD+BCxVV/ETO8GpUIbJxsUn6Q5yO58U n09A== 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=iQqHBWY5k2RkN083V0GeG9yK1vioLOanbXKIkF/SXM4=; fh=oMnFP44GZn5KSs5vtdAIvSX6p76oFoh48gPvpU1naKQ=; b=zVAy8QgiNl+2oqnhNlfdGtPd3begQ/QF2jV1Kzy5nI/mgyxEW6r5Q2MmbMZK2Ha67M eBdo2dhjjRcD90cuCfXeSbhKD8BrADHhKJj6H+d0xK9VZ7U22sB60UJXe/Ac3gL5yaTO JIcbBsOr2Kt+rB/I+vv+53yj+QPDMlQQJH3l7YE4yjjsfA5p4VjU7dFUt4NTGS8TBaiJ RcC/I3ggB+UiTpm2gDAWpY8VIeL3EXQp3gvLBQQXm2OrRxwPdNWI+cU+k3zpLB9YtIWe 4W4HsGpIPBf2347LIievX2G4PTlOI+YWH8D7QlUSb5WV1sFAtxPqxpwL7Vw5u2E0YUBm eZXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=sm6PajLX; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-96659-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96659-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n68-20020a632747000000b005e49cd906d6si3849526pgn.97.2024.03.08.00.35.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 00:35:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96659-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=sm6PajLX; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-96659-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96659-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 A5F66284A55 for ; Fri, 8 Mar 2024 08:35:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E3DD535DA; Fri, 8 Mar 2024 08:33:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="sm6PajLX" 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 4C1735339F; Fri, 8 Mar 2024 08:33:39 +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=1709886821; cv=none; b=iW/bytEw5cY5qtdmYbrgQLBVvBkoik7HuBcInZYt8CTwMd8lsswnsnG9bgxB8a9NnKd3/scbYPV/s9FhisJ9LhiPbSEodEP/zci/lEG73jpYDnvhSAtKFu7uT3X48Xp3XgnsNB16ltmmES41u98whXuZsxNhS92xQkKe6OD0/p8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709886821; c=relaxed/simple; bh=MlRH48ZF04z/HajcQIgfxmck3RSeXWbjOHzpdkvshzg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JKMkTb95yozcs/3Nr/GjRBgFekyfuNj5hwVJ/lwyMyY/ozTXzYGjvQoNeOwI1g+oN6x3VL6lXncLuOxAfG9e2fuwFSfJK8V6WALRAq9LDvuf1KqUMbyT3E65/6TpxMrd+ulxL71gbJiCdXtlUxOkd5YChz2xvvemCcTQY6LwMow= 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=sm6PajLX; 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.70]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7067A82A; Fri, 8 Mar 2024 09:33:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1709886800; bh=MlRH48ZF04z/HajcQIgfxmck3RSeXWbjOHzpdkvshzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sm6PajLX7Ehsy1eJsKoSLZV1JazeFW0W7ZUY/zDaxAD3VIMNkTp1/DFFK9KSuYaK2 B9HRJDRWAnu5yIGBuH0mnx8HFxLyiTUsUUA5SWJG/vEG91DM12WQOjORv+WEwahcPz 9f0N6VZbkRl6xVNBVOCCxLU2KoK6ndQI8pynnJkU= From: Umang Jain To: linux-media@vger.kernel.org Cc: Alexander Shiyan , Kieran Bingham , Sakari Ailus , open list , Dave Stevenson , Umang Jain Subject: [PATCH v2 5/6] media: imx335: Fix active area height discrepency Date: Fri, 8 Mar 2024 14:03:11 +0530 Message-ID: <20240308083312.90279-6-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240308083312.90279-1-umang.jain@ideasonboard.com> References: <20240308083312.90279-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 3c593538f727..85cb53e3d5d4 100644 --- a/drivers/media/i2c/imx335.c +++ b/drivers/media/i2c/imx335.c @@ -246,13 +246,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}, @@ -403,15 +403,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