Show a patch.

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

{
    "id": 1392,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/1392/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1392/",
    "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": "<1560253031-98823-1-git-send-email-mickael.guene@st.com>",
    "date": "2019-06-11T11:37:11",
    "name": "[libcamera-devel] libcamera: Fix CameraSensor::getFormat() search order",
    "commit_ref": "846d4c7d3ee7ca059074b2c2d3aeaa941c3f0870",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "8f6cd461296896346ce8b43005f7139d81d59114",
    "submitter": {
        "id": 19,
        "url": "https://patchwork.libcamera.org/api/1.1/people/19/?format=api",
        "name": "Mickael GUENE",
        "email": "mickael.guene@st.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/1392/mbox/",
    "series": [
        {
            "id": 347,
            "url": "https://patchwork.libcamera.org/api/1.1/series/347/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=347",
            "date": "2019-06-11T11:37:11",
            "name": "[libcamera-devel] libcamera: Fix CameraSensor::getFormat() search order",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/347/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1392/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1392/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<mickael.guene@st.com>",
        "Received": [
            "from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com\n\t[62.209.51.94])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 201AE62FAD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Jun 2019 13:37:16 +0200 (CEST)",
            "from pps.filterd (m0046037.ppops.net [127.0.0.1])\n\tby mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx5BBabjY024367 for <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Jun 2019 13:37:16 +0200",
            "from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35])\n\tby mx07-00178001.pphosted.com with ESMTP id 2t26rm9nd2-1\n\t(version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT)\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Jun 2019 13:37:16 +0200",
            "from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9])\n\tby beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C348F34\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Jun 2019 11:37:15 +0000 (GMT)",
            "from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94])\n\tby zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 735E82920\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Jun 2019 11:37:15 +0000 (GMT)",
            "from SAFEX1HUBCAS21.st.com (10.75.90.45) by Safex1hubcas24.st.com\n\t(10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0;\n\tTue, 11 Jun 2019 13:37:15 +0200",
            "from localhost (10.129.172.100) by Webmail-ga.st.com (10.75.90.48)\n\twith Microsoft SMTP Server (TLS) id 14.3.439.0;\n\tTue, 11 Jun 2019 13:37:14 +0200"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com;\n\th=from : to : cc : subject\n\t: date : message-id : mime-version : content-type;\n\ts=STMicroelectronics; \n\tbh=9+jUD6EL6zJ3U5QhBg5iXN6r0769tnzIG848GPscfUM=;\n\tb=yJmxJY/5V3dWrEQf8gYHPgtZW6mN+SwhWNF/4CBI2u6l73ZNxnfxc9lbwki3ZSzdLvun\n\t3EIBJhGsx5j7bNxICCCFcKTsCjGngyoT8WOfKOkuDUWeUiVeqN8SlsURN4yKDXiemVmL\n\tBN4YHWvKRg00glFnXlQEjk1b65cm0yN2si1oUxWuVr3PHLCEhfxCXyFOmhdHZL0JYS1Q\n\tbkrOxBHNvFuHTMyf6om2nt+7kaVa5ME0/b6zz0D4Ny2AD6EyzwlWzB4+tv4r70s4rBmL\n\tR7bjNqv6Q1Idh7h9786d8Ls1Vl6qpfH8lK6RyUUBfxktxFiEdRiYJXNOBrSpFze5KANF\n\tPw== ",
        "From": "Mickael Guene <mickael.guene@st.com>",
        "To": "<libcamera-devel@lists.libcamera.org>",
        "CC": "Mickael Guene <mickael.guene@st.com>",
        "Date": "Tue, 11 Jun 2019 13:37:11 +0200",
        "Message-ID": "<1560253031-98823-1-git-send-email-mickael.guene@st.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.129.172.100]",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:, ,\n\tdefinitions=2019-06-11_05:, , signatures=0",
        "X-Mailman-Approved-At": "Tue, 11 Jun 2019 13:43:07 +0200",
        "Subject": "[libcamera-devel] [PATCH] libcamera: Fix CameraSensor::getFormat()\n\tsearch order",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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>",
        "X-List-Received-Date": "Tue, 11 Jun 2019 11:37:17 -0000"
    },
    "content": "According to the documentation, CameraSensor::getFormat() should select Media\nbus code from mbusCodes parameter list. It should select the first code from the\nlist that is supported by the sensor. Current implementation will wrongly select\nMedia bus code from mbusCodes_ order instead.\n This patch aims to fix this wrong behavior.\n\nSigned-off-by: Mickael Guene <mickael.guene@st.com>\n---\n\n src/libcamera/camera_sensor.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 2b9d8fa..cb6649e 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -191,8 +191,8 @@ V4L2SubdeviceFormat CameraSensor::getFormat(const std::vector<unsigned int> &mbu\n {\n \tV4L2SubdeviceFormat format{};\n \n-\tfor (unsigned int code : mbusCodes_) {\n-\t\tif (std::any_of(mbusCodes.begin(), mbusCodes.end(),\n+\tfor (unsigned int code : mbusCodes) {\n+\t\tif (std::any_of(mbusCodes_.begin(), mbusCodes_.end(),\n \t\t\t\t[code](unsigned int c) { return c == code; })) {\n \t\t\tformat.mbus_code = code;\n \t\t\tbreak;\n",
    "prefixes": [
        "libcamera-devel"
    ]
}