Skip to content

xiongmai-opensdk-xm530v200: bump to openxiongmai 459046b (sensor clock, X2-WQ2 DVP lens, VPSS bottom rows) - #3043

Merged
dimerr merged 1 commit into
masterfrom
xiongmai-v200-sensor-clock
Dec 2, 2026
Merged

dimerr merged 1 commit into
masterfrom
xiongmai-v200-sensor-clock

Conversation

@dimerr

@dimerr dimerr commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Moves the V200 openxiongmai pin from 7947cd2 to 459046b, which brings in OpenIPC/openxiongmai#108:

  • Sensor clock before the probe. On real XM530V200-family boards, libxmv200's probe found no sensor: OpenIPC's U-Boot leaves the sensor PLL off and the MCLK pads unmuxed. libxmv200 now starts the PLL and its divider and muxes MCLK (GPIO37, plus GPIO236 for a second sensor) before probing. It puts them back afterwards.
  • X2-WQ2 second lens. The zoom lens's SC2336 is on the DVP input. New layout key dvp=1, a tuning captured from the vendor firmware for the MIPI lens beside it, and board x2-wq2-dual (both lenses spliced).
  • open_vpss bottom rows. The input stage's vertical totals were too small, so the bottom ~35 rows of every picture were never written (stale lines, green/purple noise). They now match vpss.ko's.

Tested on an XM550V200 (X2-WQ2) with this openxiongmai: both lenses stream, whole to the last row.

ipctool needs no bump here (IPCTOOL_VERSION = HEAD). Its master already has OpenIPC/ipctool#302, which lets ipcinfo -s find the sensor on these boards.

The sensor clock before the probe (PLL, divider and MCLK pads; the
probe found no sensor on real XM530V200-family boards), the X2-WQ2's
second lens on DVP (board x2-wq2-dual), and open_vpss writing the
pictures' bottom ~35 rows, which it had left stale (OpenIPC/openxiongmai#108).
Tested on an XM550V200 X2-WQ2: both lenses stream, whole to the last row.
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

xiongmai-opensdk-xm530v200: bump openxiongmai to 459046b

🐞 Bug fix ✨ Enhancement 🕐 10-20 Minutes

Grey Divider

AI Description

• Bumps the openxiongmai pin to 459046b, pulling in OpenIPC/openxiongmai#108.
• Fixes sensor probe on XM530V200 boards by starting the sensor PLL and muxing MCLK first.
• Adds X2-WQ2 second lens support on DVP, and fixes open_vpss leaving the bottom ~35 rows unwritten.
Merge Risk 🟢 Low

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The package description identifies one bounded integration covering sensors, ISP, capture, scaling, encoding, overlays, AE/AWB, and the open driver stack; the changed revision supplies the library and modules used by that integration.
Sources

general/package/xiongmai-opensdk-xm530v200/xiongmai-opensdk-xm530v200.mk[15-25]

XIONGMAI_OPENSDK_XM530V200_DEPENDENCIES = xiongmai-osdrv-xm530v200

# tools/xmv200-test builds libraries/libxmv200 first
define XIONGMAI_OPENSDK_XM530V200_BUILD_CMDS
	$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) CFLAGS="$(TARGET_CFLAGS)" \
		-C $(@D)/tools/xmv200-test
endef

define XIONGMAI_OPENSDK_XM530V200_INSTALL_STAGING_CMDS
	$(INSTALL) -m 644 -D $(@D)/libraries/libxmv200/libxmv200.a $(STAGING_DIR)/usr/lib/libxmv200.a
	$(INSTALL) -m 644 -D $(@D)/libraries/libxmv200/xmv200.h $(STAGING_DIR)/usr/include/xmv200.h

general/package/xiongmai-opensdk-xm530v200/xiongmai-opensdk-xm530v200.mk[7-8]

XIONGMAI_OPENSDK_XM530V200_SITE = $(call github,openipc,openxiongmai,$(XIONGMAI_OPENSDK_XM530V200_VERSION))
XIONGMAI_OPENSDK_XM530V200_VERSION = 459046bd687acf89287439b94ce3cbb90eb51aee
Behavioral complexity 🟢 Low 🧩 Straightforward

  • Before, the package fetched the old openxiongmai commit; after, it fetches a new pinned commit.
  • The local correctness condition is a single source-revision substitution, while the external revision's internal algorithms and compatibility conditions were not inspectable.
Sources

general/package/xiongmai-opensdk-xm530v200/xiongmai-opensdk-xm530v200.mk[7-8]

XIONGMAI_OPENSDK_XM530V200_SITE = $(call github,openipc,openxiongmai,$(XIONGMAI_OPENSDK_XM530V200_VERSION))
XIONGMAI_OPENSDK_XM530V200_VERSION = 459046bd687acf89287439b94ce3cbb90eb51aee
Potential damage 🟡 Medium 🩹 Temporary loss

  • If the fetched revision fails to build, load, or operate compatibly, the selected image can lose camera initialization or media processing.
  • Reverting the pin restores the prior artifacts, but a deployed image must be rebuilt and reflashed; no persistent-state corruption or external compensation is evidenced.
  • Rebuild and redeploy the prior or corrected package revision; no automatic runtime repair path is present in the changed repository behavior.
Sources

general/package/xiongmai-opensdk-xm530v200/xiongmai-opensdk-xm530v200.mk[15-25]

XIONGMAI_OPENSDK_XM530V200_DEPENDENCIES = xiongmai-osdrv-xm530v200

# tools/xmv200-test builds libraries/libxmv200 first
define XIONGMAI_OPENSDK_XM530V200_BUILD_CMDS
	$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) CFLAGS="$(TARGET_CFLAGS)" \
		-C $(@D)/tools/xmv200-test
endef

define XIONGMAI_OPENSDK_XM530V200_INSTALL_STAGING_CMDS
	$(INSTALL) -m 644 -D $(@D)/libraries/libxmv200/libxmv200.a $(STAGING_DIR)/usr/lib/libxmv200.a
	$(INSTALL) -m 644 -D $(@D)/libraries/libxmv200/xmv200.h $(STAGING_DIR)/usr/include/xmv200.h
Assessed commit eb7bf16
Diagram

graph TD
  pkg["xiongmai-opensdk-xm530v200.mk"] --> pin["openxiongmai @ 459046b"] --> lib["libxmv200 probe"] --> clk["Sensor PLL and MCLK"] --> sensor["Sensor SC2336"]
  pin --> vpss["open_vpss bottom rows"]
  pin --> dvp["X2-WQ2 DVP lens"]
Loading
High-Level Assessment

Bumping the upstream pin is the right mechanism. The package already pins by full commit SHA, which keeps the Buildroot build reproducible. The alternative of carrying local patches in the Buildroot package would duplicate upstream fixes and drift from openxiongmai, so the PR's approach is the better one.

Files changed (1) +1 / -1

Other (1) +1 / -1
xiongmai-opensdk-xm530v200.mkPin openxiongmai to 459046b +1/-1

Pin openxiongmai to 459046b

• Replaces the XIONGMAI_OPENSDK_XM530V200_VERSION commit SHA from 7947cd2 to 459046b. The new commit brings in sensor clock setup before probing, X2-WQ2 DVP lens support, and the open_vpss bottom-row fix. The license and license files are unchanged.

general/package/xiongmai-opensdk-xm530v200/xiongmai-opensdk-xm530v200.mk

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

qodo-free-for-open-source-projects Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Shared XM530V200 SDK pin changes sensor pads on every family camera 🐞 Bug ☼ Reliability
Description
The version pin on XIONGMAI_OPENSDK_XM530V200_VERSION moves the whole libxmv200 and open-driver
set to 459046b, so the new pre-probe sensor PLL/divider start and GPIO37/GPIO236 MCLK muxing, plus
the open_vpss vertical-total change, now run on every board built from this package. The package is
selected for several SoC models (xm232, xm533, xm535*, xm530v200, per the OPENIPC_SOC_MODEL
branches), and the PR's only test is one XM550V200 X2-WQ2, so cameras of the other models that share
these pads or VPSS timing get the new behaviour at upgrade time with no evidence it is safe for
them.
Code

general/package/xiongmai-opensdk-xm530v200/xiongmai-opensdk-xm530v200.mk[8]

+XIONGMAI_OPENSDK_XM530V200_VERSION = 459046bd687acf89287439b94ce3cbb90eb51aee
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Bumping `XIONGMAI_OPENSDK_XM530V200_VERSION` to 459046b changes libxmv200 and the open_vpss module for every SoC model that builds this package (xm232, xm533, xm535d1/d2/w1, xm530v200). The new sensor-clock muxing (GPIO37, GPIO236) and VPSS vertical-total change are only validated on an XM550V200 X2-WQ2, yet they ship to all cameras that select this package.
## Fix Focus Areas
- general/package/xiongmai-opensdk-xm530v200/xiongmai-opensdk-xm530v200.mk[8-8]
- general/package/xiongmai-opensdk-xm530v200/xiongmai-opensdk-xm530v200.mk[30-60]
## Recommended Fix
Before merging, either (a) state in the PR which other SoC models and boards were tested against 459046b, with a before/after boot and stream check, or (b) confirm upstream OpenIPC/openxiongmai#108 guards the PLL/MCLK muxing and VPSS change by board/chip so that non-X2-WQ2 boards keep their previous behaviour. Note the pre-probe MCLK muxing must not repurpose GPIO37/GPIO236 on boards where those pads serve other functions.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can see how risky a PR is at a glance with blast radius labels

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@dimerr

dimerr commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator Author

On Qodo's finding (the new pin changes behaviour on every chip this package builds): it doesn't. Each change is confined to the XM530V200 (and the XM550V200, the same die):

  • Clock setup: libxmv200 runs the pre-probe PLL/divider start and the MCLK pad mux (GPIO37/GPIO236) only from fields of the chip's configuration (probe_pll, mclk_pads, dvp_pads in libraries/libxmv200/chip.c). Only the xm530v200 entry sets them. The xm535, xm535w1, xm533 and xm232 entries leave them empty, so those chips probe exactly as before.
  • VPSS fix: drivers/xm530v200_vpss (open_vpss) is built only for OPENIPC_SOC_MODEL=xm530v200 (xiongmai-opensdk-xm530v200.mk). XM533/XM535/XM232 use their own VI/VPSS drivers, which this pin doesn't change.
  • DVP path: it runs only for a layout with a sensor marked dvp=1 (board x2-wq2-dual).

The XM530V200 changes were tested on real hardware (XM550V200 X2-WQ2). The other families were checked in CI in openxiongmai#108 (kernel modules and the libxmv200 sensor drivers against their tunings).

@dimerr
dimerr merged commit f9fe932 into master Dec 2, 2026
38 of 39 checks passed
@dimerr
dimerr deleted the xiongmai-v200-sensor-clock branch December 2, 2026 04:44
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.

1 participant