Repository navigation
Passing the sensor to FHAdv_Isp_SensorInit and calling it before FHAdv_Isp_Init - #105
Merged
Merged
Conversation
…v_Isp_Init Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Summary by QodoInitialize Fullhan V200 advapi with the sensor callback table
AI Description
Merge Risk
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR |
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.
What was wrong
On Fullhan V200, every start prints
Error: sensor if is NULL, check if FHAdv_Isp_SensorInit was calledfrom the vendor'slibadvapi_isp.so.FHAdv_Isp_Init()then returns early, so the advapi ISP layer never reads the sensor's exposure defaults.Why
FHAdv_Isp_SensorInit()takes the sensor'sstruct isp_sensor_if *and stores it for the rest of the library.FHAdv_Isp_Init()reads the ISP's current contrast, saturation and sharpness settings, then the sensor's AE defaults through that stored pointer. It stops with the message above if the pointer is not there.src/hal/fhan/f2_isp.hdeclaresfnAdvSensorInitasint (*)(void), andf2_pipeline_create()callsFHAdv_Isp_Init()first andFHAdv_Isp_SensorInit()second, without an argument. So Init always finds no sensor. SensorInit then receives whatever is in the first argument register.What this changes
f2_isp.h:fnAdvSensorInittakesf2_isp_snrops *, the sensor table Divinus already passes toAPI_ISP_SensorRegCb().f2_pipeline_create():fnAdvSensorInit(f2_snr.ops)first, thenfnAdvInit(). The unused result variables go.How it was checked
./build.sh fhan-v2, no new warnings../test.sh -apasses.FHAdv_Isp_Init()only reads settings; it writes nothing to the ISP.Effect on other platforms
Fullhan V200 only (
fhan-v2). Upstream does not call any other advapi ISP function today, so the visible effect is the missing error message. Any later use of the advapi ISP functions (brightness, contrast, AE mode and so on) needs Init to have completed, which it does now.🤖 Generated with Claude Code