Skip to content

Module Parameters

Lu-Fi edited this page Oct 11, 2026 · 3 revisions

Module parameters (open-tx-isp)

Parameters are set on the module load line (thingino: /etc/modules.d/*, for example tx-isp-t31 isp_clk=100000000) or read at runtime from /sys/module/<module>/parameters/ where the permission allows. Permission 0444 means read-only after load. Names and defaults below were checked against the driver sources of the RC1 tag (v2026.10.11-rc1); defaults are the initial values in the source, a thingino load line can override them. Permission 0 means the parameter is not visible in sysfs and can only be given on the load line.

Many diagnostic parameters exist per SoC (T23 regtrace source_*/direct_*, T40 enable_*, T41 t41_* telemetry). Only the ones that matter to users are listed; the rest are bring-up switches and read-only statistics. Do not change them in production.

Common to all SoCs

Parameter Type / perm Default Meaning
isp_clk int, 0444 on T31, otherwise not in sysfs (perm 0) T20: 90000000 (T10 builds from the T20 SDK sources); T21: 100000000; T23: 153000000; T30: 90000000; T31: 200000000; T40: 200000000; T41: 285000000 ISP core clock in Hz. Leave at default unless a sensor mode needs more.
print_level int, 0444 on T31, otherwise perm 0 1 (T21, T23, T30, T40, T41); ISP_WARN_LEVEL = 1 (T31) ISP driver log verbosity.
qbuf_guard bool, 0644 1 Reject frame-channel QBUF buffers that lie outside the rmem window from the kernel command line. Protects against stray DMA. 0 disables the check (debug only). T20, T21, T23, T31, T41.
isp_memopt int, read-only 1 on T41, 0 on T23, T31, T40 ISP memory optimisation. T23, T31, T40, T41.
direct_mode int, perm 0 0 ISP direct mode. T23, T41.

| fcrop_upscale_pct | uint, 0644 | 0 | Front crop (IMP_ISP_Tuning_SetFrontCrop): percentage by which the geometry check tolerates an MSCA upscale; 0 = no upscaling allowed, a window smaller than a running channel's scaler output is refused with -EINVAL. T23 and T31 only. Measured on T23: upscaling up to 2.0 works, at 2.2 the MSCA stalled briefly and the crop was dropped without a reboot; the T31 limit was not established, leave it at 0. Also a runtime marker: /sys/module/tx_isp_t23/parameters/fcrop_upscale_pct or /sys/module/tx_isp_t31/parameters/fcrop_upscale_pct exists only in drivers with the safe front-crop path, so an application can test for the file before offering front crop. |

T10 / T20 (shared firmware generation)

Parameter Default Meaning
isp_mmap_pool_kb 0 Size of the optional V4L2-MMAP frame pool (T10/T20) in KiB. OpenIMP uses USERPTR buffers from rmem and never needs it, so it is off; a V4L2 MMAP client gets -ENOMEM and one log line with the size to set (e.g. set isp_mmap_pool_kb=8104). Before 2026-10-04 the default was 8192 and cost 8 MB of lowmem.
t20_simple_ae 1 Bounded histogram AE instead of the recovered OEM AE state graph.
t20_simple_awb 1 Bounded metering-feedback AWB instead of the OEM AWB state graph.
t20_simple_awb_static_only 0 Hold the four static WB gains of the active IQ file (AWB diagnostics).
t20_simple_nr 1 Gain-driven ISP denoise from the active IQ tables.
t20_simple_sharpen 0 Always apply gain-driven sharpening from the compact AE.
t20_trace, t20_trace_events, t20_*_allow_mask, t20_frame_end_stage, t20_park_fw_after_first_pass various Firmware event tracing and IRQ/event gating (bring-up).
t20_ae_last_*, t20_awb_last_*, t20_iridix_* (0444) - Read-only controller telemetry (last mean, target, exposure, gains, colour temperature). Useful to watch AE/AWB convergence from the shell.

T10/T20 in RC1: /proc/jz/isp/isp-m0 ("MAX SENSOR analog gain") reports the analog gain the AE really reaches (the smaller of the sensor maximum and the SetMaxAgain ceiling, rounded to the sensor's gain table step); a day/night rule that waits for the cap depends on it. There is no parameter for it.

T21

Parameter Default Meaning
ae_step_shift, ae_hold_pct - No-ops since the stock AE runs; kept for load-line compatibility.
adr_bypass 0 Diagnostic: force the ADR bit in the top bypass register off.
awb_lux_hyst 10 (percent) AWB lux/low-light threshold hysteresis band; 0 = vendor behaviour.
awb_ir_freeze 1 Freeze AWB at night and restore the day gains on return to day; 0 = vendor behaviour.
ct_event_thresh 50 Colour-temperature change (K) required before a CT event; reduces register writes.
irqoff_stat, irqoff_max_us 0 Debug: measure the longest IRQs-off time of the ISP event thread.
free_watch (0444) - Debug watch of freed buffers.

T23

Stock-like defaults of RC1 (they ran overnight plus many application restarts). Parameters with 0644 can be changed at run time under /sys/module/tx_isp_t23/parameters/. "debug" parameters exist for bisecting.

Parameter Default Meaning
chan_stop_keep_input 1 Keep the input (CSI, sensor, VIC, TISP core) running after the last frame channel STREAMOFF while the ISP streams, as stock does. 0 stops the input with the last channel (debug; hangs together with msca_fifo_rearm=1)
msca_keep_enabled 2 STREAMOFF and the MSCA output enable bit: 0 clear, 1 keep when the input stops too, 2 always keep (stock style)
msca_fifo_rearm 0 1 clears and refills a stopped channel's MSCA address FIFO at STREAMON (debug)
msca_flip_skip_noop 1 No MSCA update request for unchanged mirror/flip bits
msca_restart_skip 1 No MSCA reload on STREAMON of a still-enabled output with unchanged geometry
msca_session_release 1 An ISP STREAMON with the input stopped switches off MSCA outputs left enabled and clears their FIFOs
msca_scratch 1 STREAMOFF parks a kept MSCA output on a scratch area at the tail of the ISP buffer (900 KiB at 720p); QBUFs of a parked channel are held until STREAMON. Read-only counters msca_scratch_*. 0 = off (first thing to try if a stop/start hangs)
chan_stop_drain 21 STREAMOFF waits up to N x 10 ms until queued buffers have left the hardware; 0 = no wait
qbuf_cache_inv 1 QBUF invalidates the buffer's cache lines before the addresses reach the FIFO (as stock); 0 = off (debug)
source_af 1 (0444) AF statistics chain of the stock module (AF block, AF interrupt, the AF getters/setters); 0 = off. No measurable CPU or interrupt cost
source_ae_oem 1 (0444) 1 = AE lifted from the OEM module (emulator-identical, backlight compensation and highlight depress); 0 = substitute AE (needs module reload)
ae_oem_debug 0 Log exposure and gain changes of the lifted AE (0644)
source_adr_oem 1 (0444) Lifted vendor ADR
isp_clka, isp_clk 416000000, 153000000 (load time) ISP AXI and core clocks in Hz; they really reach the hardware (earlier builds read the wrong clock-table slot)
fcrop_upscale_pct 0 see "Common to all SoCs"
crumbs, t23_runtime_trace 0 hang analysis markers, informational logging
isp_day_night_switch_drop_frame_num, isp_ch1_dequeue_delay_time, isp_ch0_pre_dequeue_* int frame pacing around day/night switch and channel dequeue
ivdc_threshold_line, ivdc_mem_line int IVDC (direct mode) line thresholds
text_watch, enable_irqs_on_streamon, log_framechan_payloads, direct_*, source_* bool/uint register-trace and bring-up switches

T30

isp_clk, print_level, isp_m1_bufs, isp_m2_bufs (number of buffers on channels 1 and 2), simple_3a, simple_awb, and geometry overrides (ispw, isph, ispleft, isptop, ispcrop*, ispscaler*).

T31

fcrop_upscale_pct (0644, default 0) is described under "Common to all SoCs". RC1 front-crop rule: T31 digital zoom works only when every running channel has a scaler output no larger than the window; an unscaled main stream makes SetFrontCrop fail with -EINVAL.

Parameter Default Meaning
isp_ae_log 0 AE logging.
ae_freeze 0 Freeze AE (debug).
isp_bypass_all, isp_bypass_override, force_bypass_{adr,defog,dpc,gib,lsc,mdns} 0 Bypass pipeline blocks for image-quality bisection.
force_identity_ccm, force_ccm_* 0 Force an identity or custom colour matrix.
sensor_expo_catchups - Sensor exposure catch-up behaviour.
csi_dump_enable, csi_dump_interval_ms, t31_runtime_trace 0 CSI and runtime tracing.

T41 (experimental)

Mostly read-only telemetry t41_* (AE/AWB/CCM/LSC/gamma states and error counters) plus bring-up switches (t41_defer_*, t41_late_start_mask, t41_checkpoint_*). Notable:

Parameter Default Meaning
t41_native_awb 1 (0444) Use the privately owned, frame-driven calibrated AWB.
t41_ae_flicker_frequency_hz, t41_ae_flicker_*_lines - Anti-flicker frequency and exposure line limits.
t41_adr_bypass - Bypass ADR (diagnostic).
isp_clk, isp_clka, isp_clks - ISP, AXI and scaler clocks.
t41_msca_flip_skip_noop 1 (0644) Skip the MSCA update request when the flip bits are unchanged; 0 restores the stock request on every call.
t41_msca_cfg_update 0 (0644) Opt-in. MSCA output geometry, ratios and input size are staged registers that only take effect after a latch request. 0 (default, flashed behaviour) never latches, so every output keeps its reset geometry. 2 latches with the output off (use with t41_msca_stop_disable=1): correct pictures, stable up to a channel 1 of 768x432; a channel 1 of 960x540 or more started mid-stream can hang the SoC, so keep a T41 sub-stream at 768x432 or smaller. 1 latches after enable: correct pictures but the output-restart hang returns after a few restart cycles.
t41_msca_stop_disable 0 (0644) Opt-in. 1 switches a stopped MSCA output off and waits for its frame to finish (stock behaviour); use with t41_msca_cfg_update=2.
t41_msca_latch_timeout_ms 300 (0644) Wait for the geometry latch. Read-only counters msca_start_latches, msca_latch_timeouts, msca_live_disables, msca_latch_wait_max_us.
t41_msca_frame_shadow_commit -1 (0644) Negative emits the exact-stock empty MSCA shadow commit per frame.
t41_stock_msca_unity_curve -1 (0644) Negative commits the exact-stock ratio-specific MSCA curves through shadow RAM; positive restores the old power-on coefficients (A/B).

A module-parameter heap overwrite on T41 occurs only across rmmod/insmod (not in 30 stop/start cycles without a reload). See the driver/t41/README.md of open-tx-isp for the full T41 notes.

T40

Many enable_*, ae_soft_*, awb_*, bcsh_*, ccm_* parameters used while the userspace-driven AE/AWB is tuned; treat them as bring-up controls.

Reading values on the camera

ls /sys/module/ | grep tx_isp
cat /sys/module/tx_isp_t20/parameters/isp_mmap_pool_kb

The module directory name uses underscores (tx_isp_<soc>); verify the exact name with ls /sys/module.

Clone this wiki locally