From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=168.119.41.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796200812; b=rC3NdG9n/hJZx1pb9zfJY+EfHj/U286kSjypILurTPyIx/ynF+5NSxQMcaqP7DP9e7u4 oGn7K9apwgvoDh4uupWmTXRfwNcJTc4sM8mnOOb/XOAXz89b9xC/cUGBi6rrtfelJZhjy 8GPIahu/RD+742t5Wa1CTzwb9jIHoMG582wfXzS935VLXtkxcKU+sVvlCcULV5Mx6h9ZS 3fgb9C9nQsGIGG/xCZSiS+ybZlN1/AI3MZxeqmn0bmQwaa9Vx6GYI3p8JydeI/5EgFCwe 94ekzLycMg0ddWrwm5/cwRbAo3/H2etvNY1CZhEVK8cUP3zVAjDbx/isLe+HDg+1FFQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796200812; h=DMARC-Filter:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer:X-Spam-Score:X-Spam-Bar:X-Spam-Report; bh=MPTiBmWcYoOVGPioPYk1NMX73yD6oL/8uSc3//NToX8=; b=zgDJ25lmEHIbGkyWVLyV4avJM8bDBYVJEBQd7qhyrponlFaljyDZbESUtARKkKYhwD7G oB0pfE7I59tLNB6tP8Q+1LOemimAlljaon44LZp0zUoGFytig+jXiuubYnI67PfXHgEEg ScBEuzD+xaJeHHaPgqYDGTnyVsh/bju9qNQWeaH3LpQmDRqalxtUPsTSsXytOby7SxSM4 xsvntncbF7QKrfYRQgxOXMmOXWhF1IBsivipK4IlfUdyqnOzc154IFSUQ4woYoUDA+RW+ cJOKT0o9tldRXzRLw+hvUcgS4ioalFymaAaqZy37mTPJmukt7ueKF6PqIQYl36kFSDA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=emfend.at; spf=pass smtp.mailfrom=emfend.at; dkim=pass header.d=emfend.at header.i=@emfend.at header.a=rsa-sha256 header.s=mail header.b="faHW/SOF"; arc=none smtp.remote-ip=168.119.41.54 Received: from lx20.hoststar.hosting (lx20.hoststar.hosting [168.119.41.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7984A606A329; Wed, 2 Dec 2026 08:40:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7984A606A329 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=emfend.at Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=emfend.at Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=emfend.at header.i=@emfend.at header.a=rsa-sha256 header.s=mail header.b=faHW/SOF DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=emfend.at; s=mail; h=Cc:To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MPTiBmWcYoOVGPioPYk1NMX73yD6oL/8uSc3//NToX8=; b=faHW/SOFjBmHXElAP0/YvUnmj7 V3yn3+/CRwCosVa2TIMvQIh32fvKYRQk5UShbfnRGK50TWHmbOFuPMQnV1kWU+jdeZ6an1GBPBFlB A8eJXRAfm84jOXIKq60F3+fuitsu70XvbZrw4wrwqlAafmbl8ZwFdCJ9UNfbtklLo4Rw=; Received: from 194-208-226-106.tele.net ([194.208.226.106]:49300 helo=[127.0.1.1]) by lx20.hoststar.hosting with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1xYfsh-000vbM-3V; Wed, 02 Dec 2026 09:40:03 +0100 From: Matthias Fend Date: Wed, 02 Dec 2026 09:40:01 +0100 Subject: [PATCH 2/3] media: i2c: ov08d10: fix vertical blanking X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261202-ov08d10-ctrl-fixes-v1-2-778dc83babdd@emfend.at> References: <20261202-ov08d10-ctrl-fixes-v1-0-778dc83babdd@emfend.at> In-Reply-To: <20261202-ov08d10-ctrl-fixes-v1-0-778dc83babdd@emfend.at> To: Sakari Ailus , Jimmy Su , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Matthias Fend X-Mailer: b4 0.14.2 X-Spam-Score: -1.0 X-Spam-Bar: - X-Spam-Report: Spam detection software, running on the system "lx20.hoststar.hosting", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: According to the datasheet, the exposure register is simply in units of half lines. The previous, more complex calculation was only approximately correct in the full resolution modes (+3.4%) and far o [...] Content analysis details: (-1.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address 0.0 KAM_DMARC_STATUS Test Rule for DKIM or SPF Failure with Strict Alignment (older systems) 0.0 Local_hs_NotFromHoststar Sender is NOT hoststar.(ch|at|com) 0.0 Local_hs_NotToHoststar Recipient is NOT hoststar.(ch|at|com) Previously, the vblank value was written unchanged to the dummy line registers. But according to the datasheet, these registers are in units of half lines and are added to the minimum VTS of the mode. Measurements and register readouts show that the sensor applies them in steps of 4 lines only. As a result, the frame rates were wrong. For example, a frame duration of 33333 us resulted in 30.38 fps at 3280x2460, and the default VTS of 3736 lines in the 1632x1224 mode resulted in 30.03 fps instead of 20.16 fps. As vts_min was equal to vts_def, the 1632x1224 mode was also limited to 30 fps instead of 60 fps. Set vts_min to the actual minimum VTS of each mode, set the dummy line registers correctly and set the VBLANK step to 4, to which OV08D10_VTS_MAX is aligned as well. Set the default VTS of the 1632x1224 mode to 2508, which keeps its previous default frame rate of ~30 fps. Fixes: 7be91e02ed57 ("media: i2c: Add ov08d10 camera sensor driver") Signed-off-by: Matthias Fend --- drivers/media/i2c/ov08d10.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/media/i2c/ov08d10.c b/drivers/media/i2c/ov08d10.c index 22eee655b52628f162810c1b38607b6b25e7f0e6..4a6ec91d0b9f60501882a4458ca15d3ef90df996 100644 --- a/drivers/media/i2c/ov08d10.c +++ b/drivers/media/i2c/ov08d10.c @@ -31,7 +31,8 @@ /* vertical-timings from sensor */ #define OV08D10_REG_VTS_H 0x05 #define OV08D10_REG_VTS_L 0x06 -#define OV08D10_VTS_MAX 0x7fff +#define OV08D10_VTS_MAX 0x7ffc +#define OV08D10_VBLANK_STEP 4 /* Exposure controls from sensor */ #define OV08D10_REG_EXPOSURE_H 0x02 @@ -654,8 +655,8 @@ static const struct ov08d10_lane_cfg lane_cfg_2 = { .width = 1632, .height = 1224, .hts = 1912, - .vts_def = 3736, - .vts_min = 3736, + .vts_def = 2508, + .vts_min = 1252, .reg_list = { .num_of_regs = ARRAY_SIZE(lane_2_mode_1632x1224), .regs = lane_2_mode_1632x1224, @@ -827,9 +828,12 @@ static int ov08d10_set_exposure(struct ov08d10 *ov08d10, u32 exposure) static int ov08d10_set_vblank(struct ov08d10 *ov08d10, u32 vblank) { struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd); + const struct ov08d10_mode *mode = ov08d10_get_mode(ov08d10); u8 val; int ret; + vblank = (mode->height + vblank - mode->vts_min) * 2; + /* CIS control registers */ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x01); if (ret < 0) @@ -1016,8 +1020,8 @@ static int ov08d10_init_controls(struct ov08d10 *ov08d10) ov08d10->vblank = v4l2_ctrl_new_std(ctrl_hdlr, &ov08d10_ctrl_ops, V4L2_CID_VBLANK, vblank_min, - OV08D10_VTS_MAX - mode->height, 1, - vblank_def); + OV08D10_VTS_MAX - mode->height, + OV08D10_VBLANK_STEP, vblank_def); h_blank = to_pixels_per_line(ov08d10->priv_lane->link_freq_menu, mode->hts, mode->link_freq_index, @@ -1225,8 +1229,8 @@ static int ov08d10_set_format(struct v4l2_subdev *sd, vblank_def = mode->vts_def - mode->height; __v4l2_ctrl_modify_range(ov08d10->vblank, mode->vts_min - mode->height, - OV08D10_VTS_MAX - mode->height, 1, - vblank_def); + OV08D10_VTS_MAX - mode->height, + OV08D10_VBLANK_STEP, vblank_def); __v4l2_ctrl_s_ctrl(ov08d10->vblank, vblank_def); h_blank = to_pixels_per_line(ov08d10->priv_lane->link_freq_menu, mode->hts, -- 2.34.1