Show a patch.

GET /api/1.1/patches/12050/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 12050,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/12050/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12050/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20210421165139.318432-2-nfraprado@collabora.com>",
    "date": "2021-04-21T16:51:36",
    "name": "[libcamera-devel,v3,1/4] libcamera: property: Add QueueDepth property",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "7f5cf1f1956f734df5f5b9c64e0d61e4b7ab6e43",
    "submitter": {
        "id": 84,
        "url": "https://patchwork.libcamera.org/api/1.1/people/84/?format=api",
        "name": "Nícolas F. R. A. Prado",
        "email": "nfraprado@collabora.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/12050/mbox/",
    "series": [
        {
            "id": 1958,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1958/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1958",
            "date": "2021-04-21T16:51:35",
            "name": "lc-compliance: Add test to queue more requests than hardware depth",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/1958/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12050/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12050/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E18C7BDB15\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 Apr 2021 16:52:25 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A16D16884C;\n\tWed, 21 Apr 2021 18:52:25 +0200 (CEST)",
            "from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DA00B68846\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Apr 2021 18:52:22 +0200 (CEST)",
            "from [127.0.0.1] (localhost [127.0.0.1])\n\t(Authenticated sender: nfraprado) with ESMTPSA id D859C1F423EB"
        ],
        "From": "=?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 21 Apr 2021 13:51:36 -0300",
        "Message-Id": "<20210421165139.318432-2-nfraprado@collabora.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20210421165139.318432-1-nfraprado@collabora.com>",
        "References": "<20210421165139.318432-1-nfraprado@collabora.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v3 1/4] libcamera: property: Add\n\tQueueDepth property",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Cc": "=?utf-8?q?Andr=C3=A9_Almeida?= <andrealmeid@collabora.com>,\n\tkernel@collabora.com",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The QueueDepth property reports the minimum amount of requests needed in\nthe camera pipeline.\n\nSigned-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp               | 4 ++++\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ++++\n src/libcamera/pipeline/rkisp1/rkisp1.cpp           | 2 ++\n src/libcamera/pipeline/rkisp1/rkisp1_path.h        | 4 ++--\n src/libcamera/pipeline/simple/simple.cpp           | 6 ++++--\n src/libcamera/pipeline/uvcvideo/uvcvideo.cpp       | 2 ++\n src/libcamera/pipeline/vimc/vimc.cpp               | 3 +++\n src/libcamera/property_ids.yaml                    | 5 +++++\n 8 files changed, 26 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 51446fcf5bc1..6067db2f37a3 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -1049,6 +1049,10 @@ int PipelineHandlerIPU3::registerCameras()\n \t\t/* Initialize the camera properties. */\n \t\tdata->properties_ = cio2->sensor()->properties();\n \n+\t\t/* TODO This can be changed to CIO2 after configuration, but\n+\t\t * both are 4 currently */\n+\t\tdata->properties_.set(properties::QueueDepth, 4);\n+\n \t\tret = initControls(data.get());\n \t\tif (ret)\n \t\t\tcontinue;\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 2a917455500f..8d1ade3a4352 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1035,6 +1035,10 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \t/* Initialize the camera properties. */\n \tdata->properties_ = data->sensor_->properties();\n \n+\t/* TODO Can be 1, 2 or 4 depending on configuration, for now use the max\n+\t * which is 4 */\n+\tdata->properties_.set(properties::QueueDepth, 4);\n+\n \t/*\n \t * Set a default value for the ScalerCropMaximum property to show\n \t * that we support its use, however, initialise it to zero because\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 549f4a4e61a8..7d876e9387d7 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -21,6 +21,7 @@\n #include <libcamera/ipa/core_ipa_interface.h>\n #include <libcamera/ipa/rkisp1_ipa_interface.h>\n #include <libcamera/ipa/rkisp1_ipa_proxy.h>\n+#include <libcamera/property_ids.h>\n #include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n@@ -940,6 +941,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n \n \t/* Initialize the camera properties. */\n \tdata->properties_ = data->sensor_->properties();\n+\tdata->properties_.set(properties::QueueDepth, RKISP1_BUFFER_COUNT);\n \n \t/*\n \t * \\todo Read dealy values from the sensor itself or from a\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\nindex 3b3e37d258d0..7540dd41ad84 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n@@ -26,6 +26,8 @@ class V4L2Subdevice;\n struct StreamConfiguration;\n struct V4L2SubdeviceFormat;\n \n+static constexpr unsigned int RKISP1_BUFFER_COUNT = 4;\n+\n class RkISP1Path\n {\n public:\n@@ -56,8 +58,6 @@ public:\n \tSignal<FrameBuffer *> &bufferReady() { return video_->bufferReady; }\n \n private:\n-\tstatic constexpr unsigned int RKISP1_BUFFER_COUNT = 4;\n-\n \tconst char *name_;\n \tbool running_;\n \ndiff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\nindex f6095d38e97a..6ee24f2f14e8 100644\n--- a/src/libcamera/pipeline/simple/simple.cpp\n+++ b/src/libcamera/pipeline/simple/simple.cpp\n@@ -22,6 +22,7 @@\n #include <linux/media-bus-format.h>\n \n #include <libcamera/camera.h>\n+#include <libcamera/property_ids.h>\n #include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n@@ -141,6 +142,8 @@ static const SimplePipelineInfo supportedDevices[] = {\n \n } /* namespace */\n \n+static constexpr unsigned int kNumInternalBuffers = 3;\n+\n class SimpleCameraData : public CameraData\n {\n public:\n@@ -238,8 +241,6 @@ protected:\n \tint queueRequestDevice(Camera *camera, Request *request) override;\n \n private:\n-\tstatic constexpr unsigned int kNumInternalBuffers = 3;\n-\n \tSimpleCameraData *cameraData(const Camera *camera)\n \t{\n \t\treturn static_cast<SimpleCameraData *>(\n@@ -424,6 +425,7 @@ int SimpleCameraData::init()\n \t}\n \n \tproperties_ = sensor_->properties();\n+\tproperties_.set(properties::QueueDepth, kNumInternalBuffers);\n \n \treturn 0;\n }\ndiff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\nindex b6c6ade5ebaf..591f46b60d23 100644\n--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n@@ -525,6 +525,8 @@ int UVCCameraData::init(MediaDevice *media)\n \tproperties_.set(properties::PixelArraySize, resolution);\n \tproperties_.set(properties::PixelArrayActiveAreas, { Rectangle(resolution) });\n \n+\tproperties_.set(properties::QueueDepth, 4);\n+\n \t/* Initialise the supported controls. */\n \tControlInfoMap::Map ctrls;\n \ndiff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\nindex 8f5f4ba30953..605b3fe89152 100644\n--- a/src/libcamera/pipeline/vimc/vimc.cpp\n+++ b/src/libcamera/pipeline/vimc/vimc.cpp\n@@ -20,6 +20,7 @@\n #include <libcamera/formats.h>\n #include <libcamera/ipa/ipa_interface.h>\n #include <libcamera/ipa/ipa_module_info.h>\n+#include <libcamera/property_ids.h>\n #include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n@@ -516,6 +517,8 @@ int VimcCameraData::init()\n \t/* Initialize the camera properties. */\n \tproperties_ = sensor_->properties();\n \n+\tproperties_.set(properties::QueueDepth, 4);\n+\n \treturn 0;\n }\n \ndiff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\nindex 104e9aaf4fa3..0b7d1271a26b 100644\n--- a/src/libcamera/property_ids.yaml\n+++ b/src/libcamera/property_ids.yaml\n@@ -678,6 +678,11 @@ controls:\n         \\todo Turn this property into a \"maximum control value\" for the\n         ScalerCrop control once \"dynamic\" controls have been implemented.\n \n+  - QueueDepth:\n+      type: int32_t\n+      description: |\n+        Minimum amount of requests needed in the camera pipeline.\n+\n   # ----------------------------------------------------------------------------\n   # Draft properties section\n \n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "1/4"
    ]
}