libcamera: ipu3: Do not overwrite StreamConfiguration

The validate function overwrites the generated StreamConfiguration with
the one reported by the CIO2 unit when inspecting the RAW stream
configuration.

As we prepare to add StreamFormats to the IPU3 StreamConfiguration,
assigning to the CIO2 generated configuration would delete the
StreamFormats.

Fix this by updating relevant fields only in order to keep the
assigned StreamFormats.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi
2020-06-29 18:32:22 +02:00
parent 6db776d55a
commit 3424fef3a5

View File

@@ -270,7 +270,9 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()
const Stream *stream = streams_[i];
if (stream == &data_->rawStream_) {
cfg = cio2Configuration_;
cfg.size = cio2Configuration_.size;
cfg.pixelFormat = cio2Configuration_.pixelFormat;
cfg.bufferCount = cio2Configuration_.bufferCount;
} else {
bool scale = stream == &data_->vfStream_;
adjustStream(config_[i], scale);