<div dir="ltr"><div dir="ltr">Hi Nícolas,<div><br></div><div>Thank you for your work.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 21 Apr 2021 at 17:52, Nícolas F. R. A. Prado <<a href="mailto:nfraprado@collabora.com">nfraprado@collabora.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The QueueDepth property reports the minimum amount of requests needed in<br>
the camera pipeline.<br>
<br>
Signed-off-by: Nícolas F. R. A. Prado <<a href="mailto:nfraprado@collabora.com" target="_blank">nfraprado@collabora.com</a>><br>
---<br>
src/libcamera/pipeline/ipu3/ipu3.cpp | 4 ++++<br>
src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ++++<br>
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 ++<br>
src/libcamera/pipeline/rkisp1/rkisp1_path.h | 4 ++--<br>
src/libcamera/pipeline/simple/simple.cpp | 6 ++++--<br>
src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 2 ++<br>
src/libcamera/pipeline/vimc/vimc.cpp | 3 +++<br>
src/libcamera/property_ids.yaml | 5 +++++<br>
8 files changed, 26 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp<br>
index 51446fcf5bc1..6067db2f37a3 100644<br>
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp<br>
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp<br>
@@ -1049,6 +1049,10 @@ int PipelineHandlerIPU3::registerCameras()<br>
/* Initialize the camera properties. */<br>
data->properties_ = cio2->sensor()->properties();<br>
<br>
+ /* TODO This can be changed to CIO2 after configuration, but<br>
+ * both are 4 currently */<br>
+ data->properties_.set(properties::QueueDepth, 4);<br>
+<br>
ret = initControls(data.get());<br>
if (ret)<br>
continue;<br>
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
index 2a917455500f..8d1ade3a4352 100644<br>
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
@@ -1035,6 +1035,10 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)<br>
/* Initialize the camera properties. */<br>
data->properties_ = data->sensor_->properties();<br>
<br>
+ /* TODO Can be 1, 2 or 4 depending on configuration, for now use the max<br>
+ * which is 4 */<br>
+ data->properties_.set(properties::QueueDepth, 4);<br>
+<br></blockquote><div><br></div><div>Going by the definition given in the cover letter for this patch:</div><div><br></div><div>> So patch 1 adds the new QueueDepth property to report the minimum amount of</div>> requests needed by the pipeline handler.</div><div class="gmail_quote"><br></div><div class="gmail_quote">This value should be set to a value of 1 for the Raspberry Pi pipeline handler.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Regards,</div><div class="gmail_quote">Naush</div><div class="gmail_quote"><br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
/*<br>
* Set a default value for the ScalerCropMaximum property to show<br>
* that we support its use, however, initialise it to zero because<br>
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp<br>
index 549f4a4e61a8..7d876e9387d7 100644<br>
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp<br>
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp<br>
@@ -21,6 +21,7 @@<br>
#include <libcamera/ipa/core_ipa_interface.h><br>
#include <libcamera/ipa/rkisp1_ipa_interface.h><br>
#include <libcamera/ipa/rkisp1_ipa_proxy.h><br>
+#include <libcamera/property_ids.h><br>
#include <libcamera/request.h><br>
#include <libcamera/stream.h><br>
<br>
@@ -940,6 +941,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)<br>
<br>
/* Initialize the camera properties. */<br>
data->properties_ = data->sensor_->properties();<br>
+ data->properties_.set(properties::QueueDepth, RKISP1_BUFFER_COUNT);<br>
<br>
/*<br>
* \todo Read dealy values from the sensor itself or from a<br>
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h<br>
index 3b3e37d258d0..7540dd41ad84 100644<br>
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h<br>
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h<br>
@@ -26,6 +26,8 @@ class V4L2Subdevice;<br>
struct StreamConfiguration;<br>
struct V4L2SubdeviceFormat;<br>
<br>
+static constexpr unsigned int RKISP1_BUFFER_COUNT = 4;<br>
+<br>
class RkISP1Path<br>
{<br>
public:<br>
@@ -56,8 +58,6 @@ public:<br>
Signal<FrameBuffer *> &bufferReady() { return video_->bufferReady; }<br>
<br>
private:<br>
- static constexpr unsigned int RKISP1_BUFFER_COUNT = 4;<br>
-<br>
const char *name_;<br>
bool running_;<br>
<br>
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp<br>
index f6095d38e97a..6ee24f2f14e8 100644<br>
--- a/src/libcamera/pipeline/simple/simple.cpp<br>
+++ b/src/libcamera/pipeline/simple/simple.cpp<br>
@@ -22,6 +22,7 @@<br>
#include <linux/media-bus-format.h><br>
<br>
#include <libcamera/camera.h><br>
+#include <libcamera/property_ids.h><br>
#include <libcamera/request.h><br>
#include <libcamera/stream.h><br>
<br>
@@ -141,6 +142,8 @@ static const SimplePipelineInfo supportedDevices[] = {<br>
<br>
} /* namespace */<br>
<br>
+static constexpr unsigned int kNumInternalBuffers = 3;<br>
+<br>
class SimpleCameraData : public CameraData<br>
{<br>
public:<br>
@@ -238,8 +241,6 @@ protected:<br>
int queueRequestDevice(Camera *camera, Request *request) override;<br>
<br>
private:<br>
- static constexpr unsigned int kNumInternalBuffers = 3;<br>
-<br>
SimpleCameraData *cameraData(const Camera *camera)<br>
{<br>
return static_cast<SimpleCameraData *>(<br>
@@ -424,6 +425,7 @@ int SimpleCameraData::init()<br>
}<br>
<br>
properties_ = sensor_->properties();<br>
+ properties_.set(properties::QueueDepth, kNumInternalBuffers);<br>
<br>
return 0;<br>
}<br>
diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp<br>
index b6c6ade5ebaf..591f46b60d23 100644<br>
--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp<br>
+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp<br>
@@ -525,6 +525,8 @@ int UVCCameraData::init(MediaDevice *media)<br>
properties_.set(properties::PixelArraySize, resolution);<br>
properties_.set(properties::PixelArrayActiveAreas, { Rectangle(resolution) });<br>
<br>
+ properties_.set(properties::QueueDepth, 4);<br>
+<br>
/* Initialise the supported controls. */<br>
ControlInfoMap::Map ctrls;<br>
<br>
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp<br>
index 8f5f4ba30953..605b3fe89152 100644<br>
--- a/src/libcamera/pipeline/vimc/vimc.cpp<br>
+++ b/src/libcamera/pipeline/vimc/vimc.cpp<br>
@@ -20,6 +20,7 @@<br>
#include <libcamera/formats.h><br>
#include <libcamera/ipa/ipa_interface.h><br>
#include <libcamera/ipa/ipa_module_info.h><br>
+#include <libcamera/property_ids.h><br>
#include <libcamera/request.h><br>
#include <libcamera/stream.h><br>
<br>
@@ -516,6 +517,8 @@ int VimcCameraData::init()<br>
/* Initialize the camera properties. */<br>
properties_ = sensor_->properties();<br>
<br>
+ properties_.set(properties::QueueDepth, 4);<br>
+<br>
return 0;<br>
}<br>
<br>
diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml<br>
index 104e9aaf4fa3..0b7d1271a26b 100644<br>
--- a/src/libcamera/property_ids.yaml<br>
+++ b/src/libcamera/property_ids.yaml<br>
@@ -678,6 +678,11 @@ controls:<br>
\todo Turn this property into a "maximum control value" for the<br>
ScalerCrop control once "dynamic" controls have been implemented.<br>
<br>
+ - QueueDepth:<br>
+ type: int32_t<br>
+ description: |<br>
+ Minimum amount of requests needed in the camera pipeline.<br>
+<br>
# ----------------------------------------------------------------------------<br>
# Draft properties section<br>
<br>
-- <br>
2.31.1<br>
<br>
_______________________________________________<br>
libcamera-devel mailing list<br>
<a href="mailto:libcamera-devel@lists.libcamera.org" target="_blank">libcamera-devel@lists.libcamera.org</a><br>
<a href="https://lists.libcamera.org/listinfo/libcamera-devel" rel="noreferrer" target="_blank">https://lists.libcamera.org/listinfo/libcamera-devel</a><br>
</blockquote></div></div>