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=1796552664; b=M3KywGVuduGVBmGsC8vTG8jBOs1dndJPisVoFKIu7Y54J9H1q/naJg1pFNAlVZogSt1B 1Ac7oBrJcmOnESeaJqCfotUYSy1W8zoWGPKZY3u5ePalpOMGIn0yLrR0mWjhmZh7iEl/K aCJq0043LarILYqVaXL3FFaRcGKu6sRB4SHwV0Q74GWsGqPNEZTl7BJB+OZktwydBqVjd obAZE1vPohzcJVKPIhKpJbNK9inW1UmKcBj+/tu2T8JoklQg0f3OHaG8wqzSLWFr4uNs2 jqzMi8qNTYpm/n9YAJ8OWZy4jc2UZ9sbMquFOKI0GrBQTRDFYsLMT3lmkD2H6ofVWdA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796552664; h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent: Subject:From:To:Cc:References:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=anjC6TiYuQc9tJRR49GWh8j4z/8BbwHzm3gDLi1W5jQ=; b=PPQLmeGQKIREuwt2XEYAiG5IbBPahTBHfsU5KcpQSKC2b3TSOkdeS0Njr35PgwyrUTEv FCk+GSx7nMc6oqgeJcnSbYOzfSuDScwmasaVc6f4kNoSbIucmttGLHkZT3nsMrQWx3WOf P+MKk20teWmFWbFE8im15Bt1VUvNyfN+inHvfuyiQqn+/YJ+5FePgyoDdHGv+lh1EDT70 nN4CppqyW1Cu4P8RlcvrUXMjYfzAqFLXl6vHumwQYSmSCbbt7X6TfwGSjQR+9RlfFAEMW 6R0g7I/BKtOeJUoyUwvVOg8DvwFI07yNZAl5orgZJP1GNAz5nbXSUWQ76Wo35oaC27w== 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=IkCTVCiG; 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 ECFE0606A31F; Sun, 6 Dec 2026 10:24:23 +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=IkCTVCiG Received: by smtp.kernel.org (Postfix) with ESMTPSA id F263D1F0093B; Sun, 6 Dec 2026 10:24:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796552663; bh=anjC6TiYuQc9tJRR49GWh8j4z/8BbwHzm3gDLi1W5jQ=; h=Date:Subject:From:To:Cc:References:In-Reply-To; b=IkCTVCiGU8B4vdYIDi3U6LoEXPgnQYw72W0kUPbZS/jGwu1HplMqaBmSNHkTHWraf Xly5Hxud5Nu0uaslp4X0nSMED5gPAhbg9npDwvvyP4qcgj4J2mJXhtxx8I5H/SICHw 3Draq0dWQV7NmOBGIvYfRscZUjEdOve1DmwnYgo0slVRJQHUfnVnimrSHBNv+lWsrz lkNeRBMrGkkKgMXvgMjBML26oetf6sac/LuFQiznaPzmZ0Tx43hBlwO683Umbn9M5v Uo06xce0JKzGP+w5MFUqpcBRer/3pfY7izHq89+XnC2+xkLLGqlkbNdXM/tWUEGQ5e /bZ8qzixxd2xw== Message-ID: <25a83b1f-e615-4dcf-bcf0-4e49e3d00e6b@kernel.org> Date: Sun, 6 Dec 2026 11:24:20 +0100 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] media: i2c: ov08x40: Do not expose the broken 1928x1088 binned mode From: Hans de Goede To: =?UTF-8?Q?Edvinas_=C5=A0ulcas?= , Pierre PINON , Sakari Ailus Cc: 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> <24f42252-43ee-429b-a70f-e13ecade1545@kernel.org> Content-Language: en-US, nl In-Reply-To: <24f42252-43ee-429b-a70f-e13ecade1545@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi All, On 30-Nov-26 15:15, Hans de Goede wrote: > 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 ? Sakari, it has now also been (re)confirmed that the binned modes on hi556 also are broken on some IPU6 laptops from HP, see: https://github.com/intel/ipu6-drivers/issues/202#issuecomment-7440464235 These are the same HP models which need the long handshake GPIO delays. I suspect these have an ivsc / cvs Intel chip with only the handshake GPIO connected (or at least only that GPIO described in ACPI). So that this is the same issue. But here a fix at the ivcs driver level cannot work since the ivcs is not described in the ACPI tables. Which brings me back to my suggestion to just disable binned modes with #ifndef CONFIG_X86 ... #endif on some sensor drivers. For the HP case this is the only way how I see we can fix this. Regards, Hans > > Regards, > > Hans