Show a patch.

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

{
    "id": 14979,
    "url": "https://patchwork.libcamera.org/api/patches/14979/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14979/",
    "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": "<20211201154434.23127-7-david.plowman@raspberrypi.com>",
    "date": "2021-12-01T15:44:32",
    "name": "[libcamera-devel,v8,6/8] libcamera: Support passing ColorSpaces to V4L2 subdevices",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "3af331aa059a54a00b09e4c2dfe80eb32d96d35d",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14979/mbox/",
    "series": [
        {
            "id": 2797,
            "url": "https://patchwork.libcamera.org/api/series/2797/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2797",
            "date": "2021-12-01T15:44:26",
            "name": "Colour spaces",
            "version": 8,
            "mbox": "https://patchwork.libcamera.org/series/2797/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14979/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14979/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 1E85AC3251\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  1 Dec 2021 15:45:12 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 50A10607C5;\n\tWed,  1 Dec 2021 16:45:11 +0100 (CET)",
            "from mail-wr1-x433.google.com (mail-wr1-x433.google.com\n\t[IPv6:2a00:1450:4864:20::433])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 837FF607DA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  1 Dec 2021 16:45:07 +0100 (CET)",
            "by mail-wr1-x433.google.com with SMTP id a18so53329372wrn.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 01 Dec 2021 07:45:07 -0800 (PST)",
            "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:e4a2:3070:eea4:e434])\n\tby smtp.gmail.com with ESMTPSA id\n\ty7sm148209wrw.55.2021.12.01.07.45.06\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 01 Dec 2021 07:45:06 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"MqYFmHu8\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=ZHv2BE5qFSbf6FhZH1c6JuntQk94zpM3K7P0xT4gJ58=;\n\tb=MqYFmHu896DyNgClkTvpPw1lmZ5gDJ/nWnsY54FUQAaXxcLqiApRaex/Uc8q9g+sgU\n\tAnohFjrJOWHBGCpBuuLqz41VmxmniVjBuYBqV94F6QNqQHsXdcIKf13pZuCUlulBMkn7\n\t29eehjrtV7u2hHz0hchNaSLnYf1e3PATvUlWZv52pm+/6N/rKfGKdcH4Qu7J8Zi0KEB4\n\tjL3O8Vhe+v7bzD/H51NYFVwmeyAoBUhE6/koy37f/PoAJdQ7i6MFAktBklZsLDh3vsai\n\tKl1Ot1bVHzskh9If7Yc0GVxgvrBmDDzXKUQOW3rp5loisyaPTcu9kxYCoxmf2J97X9SF\n\t/DEA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=ZHv2BE5qFSbf6FhZH1c6JuntQk94zpM3K7P0xT4gJ58=;\n\tb=LnbvhYhvOsbW344+Y8sAVAbSTLzWvNASSNx/3pTnf7U3+5ssMeFIliKQvZvXXNpEiT\n\tKCvKcc8iYBGBj7idFMD2HY76LYjlpgYfD2ggK5dUXKluqmZBuJGNJ5u4k5ID8JcwzkA8\n\t74Vo0S19fbxMtxgSGmJi3uG3U86KTDoMKhfmY46QzdeG3NMLf5WvWpOtRHL4FiaGmB+R\n\tIFPG6GNhz4NebAtvMPBt1WxG3ZuFvPSrQe6iGDuKckOu0jfCE0PXg4yOVndwmDpNwmBL\n\tlKSEkozR2qFdPeP01cHBYetRZIKmQKoi4qnWqNN9W8nqMkjNAzkEaX9TVsffW0pG2xt4\n\titgQ==",
        "X-Gm-Message-State": "AOAM530ZzwQTVbxAEKLLEgRXjOwWOSGlCH6jgNCL9mz79MxpeRyF9acG\n\tMwMYUvCrCOWbH7kAEl7plCheAKLxmUC3b+ai",
        "X-Google-Smtp-Source": "ABdhPJzllcTQVaPtOFwNq5GeDOat9k+glRl3C6jlzFsj0bTitr/6xptJtc2MYCD3O8z9+9BtPbtPBQ==",
        "X-Received": "by 2002:adf:df0d:: with SMTP id\n\ty13mr7754214wrl.176.1638373507117; \n\tWed, 01 Dec 2021 07:45:07 -0800 (PST)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tJacopo Mondi <jacopo@jmondi.org>,\n\tHans Verkuil <hverkuil-cisco@xs4all.nl>, \n\tTomasz Figa <tfiga@google.com>, Naushir Patuck <naush@raspberrypi.com>",
        "Date": "Wed,  1 Dec 2021 15:44:32 +0000",
        "Message-Id": "<20211201154434.23127-7-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20211201154434.23127-1-david.plowman@raspberrypi.com>",
        "References": "<20211201154434.23127-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v8 6/8] libcamera: Support passing\n\tColorSpaces to V4L2 subdevices",
        "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": "The ColorSpace from the StreamConfiguration is now handled\nappropriately in the V4L2Subdevice.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/libcamera/v4l2_subdevice.cpp | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 66e08333..ee450c31 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -414,6 +414,7 @@ int V4L2Subdevice::getFormat(unsigned int pad, V4L2SubdeviceFormat *format,\n \tformat->size.width = subdevFmt.format.width;\n \tformat->size.height = subdevFmt.format.height;\n \tformat->mbus_code = subdevFmt.format.code;\n+\tformat->colorSpace = toColorSpace(subdevFmt.format);\n \n \treturn 0;\n }\n@@ -442,7 +443,13 @@ int V4L2Subdevice::setFormat(unsigned int pad, V4L2SubdeviceFormat *format,\n \tsubdevFmt.format.code = format->mbus_code;\n \tsubdevFmt.format.field = V4L2_FIELD_NONE;\n \n-\tint ret = ioctl(VIDIOC_SUBDEV_S_FMT, &subdevFmt);\n+\tint ret = fromColorSpace(format->colorSpace, subdevFmt.format);\n+\tif (ret < 0)\n+\t\tLOG(V4L2, Warning)\n+\t\t\t<< \"Setting color space unrecognised by V4L2: \"\n+\t\t\t<< ColorSpace::toString(format->colorSpace);\n+\n+\tret = ioctl(VIDIOC_SUBDEV_S_FMT, &subdevFmt);\n \tif (ret) {\n \t\tLOG(V4L2, Error)\n \t\t\t<< \"Unable to set format on pad \" << pad\n@@ -453,6 +460,7 @@ int V4L2Subdevice::setFormat(unsigned int pad, V4L2SubdeviceFormat *format,\n \tformat->size.width = subdevFmt.format.width;\n \tformat->size.height = subdevFmt.format.height;\n \tformat->mbus_code = subdevFmt.format.code;\n+\tformat->colorSpace = toColorSpace(subdevFmt.format);\n \n \treturn 0;\n }\n",
    "prefixes": [
        "libcamera-devel",
        "v8",
        "6/8"
    ]
}