The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Hans de Goede <hansg@kernel.org>
To: "Edvinas Šulcas" <edvinas.sulcas@gmail.com>,
	"Pierre PINON" <pierre@pinon1.fr>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Jason Chen <jason.z.chen@intel.com>,
	Jimmy Su <jimmy.su@intel.com>,
	linux-media@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] media: i2c: ov08x40: Do not expose the broken 1928x1088 binned mode
Date: Mon, 30 Nov 2026 15:15:10 +0100	[thread overview]
Message-ID: <24f42252-43ee-429b-a70f-e13ecade1545@kernel.org> (raw)
In-Reply-To: <20261017132953.45183-1-edvinas.sulcas@gmail.com>

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 <edvinas.sulcas@gmail.com>
> 
> 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



      reply	other threads:[~2026-11-30 14:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 13:46 [PATCH 2/2] media: i2c: ov08x40: Do not expose the broken 1928x1088 binned mode Pierre Pinon
2026-09-08  9:41 ` Sakari Ailus
2026-09-09 10:32   ` Zhang, Qingwu
2026-09-10  6:28     ` Su, Jimmy
2026-09-10  7:06       ` Sakari Ailus
     [not found]         ` <DM4SPRMB009141D91C6DCF0987A28C5A9DBF2@DM4SPRMB0091.namprd11.prod.outlook.com>
2026-09-10  7:52           ` Sakari Ailus
2026-09-12 10:16 ` Sakari Ailus
2026-10-02  6:26   ` Pierre PINON
2026-10-17 13:29     ` Edvinas Šulcas
2026-11-30 14:15       ` Hans de Goede [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24f42252-43ee-429b-a70f-e13ecade1545@kernel.org \
    --to=hansg@kernel.org \
    --cc=edvinas.sulcas@gmail.com \
    --cc=jason.z.chen@intel.com \
    --cc=jimmy.su@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=pierre@pinon1.fr \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox