summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/rkisp1/rkisp1.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-03-24 21:15:28 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-04-14 00:28:28 +0200
commite744c9adb02f5d82773ff897e6b72ac56bff70cf (patch)
tree47417e86b236f46f0b4b780bf2802ca738e04b7a /src/libcamera/pipeline/rkisp1/rkisp1.cpp
parent0e577cee9def15d95ad5bd7fce3815a46dad8e81 (diff)
libcamera: pipeline: rkisp1: Queue parameters even if they are not ready
If the IPA has not filled in the parameters buffer still queue it to hardware. Not queuing the buffer results in the pipeline and hardware going out of sync. This is not a permanent fix of the problem and a todo is added to fix it properly. This change does not make the situation worse as the state of the pipeline is just as unknown as if no param buffer is queued as if one with old content in it. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/rkisp1/rkisp1.cpp')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 2f909cef..3d37677f 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -351,13 +351,23 @@ protected:
if (!info)
LOG(RkISP1, Fatal) << "Frame not known";
- if (info->paramFilled)
- pipe_->param_->queueBuffer(info->paramBuffer);
- else
+ /*
+ * \todo: If parameters are not filled a better method to handle
+ * the situation than queuing a buffer with unknown content
+ * should be used.
+ *
+ * It seems excessive to keep an internal zeroed scratch
+ * parameters buffer around as this should not happen unless the
+ * devices is under too much load. Perhaps failing the request
+ * and returning it to the application with an error code is
+ * better than queue it to hardware?
+ */
+ if (!info->paramFilled)
LOG(RkISP1, Error)
<< "Parameters not ready on time for frame "
- << frame() << ", ignore parameters.";
+ << frame();
+ pipe_->param_->queueBuffer(info->paramBuffer);
pipe_->stat_->queueBuffer(info->statBuffer);
pipe_->video_->queueBuffer(info->videoBuffer);
}