Show a patch.

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

{
    "id": 19391,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/19391/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19391/",
    "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": "<20240113142218.28063-2-hdegoede@redhat.com>",
    "date": "2024-01-13T14:22:01",
    "name": "[libcamera-devel,v2,01/18] libcamera: pipeline: simple: fix size adjustment in validate()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "bcf0bc83a7b1ecaabe970194e2674813f543f313",
    "submitter": {
        "id": 102,
        "url": "https://patchwork.libcamera.org/api/1.1/people/102/?format=api",
        "name": "Hans de Goede",
        "email": "hdegoede@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19391/mbox/",
    "series": [
        {
            "id": 4142,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4142/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4142",
            "date": "2024-01-13T14:22:00",
            "name": "[libcamera-devel,v2,01/18] libcamera: pipeline: simple: fix size adjustment in validate()",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4142/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19391/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19391/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 3CCDCBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 13 Jan 2024 14:22:36 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EAA3761D57;\n\tSat, 13 Jan 2024 15:22:35 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9049E61D57\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 13 Jan 2024 15:22:34 +0100 (CET)",
            "from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73])\n\tby relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n\tcipher=TLS_AES_256_GCM_SHA384) id us-mta-59-efFDu9GxMzi1wI7Qls1YIg-1;\n\tSat, 13 Jan 2024 09:22:29 -0500",
            "from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mimecast-mx02.redhat.com (Postfix) with ESMTPS id A1C8F38041FA;\n\tSat, 13 Jan 2024 14:22:28 +0000 (UTC)",
            "from localhost.localdomain (unknown [10.39.192.58])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 8B5F63C25;\n\tSat, 13 Jan 2024 14:22:26 +0000 (UTC)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1705155755;\n\tbh=ohjUIPZffS8k2fkeJ6xh+YuTvwgp5+VpBHdHod0X8Z0=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=VroKVk5uFGfN6TmaJ1/wkfcEW3i193RdOR2LYtb9vca1Lqx75B+XAcsVTHtok3ejt\n\trrQTEiQChKEXRJ6d6virDL/jeDaEcv+94Efokp1T5nM+GCAowrgarSXi06E7eAiYQQ\n\ttnKCZED8pcA7ky/s89koUYlQKVwHBitWR+KODvQ89Ujs2kKBVJUB7lh0FZqru3iTzT\n\tUIu+Kj4XCKHKIF1HzvZeWtrLT1TOCJrC70cgZUW7ZJsrC0IaqgFMbMRGjeRShr8pZH\n\tEjAt+QfAl6IrKUqFemtw/rkLKo6JThShA2Hf0bGSxeH0NvMc5epqLczVQYf5OIfnxf\n\tqlLg86DnS4JnQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1705155753;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=MhV+7e5PwAfY//Qg+OcERhnWF5/MkXCggJzq1QGqDc4=;\n\tb=UkJFMPhnINJEbJCihUMJEgU5q6AHPHcXRKOsaXKjHbWh4AAQQj6N+nibEo0vg0siWdvygg\n\t898h+TdlC/aWVRlOdb1kIokUW5ITY3VezVYGegdlx3mYxL38FiP0KmKO4jtML3QFZwLF+R\n\tfMTEIeNNYVghkPVzg52IrMvYWJzm088="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"UkJFMPhn\"; \n\tdkim-atps=neutral",
        "X-MC-Unique": "efFDu9GxMzi1wI7Qls1YIg-1",
        "To": "libcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov.ynk@gmail.com>",
        "Date": "Sat, 13 Jan 2024 15:22:01 +0100",
        "Message-ID": "<20240113142218.28063-2-hdegoede@redhat.com>",
        "In-Reply-To": "<20240113142218.28063-1-hdegoede@redhat.com>",
        "References": "<20240113142218.28063-1-hdegoede@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.11.54.1",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "Subject": "[libcamera-devel] [PATCH v2 01/18] libcamera: pipeline: simple: fix\n\tsize adjustment in validate()",
        "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>",
        "From": "Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Hans de Goede <hdegoede@redhat.com>",
        "Cc": "Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tPavel Machek <pavel@ucw.cz>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>, admin@dennisbonke.com",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Andrey Konovalov <andrey.konovalov@linaro.org>\n\nSimpleCameraConfiguration::validate() adjusts the configuration\nof its streams (if the size is not in the outputSizes) to\nthe captureSize. But the captureSize itself can be not in the\noutputSizes, and then the adjusted configuration won't be\nvalid resulting in camera configuration failure.\n\nSigned-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>\nSigned-off-by: Hans de Goede <hdegoede@redhat.com>\nTested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sc8280xp Lenovo x13s\nTested-by: Pavel Machek <pavel@ucw.cz>\n---\n src/libcamera/pipeline/simple/simple.cpp | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\nindex 911051b2..4d0e7255 100644\n--- a/src/libcamera/pipeline/simple/simple.cpp\n+++ b/src/libcamera/pipeline/simple/simple.cpp\n@@ -997,10 +997,13 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()\n \t\t}\n \n \t\tif (!pipeConfig_->outputSizes.contains(cfg.size)) {\n+\t\t\tSize adjustedSize = pipeConfig_->captureSize;\n+\t\t\tif (!pipeConfig_->outputSizes.contains(adjustedSize))\n+\t\t\t\tadjustedSize = pipeConfig_->outputSizes.max;\n \t\t\tLOG(SimplePipeline, Debug)\n \t\t\t\t<< \"Adjusting size from \" << cfg.size\n-\t\t\t\t<< \" to \" << pipeConfig_->captureSize;\n-\t\t\tcfg.size = pipeConfig_->captureSize;\n+\t\t\t\t<< \" to \" << adjustedSize;\n+\t\t\tcfg.size = adjustedSize;\n \t\t\tstatus = Adjusted;\n \t\t}\n \n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "01/18"
    ]
}