Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/hal/star/i6_isp.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ static int i6_isp_load(i6_isp_impl *isp_lib) {
if (!(isp_lib->handle = dlopen("libmi_isp.so", RTLD_LAZY | RTLD_GLOBAL)))
HAL_ERROR("i6_isp", "Failed to load library!\nError: %s\n", dlerror());

if (!(isp_lib->fnDisableUserspace3A = (int(*)(int channel))
hal_symbol_load("i6_isp", isp_lib->handle, "MI_ISP_DisableUserspace3A")))
return EXIT_FAILURE;
// Not exported by the infinity6 libmi_isp.so shipped by OpenIPC, and never called.
isp_lib->fnDisableUserspace3A = (int(*)(int channel))
hal_symbol_load("i6_isp", isp_lib->handle, "MI_ISP_DisableUserspace3A");
Comment on lines +40 to +41

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


if (!(isp_lib->fnEnableUserspace3A = (int(*)(int channel, i6_isp_p3a *params))
hal_symbol_load("i6_isp", isp_lib->handle, "MI_ISP_CUS3A_Enable")))
Expand Down