Skip to content

ingenic-osdrv-t23: add gc1084 tuning - #2997

Merged
openipc-ai merged 1 commit into
masterfrom
ingenic-t23-gc1084
Nov 28, 2026
Merged

openipc-ai merged 1 commit into
masterfrom
ingenic-t23-gc1084

Conversation

@openipc-ai

@openipc-ai openipc-ai commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

T23 has no GalaxyCore GC1084 support. The Vstarcam C8622 (T23N, GC1084 at I2C0 0x37, MIPI 1 lane, 1280x720) cannot start its ISP on OpenIPC, because ingenic-osdrv-t23 ships no gc1084-t23.bin for libimp to load (OpenIPC/openingenic#57).

The driver, sensor_gc1084_t23.ko, and its sinfo detection are in OpenIPC/openingenic#58. ingenic-opensdk builds openingenic at HEAD, so this needs no version bump once that is merged.

Change

  • files/sensor/params/gc1084-t23.bin: the GC1084 tuning from Ingenic's T23 SDK 1.3.0. It is the generic SDK file, not a tune made for one camera. It uses the 2.20 header and 176288-byte size of every other T23 file here. Twelve of the existing fourteen are byte-identical to the SDK 1.1.x files in the same collection (themactep/ingenic-sdk sensor-iq/t23/), where this one is gc1084-sdk130.bin (blob 4493fa12).
  • files/sensor/gc1084.yaml: name, address 0x37, 1280x720, i2c, like the other sensors.

INGENIC_OSDRV_T23_INSTALL_TARGET_CMDS installs every *.bin and *.yaml for a generic build, and only $(OPENIPC_SNS_MODEL)'s for a board build, so a board with another sensor is unaffected.

Hardware tested on

Not by me, and not this file. OpenIPC/builder#278 (Vstarcam C8622) reports video working with the same driver settings. It ships the camera's own stock tune as a board file, which overrides this one through builder's device overlay. That tune is byte-identical to the one in Vstarcam's stock T23 firmware (owner dump r-3qy8n67z) and to thingino's gc1084-okam_qc3.bin. This PR ships the SDK file because it is the generic one; a camera tune belongs in builder.

Evidence

make BOARD=t23_lite from master e8db0422 with this commit, and INGENIC_OPENSDK_OVERRIDE_SRCDIR pointing at OpenIPC/openingenic#58 (665b4f33):

- firmware.bin: [6272KB/7616KB]
- uImage: [1501KB/2048KB read by the bootloader]
target/etc/sensor/gc1084-t23.bin                                           176288
target/etc/sensor/gc1084.yaml                                                  78
target/lib/modules/3.10.14__isvp_pike_1.0__/ingenic/sensor_gc1084_t23.ko    13856

Together the module and the tuning are about 23 KB after xz.

Emulated, not a camera: qemu-bench's t23 machine (master 7d695a6) with the GC1084 model from OpenIPC/qemu-bench#396. The entry gives chip ID 0x1084 at 0x03f0 and the GC2083 shutter, frame-length and MIPI-enable registers, which the GC1084 shares. The image boots and qemu-boot/test-ingenic-isp.sh --soc t23 --sensor gc1084 runs the rootfs's own load_ingenic and a libimp FrameSource client:

[    1.963278] sinfo: Successful sensor detection: gc1084, I2C Bus: 0, I2C Address: 0x37
ISPTEST sinfo: sensor: gc1084
ISPTEST modules: sensor_gc1084_t23 tx_isp_t23
isp-snap: frames PASS
ch0-39.nv12: 1280x720 counter 72 ... ok
  advanced from 55: yes
ch1-39.nv12: 640x360 counter 59 ... ok
  advanced from 54: yes
PASS

The model reads the shutter, frame length and column gain the driver writes, but it renders a synthetic test pattern. So this shows that detection, the module, libimp and the tuning file work together. It does not show image quality.

The same image with --sensor gc2053 still detects and streams a gc2053:

[   10.850375] sinfo: Successful sensor detection: gc2053, I2C Bus: 0, I2C Address: 0x37
ISPTEST modules: sensor_gc2053_t23 tx_isp_t23
PASS

Scope

  • No kernel patches under general/package/all-patches/linux/ (those go to OpenIPC/linux)
  • No files specific to a single retail camera model (those go to OpenIPC/builder)
  • No probing or bring-up tooling (that goes to OpenIPC/ipctool)
  • Nothing under general/overlay/ or in a shared load_<vendor> script hardcodes a value specific to my board
  • Package sources come from an OpenIPC repository, and any version bump keeps at least the specificity of the pin it replaces (a new package should pin a full 40-character SHA)
  • No LD_PRELOAD, and no binaries that cannot be rebuilt from source
  • New code is selected by a defconfig, so CI actually builds it

The two unticked boxes: no package source or pin changes here. The .bin is Ingenic SDK tuning data, which cannot be rebuilt from source, like every other file in params/.

gc1084-t23.bin is the GC1084 ISP tuning from Ingenic's T23 SDK 1.3.0,
in the same 2.20 format as the other T23 files here. The Vstarcam
C8622 (T23N) carries this sensor (OpenIPC/openingenic#57); its driver,
sensor_gc1084_t23, comes from openingenic.
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Add GC1084 sensor assets for Ingenic T23

✨ Enhancement 🕐 10-20 Minutes

Grey Divider

AI Description

• Add generic GC1084 ISP tuning so T23 builds can load the sensor through libimp.
• Add I²C address and resolution metadata for sensor selection and detection.
• Reuse existing package installation rules; board builds include only their selected sensor assets.
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 changed YAML is installed as the GC1084 runtime profile and is consumed by the sensor configuration path for the GC1084 T23 imaging integration.
  • No evidence shows that this profile controls other sensor models or independent functional domains.
Sources

general/package/ingenic-osdrv-t23/files/sensor/gc1084.yaml[1-6]

sensor:
  name: gc1084
  address: 0x37
  width: 1280
  height: 720
  bus: i2c
Behavioral complexity 🟢 Low 🧩 Straightforward

  • Before, the T23 package had no GC1084 YAML profile in this repository; after, it supplies a direct declarative mapping of sensor name, I2C address, dimensions, and bus.
  • The new correctness condition is that these literals must match the GC1084 hardware and driver expectations.
  • Existing wildcard/selected-file installation and sensor-name lookup are reused infrastructure, not newly introduced interacting states or algorithms.
Sources

general/package/ingenic-osdrv-t23/files/sensor/gc1084.yaml[1-6]

sensor:
  name: gc1084
  address: 0x37
  width: 1280
  height: 720
  bus: i2c

general/package/ingenic-osdrv-t23/ingenic-osdrv-t23.mk[12-28]

ifeq ($(OPENIPC_SNS_MODEL),)
define INGENIC_OSDRV_T23_INSTALL_TARGET_CMDS
	$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensor
	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/*.yaml
	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/params/*.bin

	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
	$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(INGENIC_OSDRV_T23_PKGDIR)/files/script/*

	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib
	$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib/ $(INGENIC_OSDRV_T23_PKGDIR)/files/lib/*
endef
else
define INGENIC_OSDRV_T23_INSTALL_TARGET_CMDS
	$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensor
	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/$(OPENIPC_SNS_MODEL).yaml
	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/params/$(OPENIPC_SNS_MODEL)-$(OPENIPC_SOC_MODEL).bin
Potential damage 🟡 Medium 🩹 Temporary loss

  • If the profile contains an incompatible address, mode, or bus declaration, GC1084 initialization or configured video operation could fail.
  • The supported consequence is loss of the GC1084 camera capability rather than a demonstrated effect on other sensors or subsystems.
  • Rebuilding or reverting the firmware restores the prior file; no persistent data mutation or external side effect is introduced by this YAML.
  • Firmware rollback or replacement of the profile can restore operation.
  • The source does not establish automatic runtime repair, and a deployed image would require the normal firmware update or configuration replacement process.
Sources

general/package/ingenic-osdrv-t23/files/sensor/gc1084.yaml[1-6]

sensor:
  name: gc1084
  address: 0x37
  width: 1280
  height: 720
  bus: i2c

general/package/ingenic-osdrv-t23/ingenic-osdrv-t23.mk[12-28]

ifeq ($(OPENIPC_SNS_MODEL),)
define INGENIC_OSDRV_T23_INSTALL_TARGET_CMDS
	$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensor
	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/*.yaml
	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/params/*.bin

	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
	$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(INGENIC_OSDRV_T23_PKGDIR)/files/script/*

	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib
	$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib/ $(INGENIC_OSDRV_T23_PKGDIR)/files/lib/*
endef
else
define INGENIC_OSDRV_T23_INSTALL_TARGET_CMDS
	$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensor
	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/$(OPENIPC_SNS_MODEL).yaml
	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/params/$(OPENIPC_SNS_MODEL)-$(OPENIPC_SOC_MODEL).bin
Assessed commit 4a4fb44
Diagram

graph TD
  Config["Build selection"] --> Install["Package installer"] --> Metadata["GC1084 metadata"] --> Loader["Sensor loader"] --> ISP["libimp ISP"]
  Install --> Tuning["GC1084 tuning"] --> ISP
  Driver["Upstream driver"] --> ISP
Loading
High-Level Assessment

Use the existing sensor-asset layout and installation rules. A camera-specific tune would belong in a board overlay, while changing the installer would add complexity without benefiting this sensor.

Files changed (2) +6 / -0 · 1 not counted

Enhancement (2) +6 / -0
gc1084.yamlDefine GC1084 sensor metadata +6/-0

Define GC1084 sensor metadata

• Adds the GC1084 name, I²C address 0x37, and 1280×720 resolution using the existing sensor YAML format.

general/package/ingenic-osdrv-t23/files/sensor/gc1084.yaml

gc1084-t23.binSupply generic GC1084 T23 ISP tuning not counted

Supply generic GC1084 T23 ISP tuning

• Adds the Ingenic T23 SDK 1.3.0 tuning binary for libimp to load. This is a generic sensor tune rather than a camera-specific override.

general/package/ingenic-osdrv-t23/files/sensor/params/gc1084-t23.bin

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

qodo-free-for-open-source-projects Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Sensor tuning ships untested on hardware 📘 Rule violation ◔ Observability
Description
The PR adds gc1084-t23.bin and gc1084.yaml to files/sensor/, which the *.bin and *.yaml
install glob copies into every generic T23 image, and libimp loads the tuning by sensor name, so the
firmware behaviour on cameras changes. The description states the hardware testing was not done by
the author ("Not by me, and not this file") and relies only on an emulated qemu run with a synthetic
pattern plus a report from another PR (OpenIPC/builder#278) that uses a different tune file.
Code

general/package/ingenic-osdrv-t23/files/sensor/gc1084.yaml[R2-3]

+  name: gc1084
+  address: 0x37
Evidence
The PR adds a sensor entry that the generic T23 image ships and libimp loads by name. The
description says the hardware testing was not done by the author and not on this file, and offers
only emulated and other-PR evidence.

Rule 3: Hardware evidence is present and honest
general/package/ingenic-osdrv-t23/files/sensor/gc1084.yaml[2-3]

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

## Issue description
The PR adds GC1084 tuning and sensor config that ship in every generic T23 image, but the PR description states the change was not tested on hardware by the author. Its only evidence is an emulated qemu run with a synthetic pattern and a hardware report from a different PR (OpenIPC/builder#278) that uses another tune file.
## Fix Focus Areas
- general/package/ingenic-osdrv-t23/files/sensor/gc1084.yaml[1-6]
- general/package/ingenic-osdrv-t23/files/sensor/params/gc1084-t23.bin
## Recommended Fix
Run the change on a real GC1084 T23N camera (for example the Vstarcam C8622). Capture the `sinfo` detection line, the `libimp` load of `gc1084-t23.bin`, and a stream capture with the symptom it fixes. Paste that output into the PR description under a verification heading and check the boxes. If the change cannot be tested on hardware, say so plainly and state what evidence is available.

ⓘ 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 turn these tips off under Display > Comment parts

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

openipc-ai added a commit to PeterBeklemishev/oipc-builder that referenced this pull request Nov 28, 2026
OpenIPC/openingenic#58 adds sensor_gc1084_t23 and its sinfo entry, and
OpenIPC/firmware#2997 adds gc1084.yaml with the SDK's gc1084-t23.bin.
Once openingenic has them, the board's ingenic-opensdk patch no longer
applies: it creates kernel/sensors/t23/gc1084 and adds the same sinfo
line. The yaml is the same as firmware's.

The board keeps its gc1084-t23.bin. That is the camera's stock tune,
the same bytes as Vstarcam's own T23 firmware ships, and it overrides
the SDK file through the device overlay.
@openipc-ai

Copy link
Copy Markdown
Collaborator Author

On the hardware-evidence finding: correct, this file has not run on a camera, and the description says so.

What it can change: libimp loads /etc/sensor/<sensor>-t23.bin by the detected sensor's name, so only a T23 camera whose sensor is a GC1084 reads it. On a generic T23 image today, such a camera has no driver and no tuning, and gets no video at all. No camera that streams now changes behaviour.

The one board build for this sensor, OpenIPC/builder#278 (Vstarcam C8622), replaces this file with the camera's stock tune through its device overlay. Its author reports video working with that tune.

This file stays the generic default because it traces to an Ingenic SDK release (T23 SDK 1.3.0), as best_practices.md §2.4 asks. The stock tune was extracted from one vendor's firmware.

@openipc-ai
openipc-ai merged commit 42f2bf1 into master Nov 28, 2026
31 checks passed
@openipc-ai
openipc-ai deleted the ingenic-t23-gc1084 branch November 28, 2026 23:08
@openipc-ai

Copy link
Copy Markdown
Collaborator Author

A correction to my reply above: since OpenIPC/builder@a0d9e31, builder#278 no longer overrides this file. The C8622 now runs this SDK 1.3.0 tune. I've asked there for a video check on that head, which would be this file's first evidence from a real camera.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant