i6: treat MI_ISP_DisableUserspace3A as optional - #44
Conversation
The infinity6 libmi_isp.so shipped by OpenIPC (sigmastar-osdrv-infinity6) does not export MI_ISP_DisableUserspace3A, so on SSC323 the SDK never starts: "Failed to acquire symbol MI_ISP_DisableUserspace3A" / "HAL initialization failed with 0x1". The function pointer is never called anywhere, so load it without failing, as i6_venc.h already does for MI_VENC_SetInputSourceConfig. Tested on a Xiaomi/Chuangmi ipc017 (SSC323 + GC2053): SDK starts and streams H.264 1080p20 over RTSP. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Code Review by Qodo
1. Successful startups report a failure
|
| isp_lib->fnDisableUserspace3A = (int(*)(int channel)) | ||
| hal_symbol_load("i6_isp", isp_lib->handle, "MI_ISP_DisableUserspace3A"); |
There was a problem hiding this comment.
1. Successful startups report a failure 🐞 Bug ◔ Observability
i6_isp_load resolves the now-optional symbol through hal_symbol_load, which unconditionally emits a red HAL_DANGER message when dlsym returns null. On the targeted Infinity6 library where the symbol is absent, initialization now continues successfully but every startup still prints Failed to acquire symbol MI_ISP_DisableUserspace3A!, making healthy startup appear faulty.
Agent Prompt
## Issue description
The newly optional `MI_ISP_DisableUserspace3A` symbol is still resolved through a helper that logs every missing symbol as a failure. Expected absence should not produce a danger-level startup message.
## Fix Focus Areas
- src/hal/star/i6_isp.h[39-41]
- src/hal/symbols.h[8-14]
## Recommended Fix
Add or use a silent optional-symbol lookup path that returns null without emitting `HAL_DANGER`, and resolve `MI_ISP_DisableUserspace3A` through that path while retaining the current non-failing behavior.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
True, the red line still prints. It's the same one this library already produces for
MI_VENC_SetInputSourceConfig: i6_venc.h loads that optional symbol the same way,
and every divinus start on SSC323 logs both:
[i6_isp] Failed to acquire symbol MI_ISP_DisableUserspace3A!
[i6_venc] Failed to acquire symbol MI_VENC_SetInputSourceConfig!
I kept the existing pattern instead of changing hal_symbol_load() for every HAL. If
you'd rather have optional symbols load silently, I can add a quiet variant to
src/hal/symbols.h and use it for both, in this PR or a separate one.
PR Summary by QodoAllow infinity6 startup without unused ISP symbol
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
Good evening, nice one! Muchas gracias por su contribución 🙂 |
On SSC323 with the infinity6
libmi_isp.sothat OpenIPC ships(
sigmastar-osdrv-infinity6), divinus stops at startup:That library exports 218 symbols; of the 68 divinus resolves across the seven MI
libraries, only two are missing:
MI_ISP_DisableUserspace3AandMI_VENC_SetInputSourceConfig. The latter is already loaded as optional.fnDisableUserspace3Ais never called anywhere in the tree, so failing on it isunnecessary. Loading it without the
return EXIT_FAILURElets the SDK start:[media] SDK has started successfully!, and H.264 1080p20 streams over RTSP.Tested on a Xiaomi/Chuangmi ipc017 (SSC323 + GC2053), divinus rev
1e92d52.