Commit 67d793c
authored
mipi_rx/isp: move MIPI_FS push from MIPI vsync IRQ to ISP FSTART (#199)
The original openipc_frame_ts MIPI_FS source (#155) unmasked the MIPI
controller's vsync IRQ and W1C-cleared the bit inside the ISR top
half. Empirically this desyncs the MIPI controller's row state
machine on V4 (gk7205v300/hi3516ev300, see #195) and on cv500/av300
under sustained 4K30fps load (IMX415 on hi3516av300_lite:
persistent magenta cast + intermittent `Timeout from venc channel 0`
in majestic).
#195 fixed V4 by gating the entire vsync block off — but that left
V4 without any MIPI_FS event source, regressing the feature for
that family. cv500's parallel block in
kernel/mipi_rx/hi3516cv500/mipi_rx_hal.c carried the same hazard.
Move the MIPI_FS push to the ISP front-end FSTART status bit
instead, mirroring the existing FEND push added in #178:
- kernel/mipi_rx/hi3516cv500/mipi_rx_hal.c drop the vsync block
- kernel/mipi_rx/hi3516cv500/mipi_rx_hal.h revert mask to pre-#155
- kernel/isp/arch/hi3516cv500/mkp/src/isp.c + MIPI_FS push on
isp_raw_int & FSTART
- kernel/isp/mkp/src/isp.c + MIPI_FS push on
u32IspRawIntStatus
& FSTART (V4 path)
The ISP front-end IRQ already fires twice per frame on these SoCs
(once with FSTART set, once with FEND set; both W1C-cleared by the
existing end-of-ISR ack). Edge-detect mirrors the FEND block above.
No MIPI controller mask changes, no W1C in atomic context.
cv200 retains its tasklet-deferred MIPI_FS push from #186 — its
ISP IRQ doesn't expose a separate FEND, and its vsync-equivalent
hook on VI_PT0_INT_FSTART has always been non-disruptive on V2/V2A.
Verified on hardware against this branch's build of opensdk
overlaid on the firmware nightly-20260527 master:
cv500 av300 IMX415 4K30 | luma stdev 0.03 | MIPI_FS 188 + FEND 188 / 3 s
V4 gk7205v300 IMX335 | luma stdev 0.01 | MIPI_FS 200 + FEND 201 / 3 s
V2A hi3518ev200 soi_f22 | luma stdev 0.14 | MIPI_FS 89 + FEND 0 / 3 s (cv200 HW lacks FEND, expected)
All three: 0 VENC timeouts in 90 s soak, 0 rt_mutex_trylock WARN.
Reported-by: OpenIPC/firmware users — V4 sibling regression #195,
V4A magenta cast on hi3516av300_lite (this PR), and
V2A AE-runaway #197 (separate cv200 sensor_i2c fix).
Closes: cv500/V4 MIPI_FS regression that #195 worked around by
disabling rather than rerouting.1 parent 073e6e8 commit 67d793c
4 files changed
Lines changed: 74 additions & 45 deletions
File tree
- kernel
- isp
- arch/hi3516cv500/mkp/src
- mkp/src
- mipi_rx/hi3516cv500
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6865 | 6865 | | |
6866 | 6866 | | |
6867 | 6867 | | |
| 6868 | + | |
| 6869 | + | |
| 6870 | + | |
| 6871 | + | |
| 6872 | + | |
| 6873 | + | |
| 6874 | + | |
| 6875 | + | |
| 6876 | + | |
| 6877 | + | |
| 6878 | + | |
| 6879 | + | |
| 6880 | + | |
| 6881 | + | |
| 6882 | + | |
| 6883 | + | |
| 6884 | + | |
| 6885 | + | |
| 6886 | + | |
| 6887 | + | |
| 6888 | + | |
| 6889 | + | |
| 6890 | + | |
| 6891 | + | |
| 6892 | + | |
| 6893 | + | |
| 6894 | + | |
| 6895 | + | |
| 6896 | + | |
| 6897 | + | |
| 6898 | + | |
| 6899 | + | |
| 6900 | + | |
| 6901 | + | |
| 6902 | + | |
| 6903 | + | |
| 6904 | + | |
| 6905 | + | |
| 6906 | + | |
| 6907 | + | |
| 6908 | + | |
6868 | 6909 | | |
6869 | 6910 | | |
6870 | 6911 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7938 | 7938 | | |
7939 | 7939 | | |
7940 | 7940 | | |
| 7941 | + | |
| 7942 | + | |
| 7943 | + | |
| 7944 | + | |
| 7945 | + | |
| 7946 | + | |
| 7947 | + | |
| 7948 | + | |
| 7949 | + | |
| 7950 | + | |
| 7951 | + | |
| 7952 | + | |
| 7953 | + | |
| 7954 | + | |
| 7955 | + | |
| 7956 | + | |
| 7957 | + | |
| 7958 | + | |
| 7959 | + | |
| 7960 | + | |
| 7961 | + | |
| 7962 | + | |
| 7963 | + | |
| 7964 | + | |
| 7965 | + | |
| 7966 | + | |
| 7967 | + | |
| 7968 | + | |
| 7969 | + | |
| 7970 | + | |
| 7971 | + | |
7941 | 7972 | | |
7942 | 7973 | | |
7943 | 7974 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2326 | 2326 | | |
2327 | 2327 | | |
2328 | 2328 | | |
2329 | | - | |
2330 | 2329 | | |
2331 | 2330 | | |
2332 | 2331 | | |
2333 | 2332 | | |
2334 | 2333 | | |
2335 | 2334 | | |
2336 | | - | |
2337 | | - | |
2338 | | - | |
2339 | | - | |
2340 | | - | |
2341 | | - | |
2342 | | - | |
2343 | | - | |
2344 | | - | |
2345 | | - | |
2346 | | - | |
2347 | | - | |
2348 | | - | |
2349 | | - | |
2350 | | - | |
2351 | | - | |
2352 | | - | |
2353 | | - | |
2354 | | - | |
2355 | | - | |
2356 | | - | |
2357 | | - | |
2358 | | - | |
2359 | | - | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
2363 | | - | |
2364 | | - | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
2368 | | - | |
2369 | | - | |
2370 | | - | |
2371 | | - | |
2372 | | - | |
2373 | | - | |
2374 | 2335 | | |
2375 | 2336 | | |
2376 | 2337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 18 | + | |
| 19 | + | |
24 | 20 | | |
25 | 21 | | |
26 | 22 | | |
| |||
0 commit comments