Repository navigation
hisi: do not probe for a sensor on the Hi3536DV100 - #250
Merged
Merged
Conversation
PR Summary by QodoSkip sensor I2C probes on Hi3536DV100
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
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 see how risky a PR is at a glance with blast radius labels |
This was referenced Oct 17, 2026
widgetii
added a commit
that referenced
this pull request
Oct 17, 2026
… size (#251) The budget compared stat -c %s of ipcinfo before and after. That file is page-quantised: the RW segment's file offset has to equal its address modulo 4096, so it jumps a whole page whenever the code in front of it crosses a boundary. On master the code segment ends exactly where the data segment begins (0xae68 both), so the slack is zero bytes. A change adding 12 bytes of code (#249) and one adding 24 (#250) each "grew" ipcinfo by 4096 and failed the 1024-byte budget. Measure text + data + bss from size(1) instead: what the camera loads, growing by the bytes the change adds. With the CI toolchain those two PRs measure +12 and +24.
The Hi3536DV100 is a decoder with no video input, so a report never finds a sensor there, but the probe was expensive. On a lab NVR i2c0 has nothing on the wire and the kernel's hibvt-i2c driver runs it in polling mode (the device tree gives it no interrupt), so each transfer spins udelay(50) 0x10000 times -- 3.3 s on the SoC's single core -- before "wait idle timeout". The table is 38 transfers: the sensors section took 126 s, and the board stopped answering ping for most of it. Leave possible_i2c_addrs empty on this chip. The whole report now takes 1.0 s on that NVR and issues no i2c transfer.
widgetii
force-pushed
the
hi3536dv100-no-sensor-probe
branch
from
October 17, 2026 11:04
88b3236 to
45705b3
Compare
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.
A full
ipctoolreport on a Hi3536DV100 NVR froze the board for about two minutes: ping and ssh stopped responding while the report ran.Cause
sensorsfinished within about 1 s.sensorstook 126 s: 18 probe calls, each 3.3 s, or 10–13 s for families that read several registers.i2ctransfer -y 0 w1@0x30 0x00takes 3.3 s, and the kernel logshibvt-i2c 120c0000.i2c: wait idle timeout, RIS: 0x10, SR: 0xe0100.interruptsproperty, so hibvt-i2c runs in polling mode.hibvt_i2c_wait_idle()spinsudelay(50)up to0x10000times: 3.28 s, on the SoC's only core.ipctool reginfo), but nothing on the bus ever completes a transfer.Fix
Leave
possible_i2c_addrsempty on HISI_3536D, so no I2C transfer is issued and thesensorssection is simply absent.The kernel side, a 3.3 s busy-wait per transfer in polling mode, is worth fixing separately in OpenIPC/linux.
Tested
cYAML_test,reginfo_testandsensors_testpass. arm32 and arm64 cross builds are clean.wait idle timeoutmessages was 231 before the run and 231 after.