Skip to content

media: i2c: imx500: keep chip active while network firmware is loaded#7323

Merged
naushir merged 2 commits intoraspberrypi:rpi-6.18.yfrom
naushir:rpi-6.18.y
Apr 21, 2026
Merged

media: i2c: imx500: keep chip active while network firmware is loaded#7323
naushir merged 2 commits intoraspberrypi:rpi-6.18.yfrom
naushir:rpi-6.18.y

Conversation

@naushir
Copy link
Copy Markdown
Contributor

@naushir naushir commented Apr 21, 2026

No description provided.

@naushir naushir force-pushed the rpi-6.18.y branch 2 times, most recently from d5d6619 to 13d4d2a Compare April 21, 2026 08:15
Comment thread drivers/media/i2c/imx500.c Outdated
naushir added 2 commits April 21, 2026 12:03
…loaded

Hold a pm_runtime reference for the lifetime of imx500->fw_network.
The reference is taken in imx500_set_ctrl() before kernel_read_file_from_fd()
and released in imx500_clear_fw_network() on vfree. This prevents
the autosuspend from racing the read (kernel oops in __memcpy) and from
silently dropping the rpk before stream-on.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
The pm_runtime reference is held for as long as imx500->fw_network is
populated.  This means the cached rpk (plus the pm reference that blocks
autosuspend) is present in the device state past userspace closing the
subdev fd, until the next VIDIOC_S_CTRL cleared or replaced it.

Add a .close internal op that calls imx500_clear_fw_network() when the
last userspace handle on the subdev is released.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
@naushir
Copy link
Copy Markdown
Contributor Author

naushir commented Apr 21, 2026

@roliver-rpi do you want to have a quick scan through this fix when you can. I'd like to merge it in shortly.

@roliver-rpi
Copy link
Copy Markdown
Contributor

@roliver-rpi do you want to have a quick scan through this fix when you can. I'd like to merge it in shortly.

Looks fine to me.

@naushir naushir merged commit e63eeee into raspberrypi:rpi-6.18.y Apr 21, 2026
11 of 12 checks passed
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Apr 21, 2026
kernel: drm/panel: st7701: Add missing bus_flags configuration for HyperPixel2.1 Round
See: raspberrypi/linux#7298

kernel: media: i2c: imx500: keep chip active while network firmware is loaded
See: raspberrypi/linux#7323
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Apr 21, 2026
kernel: drm/panel: st7701: Add missing bus_flags configuration for HyperPixel2.1 Round
See: raspberrypi/linux#7298

kernel: media: i2c: imx500: keep chip active while network firmware is loaded
See: raspberrypi/linux#7323
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.

3 participants