fix(imx296): FT N-1/绿线/#1016 UV/#1017 Y 尾修补与 procfs 门闩(#2026082001) - #14
Open
OKayJH wants to merge 21 commits into
Open
fix(imx296): FT N-1/绿线/#1016 UV/#1017 Y 尾修补与 procfs 门闩(#2026082001)#14OKayJH wants to merge 21 commits into
OKayJH wants to merge 21 commits into
Conversation
Track fast-trigger mode across CIF so RKISP can identify IMX296. Finish V39 buffers at the last observable line. Delay vb2_done until tail DMA has drained. Restore full-frame ROI registers. Drain the invalid ROI frame during the free-run restart. Drop diagnostic and timing experiments from the production fix. Signed-off-by: OKayJH <okayjhh@gmail.com>
Cache the firmware PWM period instead of mutable runtime state. Recompute the period from the base period. Include the current pulse width and safety margin. Apply the disabled PWM state when trigger_pulse_us changes. This restores trigger rate after long-to-short exposure without reboot. Signed-off-by: OKayJH <okayjhh@gmail.com>
OKayJH
force-pushed
the
fix/imx296-fast-trigger-n1-pwm-period
branch
from
July 22, 2026 04:12
8f5e7c6 to
2c9b30b
Compare
- build_bootimg.sh:配置/编译/打包命名镜像 + 自动 bump - scripts/dlcvcam_verify_bootimg.py:整包 SHA 与 FIT 内嵌 hash - 手册:编包与烧录前校验;防砖改外链 u-boot / CamOS Admin - gitignore:本地 bad_packages 与镜像 sidecar boot-try 用户态与 recovery sync 不在本仓(见 u-boot tools/dlcvcam、Admin)。 Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Monitor↔trigger green bottom lines and full green frames after ROI come from two residual races on top of the N-1 early-done path: 1. The 50 ms tail-DMA hrtimer can fire after the next SOF and complete the wrong buffer. Stamp the armed SOF, drop late timers, cut the default drain to 2 ms, and clear wait_line/OUT_FRM_HALF when leaving fast-trigger so free-run restarts do not keep early-done. 2. Fast-trigger leaves the MIPI frame open until the next XTRIG. Emit a light-free dummy pulse before stream-off / leave-FT, drain the datasheet ROI invalid frame on free-run and FT stream-on, and keep GAINDLY in sync on hot mode_switch. Board flashed with build 2026080501 for validation.
交付物收敛为 boot.img / boot-rk3576-*.img 与整包 .sha256。 FIT 内嵌 hash 仍由 verify 检查;JSON 清单不再生成。
IMX296 fast-trigger 下 V39 在 wait_line 处 early-done 过早,MI Y/CB 尚未 live 写满即 vb2_done,导致底行残帧/绿线。 - MI 完成改为 live ramp + full,再 post-MI hold(warmup 更保守) - 入 FT 前若干 SOF 走真实 MI FE,并用 early_done_drop_left 持久丢头帧 - free-run 清理 early-done 状态,不 arm - 进入 XTRIG 时 dummy 触发 ×2,关掉残留打开帧 板上 #2026080518/#2026080601 长期 ROI/mode thrash green=0。
CamOS 经 /proc/rkisp* 写 WB 寄存器(mode=0x100 / 400=0x6197)时, 若 ISP 未 START 或已 teardown,非法 MMIO 会触发 Asynchronous SError。 - FIL_AIQ/FIL_SW 写路径要求 ISP_START,并 pm_runtime_get/put - 拒绝越界/非对齐寄存器;限制单次写入长度 - mode= 仍可设置;streaming 时正常 MMIO 不受影响 已在 180 刷入 #2026080601 冒烟:accept/reject/skip 路径正常。
对应已刷板镜像 boot-rk3576-6.1.99-2026080601(含绿线策略与 procfs 门闩)。
IMX296 master_fast_trigger 下 V39 MI OFFS 常为 0,early-done 放弃到下一 次 XTRIG 的 MI FE 会导致发布内容落后一拍(N-1);free_run 期间外部 XTRIG 也会把进 FT 相位打乱。 主要变更: - imx296: free_run 忽略 XTRIG;进 FT / STREAMON 后 short dummy×3; enter/ROI dummy 强制 800us 脉宽,leave/stream-off 仍等满帧关闭 - rkisp capture: SHD+START 双读 MI offs;ceiling-force + force_post 持有, 不再 bare wait_line 完成;n1trace 诊断计数 - capture_v39: FT mi_drop/skip/pub 与 early 路径对齐 - rkisp: 放宽 residual/post/force_post,warmup=6、skip/drop=2 - 补充 N-1/绿线诊断文档与 bootimg 构建/校验脚本
对应 fix(imx296/isp) N-1/绿线合入后的 boot 镜像 #2026080701 (8950d5f)。
以 feat/dlcvcam-recovery-golden-boot 为编包/校验权威口径: 仅交付 boot.img + .sha256,去掉 .dlcvcam.json;补齐 .gitignore 与手册 §4。 冲突文件 build_bootimg.sh、scripts/dlcvcam_verify_bootimg.py 采用 #15 版本。
4 tasks
将 8950d5f 引入的 per-frame n1trace/dev_info/v4l2_info 改为 module_param 门控(imx296.n1trace / video_rkisp.n1trace,默认 0),保留诊断可热开。 同步 bump DLCVCAM 构建号至 2026081001,并清理本地 worktree 忽略项。
ymxc152
force-pushed
the
fix/imx296-fast-trigger-n1-pwm-period
branch
from
August 10, 2026 06:40
d47a4b9 to
01726d6
Compare
ceiling-force early-done 底行 UV 不完整导致 mon→FT/ROI 绿带;#1013 整尾 0x80 虽消 classic 却引入产品灰接缝。#1016 仅在 mean/neu 判定为 坏行时用 last-good UV 扩展,neu 占比仅在 ref 有 chroma 时生效。 主要变更: - capture_v39: rkisp_ft_sanitize_nv12_bot 条件修补(#1016) - rkisp: warm/gate/skip 收至 2,靠 UV 修补而非加长 quarantine - capture/h: FT sanitize 钩子 - DLCVCAM_BUILD_VERSION → 2026081301 - 多信号底带检测与验收脚本;绿线排查/验收记录 板端 smartcam_bs 用户场景验收:classic/seam/tear=0,N-1 pass, mon→trigger apply ~2.83s(≤3s)。
本地打包的 boot 镜像与校验文件不进版本库。
FT ceiling-force 后曝光/PWM 大跳时底 8 行 Y 仍可能是上一档曝光, 表现为底部亮度串帧(84,gain=240,1500→15000)。在 rkisp_ft_sanitize_nv12_bot 对 Y 尾做条件 last-good 扩展,坏行过半 则整带复制上一行;UV 路径保持 #1016。未加长 warmup/gate。 影响:V39 MP NV12/NV21 early-done 发布前;构建号 2026082001。
- 删除 24h/4h、0810 ceiling-force 排查、早期绿线修复记录(口径已过时) - 加入 IMX296_问题全景_给后续Agent_20260820.md(#2026082001 / #1017) - 验收脚本默认 CamOS 控制面 /ws/cmd;账号改走 CAMOS_USER/CAMOS_PASS - 新增 scripts/imx296_148_extra.py(Y 跳 / idle line0 / pulse / n1trace) - watchdog 报告默认改到 /tmp,不再依赖已删的 24h md
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.
提出者:@ymxc152 / @OKayJH
概要
wait_line完成。warmup / pub_gate / skip / drop收至 2,靠完成路径与尾修补而不是加长 quarantine。rkisp_ft_sanitize_nv12_bot仅在 mean/neu 判定为坏行时用 last-good UV 扩展(neu 仅当 ref 有 chroma 时生效)。禁止无条件整尾0x80(#1013 会出产品灰接缝)。/proc/rkisp*在 ISP 未 START / teardown 时拒绝 FIL_AIQ/FIL_SW 写,避免 Asynchronous SError panic。dev_info改为imx296.n1trace/video_rkisp.n1trace默认关闭,避免 FT 日志打满 rootfs。boot.img一键打包 + sidecar SHA 校验;交付物仅boot.img+.sha256。YYYYMMDDNN,当前2026082001(内核12abd272)。IMX296_问题全景_给后续Agent_20260820.md替换过时 24h/4h / 0810 过程稿。验收脚本默认 CamOS/ws/cmd(/ws只读)。问题描述
0x80消绿但引入产品底灰接缝。h-8。#1016 只修 UV。/proc/rkisp-vir0写 WB,ISP 已 teardown 仍 MMIO → panic。dev_info,长期 FT 会写爆分区。修复方案
绿线 / 帧完成(现行口径 #1016 + #1017)
wait_line完成。vb2_done。warmup=2、pub_gate=2、skip/drop=2;dummy 关残留打开帧(enter/ROI 短脉宽,leave/stream-off 仍等满帧)。classic/seam/tear(scripts/imx296_bottom_quality.py)。禁止再靠加长 warmup/gate 消绿。既有(本分支前期)
enable/ 抑制计数门控。DLCVCAM_BUILD_VERSION日期构建号。SError / procfs
rkisp_proc_write:FIL_AIQ/FIL_SW 写前检查ISP_START+pm_runtime_get_sync;拒绝越界 / 非对齐 reg;限制写入长度。mode=仍可设置;streaming 时正常 MMIO 不受影响。编包 / 交付
build_bootimg.sh+scripts/dlcvcam_verify_bootimg.py:整包 SHA 与 FIT 内嵌 hash。boot.img/boot-rk3576-*.img+.sha256;不生成.dlcvcam.json。dist/正式交付目录已 gitignore。boot-rk3576-6.1.99-2026082001-12abd272.img。文档 / 验收脚本(
9047c5a)IMX296_问题全景_给后续Agent_20260820.md。ws://127.0.0.1:8000/ws/cmd(/ws只读,没有 RESTset_exposure);可用CAMOS_WS覆盖。账号走CAMOS_USER/CAMOS_PASS。scripts/imx296_148_extra.py:§4 E/F/I/J(Y 跳、idle line0、pulse 恢复、n1trace 默认关)。优先加载仓内imx296_bottom_quality.py。imx296_day_watchdog.py报告默认改到/tmp,不再依赖已删的 24h md。与 #9 / #15 的关系
vertical_blanking最小值以恢复 60fps)未包含。如需该能力请单独合入 fix(imx296): 降低 vertical_blankin 最小值以恢复 60fps 帧率 #9。仓库外(不在本 PR)
gst_v4l2_grabber.py,不是再加长内核 gate。echo 1 > 4-001a/trigger(不增 trigger-dev irq);预览X-Frame-Tag是 hold-last,不等于入模 seq。验证
构建
#2026082001(uname -v与DLCVCAM_BUILD_VERSION一致)。#2026080601(绿线策略 + procfs)、#2026080701(N-1 / ceiling-force)、#2026081001(n1trace 默认关)、#2026081301(#1016 UV)。用户场景验收(#2026081301,2026-08-13,板 180)
scripts/verify_accept_user.py+smartcam_bs:#1017 Y 尾(#2026082001,2026-08-20,板 84)
gain=240,1500↔15000,software:
未做:soak、真 GPIO line0、ROI 跳、180 回归。
procfs 门闩(#2026080601 冒烟,策略未回退)
0x6000/ 非对齐0x401已知限制
#12052h endurance 曾 FAIL(未满 2h;当时 green=0 口径不可信,接缝见 #1013)。当前验收以 #1016/#1017 多信号 + apply 耗时 + N-1 tag 为准,长稳尚未用新检测重跑满窗。RuntimeWatchdogSec=30s未改(收尸配置,非 SError 根因)。主要提交(增量节选)
fix(imx296): deliver current fast-trigger frame after ROIfix(imx296): restore PWM period after shorter exposurefeat(trigger): gate external input during transitionsfix(imx296): close FT frame and harden V39 early-done drainfix(imx296/isp): 强化 V39 early-done 完成条件并关闭 FT 入模脏帧fix(rkisp): procfs MMIO 门闩,避免 teardown 窗口 SError panicfix(imx296/isp): 修复 FT N-1 相位并加固 V39 early-done 绿线防护merge: 将 #15 boot.img 打包与 sidecar 校验并入 FT 修复分支fix(imx296/isp): 默认关闭 n1trace,避免 FT 日志打满 rootfsfix(imx296/isp): #1016 条件 UV 尾修补并交付 #2026081301chore: 忽略 dist/ 正式交付目录fix(imx296/isp): #1017 条件 Y 尾修补并交付 #2026082001docs(imx296): 用问题全景替换过时过程稿,验收脚本默认 /ws/cmd