From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796048113; b=4/wQldTir1AkKySXIcNRauxK/Oz7JUqJ8S6WyJOvVSjPlJS8YW9sOzE2Z8eciiyuusqH L3eq84RMHe7yMUnXct3v/mtAGJEbbSfIO/8Tmc6SS91ju0r984xPuKw88ugnjZS3dPkN7 vxvl/9EFZXjj+IRT/KSQtzBDcJCW4jw6/N0q/jDTC4xVWFUFd0EMvkQUpcUnHc0vu9J1Y n3e9+wzbAHbTULbopnTMGqhpWBrRNy9DwK7YghCezpBINK3gY087Pf12cVf5oPIKgjS55 VtnDLa437HXhRqAVxNkI5qutcbnbSRmg+HlQ00WAl/ENiINDFEnFYWTiD5jM3BB8Xxw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796048113; h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=els5qCweDoLYW54PxLmemMjeOYDTaZLCyRSg/1MH+HU=; b=csaqVCSjT7Ynr+yGYmmhN0PWuZ5PGozYTL9gjX1EbyrsK2/pv42TwrrO8xCP7T95OjNR Jof6B4VQC5krfU/jP8ldFSoOjRknf7cg6xr/Q9btqTxzr3iWG6QEIxuDHnl7Qc3WpHcrQ 5ErIMLSIJAmKeqGmIOXcdnIobLpNzVv7smjfCv9yZxV3s0JK0bzpfQRDXmxXubk2VPuVN A83Fbq6/GVIL5moZ/tOeNhwrfe8KShavbBf3Ffv3LjmU+unbRT38hfGCHxJnQBdcbGnFw taWbbKVzGnXiMN3vG2Pi139pIpSNzQxJ98lwVf5RU1eZo+hM03vIg2WaDhgdg13zanw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=G8LpMg9p; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7127F606A31C; Mon, 30 Nov 2026 14:15:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=G8LpMg9p Received: by smtp.kernel.org (Postfix) with ESMTPSA id B32B71F0089B; Mon, 30 Nov 2026 14:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796048113; bh=els5qCweDoLYW54PxLmemMjeOYDTaZLCyRSg/1MH+HU=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=G8LpMg9pVhYCDOLiO7ka8xqXIw3JkbYu52NafpDccQt5cRQOtP/bVfxembBzGeIIx zujy1Xg5WUMMN86ynCw/YNq80lJWKj/Xgw42Jj/eR3ZE4yS56MBmTsZtRfSrJa9qEI Wf1iZsUk6d7bXUyDBy7oXUP42iMxkNkNSjNEDsbW0hkF/xfikp1y3u4MsxpDHJQ8xr ZCn6AgI1a7aWIyLwOHD9A9bdDbQhja4Wq9LfC/P8En45XeTLSXtFHbGr8rdjtuq7/H na2vksXdAkeSvkUuhO3JYenzM7xhcvu7ZB86TiTvsLc2tBQYhlryGArmBS82PnTGD5 SOgWXmeVoTNbg== Message-ID: <24f42252-43ee-429b-a70f-e13ecade1545@kernel.org> Date: Mon, 30 Nov 2026 15:15:10 +0100 X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] media: i2c: ov08x40: Do not expose the broken 1928x1088 binned mode To: =?UTF-8?Q?Edvinas_=C5=A0ulcas?= , Pierre PINON Cc: Sakari Ailus , Jason Chen , Jimmy Su , linux-media@vger.kernel.org, Mauro Carvalho Chehab , linux-kernel@vger.kernel.org References: <20261017132953.45183-1-edvinas.sulcas@gmail.com> From: Hans de Goede Content-Language: en-US, nl In-Reply-To: <20261017132953.45183-1-edvinas.sulcas@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi, On 17-Oct-26 15:29, Edvinas Šulcas wrote: > Hi, > > I can confirm this on a second CVS machine, and I think the data > supports what Jimmy wrote about CVS and Sakari's suggestion to deal > with it on the CVS side. > > Machine: Dell XPS 14 DA14260 (Panther Lake), OV08X40 (OVTI08F4) behind > the CVS chip (ACPI INTC10E1, USB 06cb:0701), 2 data lanes. Ubuntu > 7.0.0-38-generic with the in-tree intel_ipu7 and ov08x40 (the latter > built out of tree from v7.0 for the tests), intel_cvs from > intel/vision-drivers at 845d6f8. > > - 1928x1088 (2 lanes, 749 MHz link frequency): the kernel logs "error > group 3 code 18 details [0 0]" about twice per frame, which is > INSYS_MSG_ERR_CAPTURE_HW_ERR_BAD_FRAME_DIM as Pierre found. A raw > dump with libcamera's raw stream (stride 3904 bytes) has data only in > line 0 (samples 42-90); the other 1087 lines are entirely 0xffff. > Pierre saw the first and the last line; my buffer has 1088 lines, so > a 1089th line would not fit. In the 3856x2176 mode all 2176 lines > carry data and there are no errors. > > - It does not depend on the extra registers of the binned list. That > list writes about 110 registers the 3856x2176 list never touches > (0x3a1a-0x3b06, 0x4911-0x497f, 0x49e0-0x49f1) and differs in 0x4501, > 0x4542, 0x3894 and 0x5000/0x5001. With a debug parameter that drops > each group alone, all of them, and with 0x4501/0x4542 forced to the > full-mode values, 20 captured frames at 1280x720 gave the same number > of errors (43 or 44) in every case. That fits Jimmy's description > that CVS only handles 1928x1088 as sHDR while the driver programs it > as linear: changing details of the linear programming does not help. > > - It is not CPU frequency either (all CPUs at 4.3 GHz instead of > 400 MHz while capturing, the idea from libcamera issue #328): same > errors. > > - Pierre's patches 1/2 and 2/2 applied to ov08x40.c from v7.0 (2/2 with > fuzz 1) work here: 640x480, 1280x720, 1920x1080 and 3840x2160 all run > at 28.6 fps with zero ISYS errors, and libcamera no longer complains > about the missing crop rectangles. I have been using it in video > calls. For patch 2/2 as posted: > > Tested-by: Edvinas Šulcas > > Oleg's report that the mode streams fine on a Yoga Slim 7x without a > vision chip in between points the same way: the mode itself works, it > is the combination with CVS that does not. Hiding it unconditionally > would take a working mode away from boards without CVS. So I think the > better place is on the CVS side, as Sakari suggested: either only make > the mode unavailable when the sensor is behind CVS (for example the > CVS driver restricting the sizes a sensor may use), or program the > sHDR variant of 1928x1088 for that case, which I cannot do without > documentation of the sensor's sHDR setup. Until one of these exists, > 2/2 is a fine workaround for the affected machines. > > I can test patches or run experiments on this machine, for example > logging the ISYS CSI-2 frame/line counts with dyndbg, or trying a > larger minimum size from the CVS driver. I can also send the lsusb > output if useful. So it looks like this is not going anywhere (wrt finding a solution for this) and in the mean time more and more x86 laptop users are being bitten by this, see .e.g: https://bugzilla.redhat.com/show_bug.cgi?id=2415297 At this point I think it would be best to disable the non max-resolution modes but on x86_64 only. So basically wrap the lower-res/binned modes in a: #ifndef CONFIG_X86 #endif pair with a short comment explaining te problem + a link to this kernel thread. This then would need to be done with both the hi556 and ov08x40 drivers, since there are bug reports for both not working when a binned mode is selected on some x86_64 devices. Doing this might cause problems for the out of tree proprietary IPU6 psys support, but with that being out of tree I consider that not a problem, while the current status quo is hurting mainline kernel users. Sakari would wrapping #ifndef CONFIG_X86 .. #endif around the trouble- some modes be an acceptable solution to you ? Regards, Hans