Skip to content

media: intel/ipu7: psys: register bus before adding the psys device#87

Open
thadeuk wants to merge 1 commit into
intel:mainfrom
thadeuk:psys-register-bus
Open

media: intel/ipu7: psys: register bus before adding the psys device#87
thadeuk wants to merge 1 commit into
intel:mainfrom
thadeuk:psys-register-bus

Conversation

@thadeuk

@thadeuk thadeuk commented Jul 9, 2026

Copy link
Copy Markdown

Problem

On kernel 7.1 the IPU7 camera is unusable in every capture application. The intel-ipu7-psys driver fails to probe:

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.

Cause

ipu-psys.c declares a custom bus_type ipu7_psys_bus, assigns it to the psys device (psys->dev.bus = &ipu7_psys_bus) and calls device_register(), but never calls bus_register() for it. Kernels <= 7.0 tolerated adding a device to an unregistered bus; since 7.1 bus_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 explicit module_init() / module_exit() hooks.

Testing

Tested on Panther Lake (IPU7 / ov08x40, Dell XPS), kernel 7.1.3, out-of-tree DKMS build:

  • /dev/ipu7-psys0 is created; kernel log shows IPU psys probe done.
  • Hardware-ISP capture works end to end (v4l2 + browser).
  • 0 psys HAL errors (previously every stream configuration failed).

Fixes the camera regression reported in #79.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant