media: i2c: imx500: keep chip active while network firmware is loaded#7323
Merged
naushir merged 2 commits intoraspberrypi:rpi-6.18.yfrom Apr 21, 2026
Merged
media: i2c: imx500: keep chip active while network firmware is loaded#7323naushir merged 2 commits intoraspberrypi:rpi-6.18.yfrom
naushir merged 2 commits intoraspberrypi:rpi-6.18.yfrom
Conversation
d5d6619 to
13d4d2a
Compare
pelwell
reviewed
Apr 21, 2026
…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>
Contributor
Author
|
@roliver-rpi do you want to have a quick scan through this fix when you can. I'd like to merge it in shortly. |
Contributor
Looks fine to me. |
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
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.
No description provided.