[v2,3/7] libcamera: Add rkisp1 vendor control definitions
diff mbox series

Message ID 20260220221636.216353-4-rui.wang@ideasonboard.com
State New
Headers show
Series
  • ipa: rkisp1: make Filter tuning-driven and add manual controls
Related show

Commit Message

Rui Wang Feb. 20, 2026, 10:16 p.m. UTC
-Add rkisp1 control in meson.
 -Define rkisp1 filter controls in a new control_ids_rkisp1.yaml.
 -Reserve the rkisp1 vendor range in control_ranges.yaml.

Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>
---
 include/libcamera/meson.build         |   1 +
 src/libcamera/control_ids_rkisp1.yaml | 151 ++++++++++++++++++++++++++
 src/libcamera/control_ranges.yaml     |   4 +-
 3 files changed, 155 insertions(+), 1 deletion(-)
 create mode 100644 src/libcamera/control_ids_rkisp1.yaml

Patch
diff mbox series

diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index 30ea76f9..3fd7ef94 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -39,6 +39,7 @@  controls_map = {
         'draft': 'control_ids_draft.yaml',
         'rpi/pisp': 'control_ids_rpi.yaml',
         'rpi/vc4': 'control_ids_rpi.yaml',
+        'rkisp1': 'control_ids_rkisp1.yaml',
     },
 
     'properties': {
diff --git a/src/libcamera/control_ids_rkisp1.yaml b/src/libcamera/control_ids_rkisp1.yaml
new file mode 100644
index 00000000..1fe92e45
--- /dev/null
+++ b/src/libcamera/control_ids_rkisp1.yaml
@@ -0,0 +1,151 @@ 
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# Copyright (C) 2026, Ideas On Board
+#
+# RkISP1 specific control definitions
+---
+vendor: rkisp1
+controls:
+  # --- RkISP1 Filter controls ---
+  - FilterEnable:
+      type: int32_t
+      direction: inout
+      description: |
+        Enable or disable the Filter processing.
+        When disabled (false) the hardware filter is forced off regardless of
+        filter mode selection. When enabled (true) the algorithm may
+        program parameters and adapt them from manual mode overrides.
+        Reported in metadata as an int32_t.
+      enum:
+        - name: FilterEnableOff
+          value: 0
+          description: The filter is disabled.
+        - name: FilterEnableOn
+          value: 1
+          description: The filter is enabled.
+
+  - FilterFacSh0:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the fac_sh0 sharpness factor.
+        Value maps to hardware filter register (typically 0..63).
+      minimum: 0
+      maximum: 63
+
+  - FilterFacSh1:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the fac_sh1 sharpness factor.
+        Value maps to hardware filter register (typically 0..63).
+      minimum: 0
+      maximum: 63
+
+  - FilterFacMid:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the fac_mid sharpness factor.
+        Value maps to hardware filter register (typically 0..63).
+      minimum: 0
+      maximum: 63
+
+  - FilterFacBl0:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the fac_bl0 sharpness factor.
+        Value maps to hardware filter register (typically 0..63).
+      minimum: 0
+      maximum: 63
+
+  - FilterFacBl1:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the fac_bl1 sharpness factor.
+        Value maps to hardware filter register (typically 0..63).
+      minimum: 0
+      maximum: 63
+
+  - FilterThreshSh0:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the thresh_sh0 denoise threshold.
+        Value maps to hardware threshold register (typically 0..255).
+      minimum: 0
+      maximum: 255
+
+  - FilterThreshSh1:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the thresh_sh1 denoise threshold.
+        Value maps to hardware threshold register (typically 0..255).
+      minimum: 0
+      maximum: 255
+
+  - FilterThreshBl0:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the thresh_bl0 denoise threshold.
+        Value maps to hardware threshold register (typically 0..255).
+      minimum: 0
+      maximum: 255
+
+  - FilterThreshBl1:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the thresh_bl1 denoise threshold.
+        Value maps to hardware threshold register (typically 0..255).
+      minimum: 0
+      maximum: 255
+
+  - FilterDenoiseMode:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the denoise mode for the filter.
+        Value maps to hardware mode register (typically 0..255).
+      minimum: 0
+      maximum: 255
+
+  - FilterDenoiseLumWeight:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the luminance weight for denoise.
+        Value maps to hardware lum_weight register (typically 0..255).
+      minimum: 0
+      maximum: 255
+
+  - FilterDenoiseGreenStage1:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the green stage 1 filter for denoise.
+        Value maps to hardware grn_stage1 register (typically 0..7).
+      minimum: 0
+      maximum: 7
+
+  - FilterDenoiseChrVMode:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the chroma vertical mode for denoise.
+        Value maps to hardware chr_v_mode register (typically 0..3).
+      minimum: 0
+      maximum: 3
+
+  - FilterDenoiseChrHMode:
+      type: int32_t
+      direction: inout
+      description: |
+        Sets the chroma horizontal mode for denoise.
+        Value maps to hardware chr_h_mode register (typically 0..3).
+      minimum: 0
+      maximum: 3
diff --git a/src/libcamera/control_ranges.yaml b/src/libcamera/control_ranges.yaml
index 6752eb98..4964894b 100644
--- a/src/libcamera/control_ranges.yaml
+++ b/src/libcamera/control_ranges.yaml
@@ -15,6 +15,8 @@  ranges:
   rpi: 20000
   # Controls for debug metadata
   debug: 30000
-  # Next range starts at 40000
+  # Rockchip ISP1 vendor controls
+  rkisp1: 40000
+  # Next range starts at 50000
 
 ...