Skip to content

media: rp1-cfe: Fix oops on stream start error when FE is disabled - #7812

Open
rudy-07 wants to merge 1 commit into
raspberrypi:rpi-6.18.yfrom
rudy-07:fix/rp1-cfe-start-streaming-oops
Open

rudy-07 wants to merge 1 commit into
raspberrypi:rpi-6.18.yfrom
rudy-07:fix/rp1-cfe-start-streaming-oops

Conversation

@rudy-07

@rudy-07 rudy-07 commented Nov 30, 2026

Copy link
Copy Markdown

In cfe_start_streaming(), the err_disable_cfe error path calls cfe_stop_channel(node, true) unconditionally. When the PiSP Front-End is not enabled (cfe->fe_csi2_channel == -1), csi2_stop_channel() writes to CSI2_CH_CTRL(-1) and causes a kernel paging fault if stream start fails (for example, when the sensor's s_stream(1) returns an error or lane count validation fails).

Pass is_fe_enabled(cfe) instead of true, matching cfe_stop_streaming() and cfe_suspend().

Closes: #7398

In cfe_start_streaming(), the err_disable_cfe error path calls
cfe_stop_channel(node, true) unconditionally. When the PiSP Front-End
is not enabled, cfe->fe_csi2_channel is -1, so csi2_stop_channel()
indexes CSI2_CH_CTRL(-1) and triggers a kernel paging fault.

Pass is_fe_enabled(cfe) to cfe_stop_channel() instead, matching
cfe_stop_streaming() and cfe_suspend().

Closes: raspberrypi#7398
Signed-off-by: rudy-07 <kanhaiffco2007@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.

Oops in rp1-cfe after error in v4l2 csi-2 sensor s_stream callback

1 participant