Show a patch.

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

{
    "id": 14173,
    "url": "https://patchwork.libcamera.org/api/patches/14173/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14173/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20211018152524.78521-1-jacopo@jmondi.org>",
    "date": "2021-10-18T15:25:24",
    "name": "[libcamera-devel] Revert \"android: camera_device: Configure one stream for identical stream requests\"",
    "commit_ref": "375aeafb58efea248f64832b2e529284385bc777",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "be368859b744cd51eb4e6b89a42fc4b4434a5cd0",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14173/mbox/",
    "series": [
        {
            "id": 2637,
            "url": "https://patchwork.libcamera.org/api/series/2637/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2637",
            "date": "2021-10-18T15:25:24",
            "name": "[libcamera-devel] Revert \"android: camera_device: Configure one stream for identical stream requests\"",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2637/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14173/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14173/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 5B45EC324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Oct 2021 15:24:43 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D4DD868F59;\n\tMon, 18 Oct 2021 17:24:41 +0200 (CEST)",
            "from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A664168F56\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Oct 2021 17:24:40 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id CACA740016;\n\tMon, 18 Oct 2021 15:24:39 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 18 Oct 2021 17:25:24 +0200",
        "Message-Id": "<20211018152524.78521-1-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.33.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] Revert \"android: camera_device: Configure\n\tone stream for identical stream requests\"",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Commit d165f7da34b8 (\"android: camera_device: Configure one stream for\nidentical stream requests\") introduced the ability to generate through\npost-processing YUV streams of identical size and format.\n\nHowver the change didn't fully take into account the situation\nwhere only mapped streams are contained in the request submitted by\nthe camera service to the HAL. In this case the Request will be queued\nwith no buffers and refused by the Camera.\n\nEven if this seems a corner case it causes a few CTS to fail, and more\nproblematically it triggers out-of-order completion of requests, causing\nthe camera service to abort.\n\nERROR Camera camera.cpp:1031 Request contains no buffers\nERROR HAL camera_device.cpp:1109 '\\_SB_.PCI0.I2C2.CAM0': Out-of-order completion for request 0x00007a1f1800ccd0\nERROR cros_camera_service[15706:15711]: [camera_device_adapter.cc(744)] (15711) Notify(): Fatal device error; aborting the camera service\n\nRevert the commit until a proper solution is implemented.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 29 -----------------------------\n 1 file changed, 29 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 901867105085..bd34188809da 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -619,35 +619,6 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)\n \t\t\tcontinue;\n \t\t}\n \n-\t\t/*\n-\t\t * While gralloc usage flags are supposed to report usage\n-\t\t * patterns to select a suitable buffer allocation strategy, in\n-\t\t * practice they're also used to make other decisions, such as\n-\t\t * selecting the actual format for the IMPLEMENTATION_DEFINED\n-\t\t * HAL pixel format. To avoid issues, we thus have to set the\n-\t\t * GRALLOC_USAGE_HW_CAMERA_WRITE flag unconditionally, even for\n-\t\t * streams that will be produced in software.\n-\t\t */\n-\t\tstream->usage |= GRALLOC_USAGE_HW_CAMERA_WRITE;\n-\n-\t\t/*\n-\t\t * If a CameraStream with the same size and format of the\n-\t\t * current stream has already been requested, associate the two.\n-\t\t */\n-\t\tauto iter = std::find_if(\n-\t\t\tstreamConfigs.begin(), streamConfigs.end(),\n-\t\t\t[size, format](const Camera3StreamConfig &streamConfig) {\n-\t\t\t\treturn streamConfig.config.size == size &&\n-\t\t\t\t       streamConfig.config.pixelFormat == format;\n-\t\t\t});\n-\t\tif (iter != streamConfigs.end()) {\n-\t\t\t/* Add usage to copy the buffer in streams[0] to stream. */\n-\t\t\titer->streams[0].stream->usage |= GRALLOC_USAGE_SW_READ_OFTEN;\n-\t\t\tstream->usage |= GRALLOC_USAGE_SW_WRITE_OFTEN;\n-\t\t\titer->streams.push_back({ stream, CameraStream::Type::Mapped });\n-\t\t\tcontinue;\n-\t\t}\n-\n \t\tCamera3StreamConfig streamConfig;\n \t\tstreamConfig.streams = { { stream, CameraStream::Type::Direct } };\n \t\tstreamConfig.config.size = size;\n",
    "prefixes": [
        "libcamera-devel"
    ]
}