Repository navigation
media: i2c: ov5693: Gate the MIPI clock lane for IPU6 Surface front cameras - #180
Open
loisBreant wants to merge 1 commit into
Open
loisBreant wants to merge 1 commit into
loisBreant wants to merge 1 commit into
Conversation
…ameras On the IPU6 Surface devices (Pro 8, Pro 9, Go 4) the front ov5693 starts streaming but the IPU6 CSI-2 receiver never gets a frame: the receiver needs the sensor to gate its clock lane when idle (non-continuous clock), which the driver never configures. Set MIPI_CTRL00 (0x4800) bit 5 (clock lane gate) before stream-on when the endpoint is non-continuous. As this kernel's ipu-bridge does not set "clock-noncontinuous" yet, also enable it for the OVTI5693 HID, which is only used on IPU6 Surface devices. Only that bit is touched; the clock_ncont module parameter can force it on or off. This follows the approach of the upstream series "media: Enable the OV5693 front camera on IPU6 Surface devices" (in media next), which gates bit 5 only. Linux-surface PR #2171 writes the whole register (0x2d) on 6.19 instead. Tested on a Surface Pro 9 (i7-1255U, IPU6 8086:465d), 7.2.11-surface-1, Ubuntu 24.04, libcamera 0.7.2 software ISP: 2592x1944 at 28.6 fps, no CSI-2 errors while streaming, 28.6 fps delivered in Chrome through v4l2loopback. Without the change no frame is received. Developed with the help of an AI assistant (Claude); tested on hardware. Link: https://patchew.org/linux/20260717132021.18034-1-fernandorimoli11@gmail.com/ Link: linux-surface/linux-surface#2171 Link: https://github.com/loisBreant/surface-pro-9-camera Patchset: cameras Signed-off-by: Lois Breant <185382558+loisBreant@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Surface Pro 8 (IPU6 Tiger Lake, I tested Fernando Rimoli's series at v5 on this machine. It gates only bit 5 of One thing to watch when testing on the Pro 8: here, the first capture after a cold boot often succeeds even without any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The front camera of the IPU6 Surface devices (Pro 8, Pro 9, Go 4) still does not stream on the 7.2 kernels. The
ov5693driver starts the sensor, but the IPU6 CSI-2 receiver never gets a frame.This sets
MIPI_CTRL00(0x4800) bit 5 (clock lane gate) before stream-on when the link is non-continuous. Because this kernel'sipu-bridgedoes not setclock-noncontinuousyet, it is also enabled for theOVTI5693HID, which only appears on IPU6 Surfaces. Only that bit is changed, and aclock_ncontmodule parameter (-1auto,0,1) can force it either way.Relation to other work
next), which also gates bit 5 only. Once that series reaches a release, this commit can be dropped in favour of a backport, which moves the decision intoipu-bridgeper IPU PCI ID. I can prepare that backport if you prefer it now.0x2d). This PR targets 7.2, where nothing fixes it yet.Testing: Surface Pro 9 (i7-1255U, IPU6
8086:465d),7.2.11-surface-1, Ubuntu 24.04, libcamera 0.7.2 software ISP:MediaStreamTrack.stats)On this branch's
ov5693.c(identical to 7.2.11-surface-1's), the result builds to exactly the same machine code as the module I have been running (samesrcversion, identical disassembly).The full userspace setup for the Surface Pro 9 (libcamera, v4l2loopback, browser support) is documented in https://github.com/loisBreant/surface-pro-9-camera.
Transparency: I developed this with the help of an AI assistant (Claude). It was built, run and verified on real hardware, and the kernel change was reviewed separately for safety before I used it.