Skip to content

hisilicon-opensdk: bump to ecbc855, so the cv200 watchdog can reset the board - #2517

Merged
widgetii merged 1 commit into
masterfrom
opensdk-bump-cv200-watchdog
Oct 2, 2026
Merged

widgetii merged 1 commit into
masterfrom
opensdk-bump-cv200-watchdog

Conversation

@widgetii

@widgetii widgetii commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Closes #127. Bumps hisilicon-opensdk from 0f80bb8 to ecbc855, picking up OpenIPC/openhisilicon#235.

What #127 actually needed

The issue asks for "the watchdog kernel module" on hi3516cv200/hi3518ev200. It
has been insmoded there all along, and this package installs open_wdt.ko
over the vendor blob as wdt.ko — so openhisilicon's build is what runs. I
confirmed that by building the unmodified source and watching it answer ioctls
exactly as the shipped module does. The module was never the missing piece; the
driver fixes were.

Before, on a lab hi3518ev200

A 30 s margin armed, the owner killed, and the board ran on for 106 s:

CTRL  = 0x00000003   enabled, RESEN set
LOAD  = 0x055D4A80   90,000,000 = 30 x 3MHz, i.e. twice the margin
VALUE = 0x0033F866   counting

Armed, running, never firing — hidog_release() handed the device to the
driver's own kernel thread the moment userspace let go.

Two more, specific to this generation:

  • The magic close was inverted. hidog_write() assigned the nowayout
    module parameter, so writing "V" left the dog running and not writing it
    stopped it. A single "V" also flipped nowayout for the rest of the boot,
    after which every WDIOC_SETOPTIONS was refused with -WDIOS_UNKNOWN =
    -(-1) = +1 — a positive ioctl return that userspace reads as success.
    majestic writes "V" before closing, so one clean S95majestic stop disabled
    that ioctl permanently.
  • hi3520dv200 had if (IS_ERR(p_dog) < 0), never true, so its feeder-creation
    failure went undetected.

After

crash-and-recover 18 of 18 across four builds, unattended, back in 17–28 s
bite time 30 s for a 30 s margin, on the UART clock — not the 60 s the old arithmetic gave
SP805 two expiries visible in WDT_VALUE: counts to zero, reloads once, runs a second count, then resets
ioctl spellings stock answered 1 of 4; now 4 of 4
majestic soak 521 s against its 300 s margin, no reboot

Scope of the bump

0f80bb8..ecbc855 is exactly one commit — the watchdog change above. Nothing
else rides along.

Worth a release note

cv200-era cameras go from a watchdog that never fired to one that does. A camera
whose majestic wedges will now reboot where it previously sat there unguarded.
That is the fix working, and it is the first thing anyone will notice.

Scope

Only hi3516cv200 is measured on hardware. hi3520dv200 is build-verified
and hi3516av100 syntax-checked only, neither having hardware in the lab.

…he board

Closes #127.

OpenIPC/openhisilicon#235. The watchdog on the hi3516cv200 generation --
cv200, hi3518ev200/ev201, and the av100 and 3520dv200 copies of the same
driver -- was armed, enabled and counting, and still never reset
anything. hidog_release() handed the device to the driver's own kernel
thread the moment userspace let go, so the one event the watchdog exists
for ended with the driver feeding the dog for the rest of the board's
life.

#127 asks for "the watchdog module" on these parts. It was already
insmod'ed, and this package installs open_wdt.ko over the vendor blob as
wdt.ko, so openhisilicon's build is what has been running all along --
confirmed by building the unmodified source and watching it answer
ioctls exactly as the shipped module does. The module was never the
missing piece; the fixes were.

Measured on a lab hi3518ev200 before, stock module: a 30 s margin armed,
the owner killed, and the board ran on for 106 s with CTRL=0x00000003,
LOAD=0x055D4A80 (90,000,000 = 30 x 3 MHz, twice the margin) and VALUE
counting down. After: 18 of 18 crash-and-recover cycles, the bite 30 s
after arming on a UART clock, the board back unattended in 17-28 s, and
a 521 s majestic soak against its 300 s margin.

Two more worth knowing about, both specific to this generation:

  - the magic close was inverted. hidog_write() assigned the nowayout
    module parameter, so writing "V" left the dog running and not
    writing it stopped it. A single "V" also flipped nowayout for the
    rest of the boot, after which every WDIOC_SETOPTIONS was refused
    with -WDIOS_UNKNOWN, which is -(-1) = +1 -- a positive ioctl return
    that userspace reads as success. majestic writes "V" before closing,
    so one clean `S95majestic stop` disabled that ioctl for good.
  - hi3520dv200 had "if (IS_ERR(p_dog) < 0)", never true, so its feeder
    creation failure went undetected.

The bump also picks up two unrelated openhisilicon commits that have
landed since 6eb7736:

  0f80bb8 osal, isp: a process that dies holding the pipeline no longer
          wedges the next start (#234)
  c1f9eb5 hi3516ev200/sc2235: repeat the DVP pad setup after stream
          start (#233)

Worth knowing before this ships: cv200-era cameras go from a watchdog
that never fired to one that does, so a camera whose majestic wedges
will now reboot where it previously sat there unguarded. That is the
fix, and it is the first thing anyone will notice.

Only hi3516cv200 is measured. hi3520dv200 is build-verified and
hi3516av100 syntax-checked only, neither having hardware in the lab.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Bump openhisilicon to restore cv200 watchdog resets

🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Pin openhisilicon to ecbc855 to restore watchdog resets after userspace crashes on cv200-era
 cameras.
• Keep the existing watchdog module installation; the fix comes from upstream driver changes.
Diagram

graph TD
  A["OpenSDK recipe"] --> B["Upstream revision"] --> C["wdt.ko module"] --> D["CV200 watchdog"]
  E["Userspace owner"] --> C
Loading
High-Level Assessment

Pinning the upstream fix is appropriate: the package already installs the openhisilicon watchdog module, so adding another module or carrying a local driver patch would duplicate existing integration. Review the upstream changes between the actual old pin, 0f80bb8, and ecbc855; the supplied PR narrative describes the starting revision as 6eb7736.

Files changed (1) +1 / -1

Other (1) +1 / -1
hisilicon-opensdk.mkAdvance the openhisilicon source pin to ecbc855 +1/-1

Advance the openhisilicon source pin to ecbc855

• Changes HISILICON_OPENSDK_VERSION from 0f80bb8 to ecbc855. The existing build and installation rules are unchanged, including installation of open_wdt.ko as wdt.ko for hi3516cv200.

general/package/hisilicon-opensdk/hisilicon-opensdk.mk

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can show, collapse, or hide each part of a finding: code, evidence, and all

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@widgetii

widgetii commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

The review is right about the base pin and I had it wrong: this moves 0f80bb8 → ecbc855, not 6eb7736 → ecbc855.

I read the old pin from a stale local master instead of from the branch base, which origin/master had already advanced. The consequence is that my commit message and the original PR body both claimed two unrelated commits ride along (0f80bb8 #234 and c1f9eb5 #233). They do not — they were already pinned. 0f80bb8..ecbc855 is exactly one commit, the watchdog change.

PR body corrected, and the squash commit message will carry the right range rather than the one I wrote.

@widgetii
widgetii merged commit 1b0d5e2 into master Oct 2, 2026
70 checks passed
@widgetii
widgetii deleted the opensdk-bump-cv200-watchdog branch October 2, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Firmware] Enable the watchdog kernel module on hi3516cv200/hi3518ev200 devices

1 participant