media: intel/ipu7: psys: register bus before adding the psys device - #87
Open
thadeuk wants to merge 1 commit into
Open
media: intel/ipu7: psys: register bus before adding the psys device#87thadeuk wants to merge 1 commit into
thadeuk wants to merge 1 commit into
Conversation
The psys driver defines a custom "intel-ipu7-psys" bus_type, assigns it to the psys device (psys->dev.bus = &ipu7_psys_bus) and then calls device_register(), but it never calls bus_register() for that bus. Older kernels tolerated registering a device on an unregistered bus, but since Linux 7.1 bus_add_device() rejects it, so probe fails: bus_add_device: cannot add device 'ipu7-psys0' to unregistered bus 'intel-ipu7-psys' intel-ipu7-psys ipu7-psys0: psys device_register failed intel_ipu7_psys.psys intel_ipu7.psys.40: probe with driver intel_ipu7_psys.psys failed with error -22 As a result /dev/ipu7-psys0 is never created and the userspace camera HAL cannot open the psys device, breaking the camera on IPU7 platforms (e.g. Panther Lake with ov08x40) for every capture application. Register the bus in module init before registering the auxiliary driver, and unregister it on exit, by replacing module_auxiliary_driver() with explicit module_init()/module_exit() hooks. Link: intel#52 Link: intel#63 Link: intel#79 Signed-off-by: Thadeu Tucci <thadeutucci@gmail.com>
drzombey
added a commit
to drzombey/nix-dotfiles
that referenced
this pull request
Aug 7, 2026
Portiert aus dem Omarchy-Paket intel-ipu7-camera. Drei Dinge fehlten, die alle gleichzeitig stimmen muessen: 1. PSYS, also die Hardware-ISP. Der Kernel bringt in staging nur ISYS mit, das rohes Bayer liefert. Der out-of-tree-Treiber hat PSYS, aber registriert seinen Bus nicht - seit Linux 7.1 lehnt bus_add_device() das ab, das Probe scheitert mit -22 und /dev/ipu7-psys0 entsteht nie. Dafuer der Patch (upstream: intel/ipu7-drivers#87, noch offen). 2. Sensor-Stromversorgung. Auf PTL haengt der ov08x40 hinter usbio-i2c und wird ueber eine USBIO-GPIO versorgt, die die CVS-Firmware schaltet. Intels Default rgbcamera_pwrup_host=1 nimmt das Gegenteil an, der Sensor bleibt dunkel und I2C laeuft in -ETIMEDOUT. 3. Sensor-Erkennung. Ueber ipu_bridge traegt der Kernel bei PTL einen IVSC-Knoten (ACPI INTC10E1) zwischen Sensor und IPU in den fwnode-Graph ein. Ein v4l2-Subdevice dafuer registriert aber kein Treiber - intel_cvs macht nur Power und Ownership. Der Async-Notifier von ISYS wartet dann ewig und die HAL meldet "No sensors available". Deshalb BUILD_INTEL_IPU_ACPI=1: ISYS bekommt statische Plattformdaten und instanziiert den Sensor direkt. Darueber der Userspace-Stack (camera-bins -> camera-hal fuer ipu75xa -> icamerasrc) und v4l2-relayd, das das fertige Bild auf ein festes /dev/video50 legt. Die 32 rohen ISYS-Nodes sind per udev und WirePlumber ausgeblendet, damit Anwendungen nicht 32 tote Kameras anbieten. Sobald NixOS/nixpkgs#479283 gemergt ist, sollte hardware.ipu7.enable das hier ersetzen koennen. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Problem
On kernel 7.1 the IPU7 camera is unusable in every capture application. The
intel-ipu7-psysdriver fails to probe:As a result
/dev/ipu7-psys0is never created and the userspace camera HAL cannot open the psys device.Cause
ipu-psys.cdeclares a custombus_type ipu7_psys_bus, assigns it to the psys device (psys->dev.bus = &ipu7_psys_bus) and callsdevice_register(), but never callsbus_register()for it. Kernels <= 7.0 tolerated adding a device to an unregistered bus; since 7.1bus_add_device()rejects it.Fix
Register the bus in module init before registering the auxiliary driver, and unregister it on exit, by replacing
module_auxiliary_driver()with explicitmodule_init()/module_exit()hooks.Testing
Tested on Panther Lake (IPU7 / ov08x40, Dell XPS), kernel 7.1.3, out-of-tree DKMS build:
/dev/ipu7-psys0is created; kernel log showsIPU psys probe done.Fixes the camera regression reported in #79.