Show a patch.

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

{
    "id": 9555,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/9555/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/9555/",
    "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": "<20200909131014.115092-1-jacopo@jmondi.org>",
    "date": "2020-09-09T13:10:14",
    "name": "[libcamera-devel,RFC] libcamera: ipu3: Always use sensor full frame size",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "a311b7731d19749cd9a36dec2a42a58b408274a4",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/9555/mbox/",
    "series": [
        {
            "id": 1280,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1280/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1280",
            "date": "2020-09-09T13:10:14",
            "name": "[libcamera-devel,RFC] libcamera: ipu3: Always use sensor full frame size",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1280/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/9555/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/9555/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 F2514BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  9 Sep 2020 13:06:30 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CFE7562B90;\n\tWed,  9 Sep 2020 15:06:30 +0200 (CEST)",
            "from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1860D60534\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  9 Sep 2020 15:06:29 +0200 (CEST)",
            "from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id AB0A510001A;\n\tWed,  9 Sep 2020 13:06:28 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  9 Sep 2020 15:10:14 +0200",
        "Message-Id": "<20200909131014.115092-1-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.28.0",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [RFC] libcamera: ipu3: Always use sensor full\n\tframe size",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "When calculating the pipeline configuration for the IPU3 platform,\nlibcamera tries to be smart and select the smaller sensor frame\nresolution larger enough to accommodate the stream sizes\nrequested by the application.\n\nWhile this seems to make a lot of sense, in practice optimizing the\nselected sensor resolution makes the pipeline configuration calculation\nprocess fail in multiple occasions, or results in stalls in the capture\nprocess.\n\nAs a trivial example, capturing with cam with the following command\nline result in a stall:\n$ cam -swidth=1280,height=720 -swidth=640,height=480 -c1 -C\n\nLikewise, the Android HAL supported format enumeration fails in\nreporting smaller resolutions as supported, when used with the OV5670\nsensor.\n\n320x240:\nDEBUG IPU3 ipu3.cpp:192 CIO2 configuration: 648x486-SGRBG10_IPU3\nERROR IPU3 imgu.cpp:408 Failed to calculate pipe configuration\nERROR IPU3 ipu3.cpp:299 Failed to calculate pipe configuration: unsupported resolutions.\n\n640x480:\nDEBUG IPU3 ipu3.cpp:192 CIO2 configuration: 648x486-SGRBG10_IPU3\nERROR IPU3 imgu.cpp:408 Failed to calculate pipe configuration\nERROR IPU3 ipu3.cpp:299 Failed to calculate pipe configuration: unsupported resolutions.\n\nFurthermore the reference .xml files used for the IPU3 camera\nconfiguration on the ChromeOS platform restrict the number of sensor\nresolution to be used for the OV5670 sensor to 2 from the 6 supported by\nthe driver [1].\n\nThe selection criteria of the correct CIO2 mode are not specified, and\nfor the time being, always use the sensor maximum resolution at the\nexpense of frame rate and bus bandwidth allows the pipeline to successfully\nsupport smaller modes for the OV5670 sensor and solves pipeline stalls\nwhen capturing with both sensors.\n\n[1] See the <sensor_modes> enumeration in:\nhttps://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/master/baseboard-poppy/media-libs/cros-camera-hal-configs-poppy/files/gcss/graph_settings_ov5670.xml\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 9 +--------\n 1 file changed, 1 insertion(+), 8 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 2d881fe28f98..488e9fff299e 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -155,14 +155,12 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \tunsigned int rawCount = 0;\n \tunsigned int yuvCount = 0;\n \tSize maxYuvSize;\n-\tSize maxRawSize;\n \n \tfor (const StreamConfiguration &cfg : config_) {\n \t\tconst PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);\n \n \t\tif (info.colourEncoding == PixelFormatInfo::ColourEncodingRAW) {\n \t\t\trawCount++;\n-\t\t\tmaxRawSize.expandTo(cfg.size);\n \t\t} else {\n \t\t\tyuvCount++;\n \t\t\tmaxYuvSize.expandTo(cfg.size);\n@@ -174,18 +172,13 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \t\treturn Invalid;\n \t}\n \n-\tif (maxRawSize.isNull())\n-\t\tmaxRawSize = maxYuvSize.alignedUpTo(IMGU_OUTPUT_WIDTH_MARGIN,\n-\t\t\t\t\t\t    IMGU_OUTPUT_HEIGHT_MARGIN)\n-\t\t\t\t       .boundedTo(data_->cio2_.sensor()->resolution());\n-\n \t/*\n \t * Generate raw configuration from CIO2.\n \t *\n \t * The output YUV streams will be limited in size to the maximum\n \t * frame size requested for the RAW stream.\n \t */\n-\tcio2Configuration_ = data_->cio2_.generateConfiguration(maxRawSize);\n+\tcio2Configuration_ = data_->cio2_.generateConfiguration({});\n \tif (!cio2Configuration_.pixelFormat.isValid())\n \t\treturn Invalid;\n \n",
    "prefixes": [
        "libcamera-devel",
        "RFC"
    ]
}