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

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

Message

Paul Elder Nov. 17, 2025, 8:08 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.

v6 notably moves ipa_control_value_entry into ipa_control_info_entry, as
opposed to serializing them in the same level like before.

v5 contains minor cleanups.

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   |   8 +-
 include/libcamera/ipa/ipa_controls.h          |  16 +-
 src/ipa/ipu3/ipu3.cpp                         |   4 +-
 src/ipa/mali-c55/mali-c55.cpp                 |   4 +-
 src/ipa/rkisp1/algorithms/awb.cpp             |   4 +-
 src/ipa/rkisp1/rkisp1.cpp                     |   3 +-
 src/ipa/rpi/common/ipa_base.cpp               |   7 +-
 src/libcamera/control_serializer.cpp          | 106 +++++++----
 src/libcamera/ipa_controls.cpp                | 178 ++++++++++--------
 9 files changed, 197 insertions(+), 133 deletions(-)