[v4,0/2] Fix ControlSerializer deserializing array controls
mbox series

Message ID 20251011063333.2169364-1-paul.elder@ideasonboard.com
Headers show
Series
  • Fix ControlSerializer deserializing array controls
Related show

Message

Paul Elder Oct. 11, 2025, 6:33 a.m. UTC
This series fixes bug 285 [0] where running IPAs in isolation with array
controls would cause the control deserialization to fail, since the
deserializer didn't properly deserialize array controls.

This is fixed by making the deserializer properly deserialize array
controls, by adding all ControlValue metadata to the serialized form of
ControlInfoMap.

v4 notably cleans up unused fields in metatata structs, so it touches
ControlList as well.

In v3 we reuse struct ipa_control_value_entry to store the relevant
information instead, and add them to the serialized form of
ControlInfoMap.

In v2 the arrayness and size are stored in the serialized form of
ControlValue instead of using the information registered in the
ControlId. This allows us to support variable-length arrays (which v1
didn't), and allows us to support both non-array and array types min/max
ControlValues in the ControlInfo, depending on which type of min/max
value makes more sense for the specific control.

[0] https://bugs.libcamera.org/show_bug.cgi?id=285

Paul Elder (2):
  libcamera: control_serializer: Add array info to serialized
    ControlValue
  ipa: ipu3, mali-c55, rkisp1, rpi: Fix reporting non-scalar controls

 .../libcamera/internal/control_serializer.h   |   6 +-
 include/libcamera/ipa/ipa_controls.h          |  12 +-
 src/ipa/ipu3/ipu3.cpp                         |   4 +-
 src/ipa/mali-c55/mali-c55.cpp                 |   5 +-
 src/ipa/rkisp1/algorithms/awb.cpp             |   5 +-
 src/ipa/rkisp1/rkisp1.cpp                     |   4 +-
 src/ipa/rpi/common/ipa_base.cpp               |   7 +-
 src/libcamera/control_serializer.cpp          | 117 ++++++++++++------
 src/libcamera/ipa_controls.cpp                |  22 +++-
 9 files changed, 129 insertions(+), 53 deletions(-)