hisilicon-osdrv-hi3516cv200: fix OV2735 .ini for MIPI (4 fields)#2155
hisilicon-osdrv-hi3516cv200: fix OV2735 .ini for MIPI (4 fields)#2155moontwister wants to merge 2 commits into
Conversation
|
Good afternoon |
Four wrong fields in cv200's ov2735_i2c_1080p.ini that prevent it from working as MIPI on real hardware. Verified end-to-end against OpenIPC/majestic master+bcf6700 with its new SET_DEV_ATTR diagnostic log (see OpenIPC/majestic#278). [mode] input_mode = 4 → 0 (INPUT_MODE_MIPI = 0; 4 is unused) [mipi] data_type = 3 → 2 (OV2735 outputs RAW10, not RAW12) [mipi] lane_id = "0|1|2|3|..." → "0|1|-1|-1|..." (2-lane, not 4) [vi_dev] Input_mod = 2 → 5 (MIPI; 2 is VI_INPUT_MODE_DIGITAL_CAMERA, rejected by majestic's new MIPI mode check) Verified on TP-Link Kasa KC110 (Hi3518EV200 + OV2735 2-lane RAW10). With these four fields fixed, /proc/driver/hi_mipi shows the expected `LaneNum=2 RAW10 MIPI` (matches the vendor firmware diagnostic snapshot), ISP IRQs climb, VENC produces frames, RTSP delivers H.264 1080p with no LD_PRELOAD shim. cv300's already- correct ov2735_i2c_1080p.ini has the same MIPI fields (input_mode, data_type, lane_id) as this patch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
dc51307 to
ff8e3a6
Compare
Fifth wrong field in cv200's ov2735_i2c_1080p.ini, found while chasing the colour cast reported in OpenIPC/majestic#281: [vi_dev] Mask_0 = 0x3FF0000 → 0xFFF00000 0xFFF00000 matches cv300's already-correct ov2735_i2c_1080p.ini and the vendor firmware's VI DEV ATTR on the same hardware (TP-Link Kasa KC110, Hi3518EV200 + OV2735 2-lane MIPI RAW10). With 0x3FF0000 the VI captures the wrong bit window of the ISP bus: AE converges ~28x under (Line 86 vs 2431 at the same scene) and the image gets a severe colour cast with value wrap in highlights. Verified on the KC110 against majestic master+e9ff50d: changing only this field (same binary, same scene) restores /proc/umap/vi ComMsk0=0xFFF00000, correct AE convergence, and a clean image. This was masked in earlier testing by an LD_PRELOAD shim that forced the vendor VI dev attr — majestic itself applies the .ini faithfully, so the majestic side of OpenIPC/majestic#281 is innocent; the .ini was wrong. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Pushed a second commit adding a fifth field fix: This turned out to be the root cause of the colour cast discussed in OpenIPC/majestic#281 — majestic applies the .ini faithfully, so the majestic binary was innocent (@widgetii's code audit was right). Same-scene A/B on the KC110 with majestic master+e9ff50d: with With this PR's five fields plus the #279 pool fix already in master, OV2735 on cv200 runs correctly with stock majestic — no shim, no workarounds. |
Summary
Four wrong fields in cv200's
ov2735_i2c_1080p.inithat prevent it from working as MIPI on real hardware:[mode] input_mode40(INPUT_MODE_MIPI)INPUT_MODE_MIPI = 0;4is the unused successor ofLVDS=2/DC=3. Withinput_mode=4the ISP driver never configures the MIPI RX block.[mipi] data_type3(RAW_DATA_12BIT)2(RAW_DATA_10BIT)data_type=3, majestic faithfully sendsraw_data_type=3toHI_MIPI_SET_DEV_ATTRand/proc/driver/hi_mipiends up in RAW12 mode → garbled / no frames.[mipi] lane_id0|1|2|3|...(4-lane)0|1|-1|-1|...(2-lane)[vi_dev] Input_mod2(VI_INPUT_MODE_DIGITAL_CAMERA)5(MIPI)[vi_dev] Input_modand[mode] input_modemust agree. Master majestic (OpenIPC/majestic#278) now enforces this with a fail-fast:[mode] input_mode (0) and [vi_dev] Input_mod (2) disagree; expected Input_mod=5 for this input_mode.cv300's already-correct
ov2735_i2c_1080p.inihas the same MIPI fields (input_mode,data_type,lane_id) as this patch.Test plan — verified end-to-end
On a TP-Link Kasa KC110 (Hi3518EV200 + OV2735 2-lane MIPI RAW10) against
majestic master+bcf6700(which adds theSET_DEV_ATTR: …diagnostic log):.inistate[mode] input_mode (4)doesn't even reach majestic — load_hisilicon never enters the MIPI case.input_mode=0, others still wrongInput_mod (2) disagree; expected 5Input_mod=5SET_DEV_ATTR: input_mode=0 raw_data_type=3 lanes=[0,-1,-1,-1],/proc/driver/hi_mipi→LaneNum=1 RAW12 MIPI. Pipeline up but wrong RAW depth & lane count.data_type=2+lane_id="0|1|-1|..."(this PR)SET_DEV_ATTR: input_mode=0 raw_data_type=2 lanes=[0,1,-1,-1],/proc/driver/hi_mipi→LaneNum=2 RAW10 MIPI(matches vendor diagnostic snapshot). ISP IRQs climb, VENC produces frames, RTSP delivers H.264 1080p — no LD_PRELOAD shim required.Context
Companion to #2154 (cv200
load_hisiliconOV2735 case). Originally split out from closed #2151 (KC110 board package, re-filed as OpenIPC/builder#99). Replaces my earlier shim-package #2152 entirely once this lands and majestic master is released — see OpenIPC/majestic#278 for the full diagnostic trail.🤖 Generated with Claude Code