Show a cover letter.

GET /api/covers/17482/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 17482,
    "url": "https://patchwork.libcamera.org/api/covers/17482/?format=api",
    "web_url": "https://patchwork.libcamera.org/cover/17482/",
    "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": "<20221002003612.13603-1-laurent.pinchart@ideasonboard.com>",
    "date": "2022-10-02T00:36:08",
    "name": "[libcamera-devel,0/4] libcamera: Fix kernel deprecation warning with output buffers",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/cover/17482/mbox/",
    "series": [
        {
            "id": 3522,
            "url": "https://patchwork.libcamera.org/api/series/3522/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3522",
            "date": "2022-10-02T00:36:08",
            "name": "libcamera: Fix kernel deprecation warning with output buffers",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3522/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/covers/17482/comments/",
    "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 11DEABD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  2 Oct 2022 00:36:16 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3FF9B61F74;\n\tSun,  2 Oct 2022 02:36:15 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 59A6261F74\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  2 Oct 2022 02:36:14 +0200 (CEST)",
            "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 93FCA2D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  2 Oct 2022 02:36:13 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664670975;\n\tbh=lljH7y75bGL/5bG7xoTP2dAf9d3ND5wIJK5UH1gk78I=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=1h6GE/3Iu66CwFKHOGWzo1lSPD9Ellk7qa6oMkO9KlnukSERwCyjGuqq3ZVyin4nC\n\tAipHQQPIWrvQ6CATEkMPxJNSvbMHgLAJ9HO9nFrXlofk/Q31wlfvQZQZYRrMLolVeh\n\tnHgYlSUeQ8+8Xk6WvXscPpL76xqVVCH2qal0A5BIb5l+kxxtGE6DuiJ0Of3HP1C/My\n\tlrwO3CnzhSPnVcwkKzU91sNNsyeHSOAKTCGE8goIgsv6QPPlf1hxPUMoCEzxVBqGb3\n\tddIBl+Tbud3VDbN/JGzg9sKELPMb6S7QHb3v9F0oOgSpZNtyxhgGEfjlAMrA5keHpd\n\t8TF2KjRiD8zhQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1664670973;\n\tbh=lljH7y75bGL/5bG7xoTP2dAf9d3ND5wIJK5UH1gk78I=;\n\th=From:To:Subject:Date:From;\n\tb=GoKGc+w06m5wpMta+nr6fnItGMic5y1WSLrQP7qYY4etFa2OzxByS4a2/9Uw/li/F\n\t8B/KjRM+2BLfr9VuStoXJkx8gOKSZAcl+0QdDc/G533vBGAqsR1vMoockS/xNZenx1\n\tkJRaPfwPpDZDh786lrAnMp+eI1o+S09WqFAOXIgk="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"GoKGc+w0\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sun,  2 Oct 2022 03:36:08 +0300",
        "Message-Id": "<20221002003612.13603-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 0/4] libcamera: Fix kernel deprecation\n\twarning with output buffers",
        "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": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Hello,\n\nThis patch series fixes a warning printed by videobuf2.\n\nThe V4L2 API specification indicates that, for an output video device,\nthe driver will interpret a zero bytesused value as the buffer length\n(for v4l2_buffer) or the plane length (for v4l2_plane). The videobuf2\nframework implements this behaviour, but also considers this case as\ndeprecated and prints a warning:\n\n[   54.375534] use of bytesused == 0 is deprecated and will be removed in the future,\n[   54.388026] use the actual size instead.\n\nThis is triggered by the RkISP1 and IPU3 pipeline handlers, which don't\nset bytesused for the parameters buffers.\n\nThere are multiple ways to fix this issue, and as I couldn't decide\nwhich one is best, I've included two in this series.\n\nPatch 1/4 is the simple fix, it sets bytesused to the buffer or plane\nlength before calling VIDIOC_QBUF, essentially replicating in userspace\nthe kernel behaviour that videobuf2 considers deprecated. It may however\nnot be considered right, one may argue that the user of the\nV4L2VideoDevice should always set the bytesused values correctly.\n\nPatches 2/4 to 4/4 are an attempt at setting bytesused correctly. As the\nFrameBuffer metadata is private and only accessible in const form\noutside of the class (with the exception of V4L2VideoDevice that is\nlisted as a friend), patch 2/4 first makes mutable access to the\nmetadata possible. In order to avoid exposing mutable access to\napplications, it moves the metadata (and the other remaining private\nmembers of the FrameBuffer class) to the FrameBuffer::Private class, and\nexposes a mutable accessor there. Patches 3/4 and 4/4 then use that\naccessor to set the bytesused values in the RkISP1 and IPU3 pipeline\nhandlers.\n\nOne nice side effect of patch 2/4 is that the V4L2VideoDevice class\ndoesn't need to be listed as a friend of the FrameBuffer class anymore.\nIf 1/4 is considered a good fix, I would thus be tempted to still merge\n2/4 just to drop the friend statement.\n\n3/4 and 4/4 currently hardcode the bytesused value to the size of the\nparameters buffer structure. This works fine with the RkISP1 and IPU3\npipeline handlers as the parameters buffers have a fixed size, but other\ndevices in the future may use a variable-size buffer which would require\nthe IPA module to pass the data size to the pipeline handler. I was\ntempted to do the same for RkISP1 and IPU3 for correctness, but decided\nit was probably not worth it.\n\nNote also that, if a future device requires variable-size buffers, the\napproach in patch 1/4 won't work anymore, the more complex fix will then\nbe required.\n\nLaurent Pinchart (4):\n  libcamera: v4l2_videodevice: Ensure non-zero bytesused for output\n    buffers\n  libcamera: framebuffer: Move remaining private data to Private class\n  pipeline: ipu3: Set bytesused before queuing parameters buffer\n  pipeline: rkisp1: Set bytesused before queuing parameters buffer\n\n include/libcamera/framebuffer.h               | 19 ++----\n include/libcamera/internal/framebuffer.h      | 10 +++-\n .../mm/cros_frame_buffer_allocator.cpp        |  8 +--\n .../mm/generic_frame_buffer_allocator.cpp     |  9 +--\n src/libcamera/framebuffer.cpp                 | 58 ++++++++++++-------\n src/libcamera/pipeline/ipu3/ipu3.cpp          |  4 ++\n src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  4 ++\n src/libcamera/v4l2_videodevice.cpp            | 30 +++++-----\n 8 files changed, 85 insertions(+), 57 deletions(-)\n\n\nbase-commit: 79f0fc937d95cbf1bd39f04dfd8b83206bda5098"
}