Cover Letter Detail
Show a cover letter.
GET /api/covers/13146/?format=api
{ "id": 13146, "url": "https://patchwork.libcamera.org/api/covers/13146/?format=api", "web_url": "https://patchwork.libcamera.org/cover/13146/", "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": "<20210730010306.19956-1-laurent.pinchart@ideasonboard.com>", "date": "2021-07-30T01:02:58", "name": "[libcamera-devel,v2,0/8] libcamera: Add DRM/KMS viewfinder display to cam", "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/13146/mbox/", "series": [ { "id": 2289, "url": "https://patchwork.libcamera.org/api/series/2289/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2289", "date": "2021-07-30T01:02:59", "name": "libcamera: Add DRM/KMS viewfinder display to cam", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2289/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/covers/13146/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 B2E7DC3230\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 30 Jul 2021 01:03:23 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 14E41687C6;\n\tFri, 30 Jul 2021 03:03:22 +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 AF50360506\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Jul 2021 03:03:18 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 42D899FB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Jul 2021 03:03:18 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"EwcCvwhS\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1627606998;\n\tbh=IlIYxH/aRNVqkV0hqR86E9sJcdPNxOMiB4hOE71aAhg=;\n\th=From:To:Subject:Date:From;\n\tb=EwcCvwhSBydtvnFtcxHip4y4Nx06GTxW4CIcB2bkFzohD/Zya2D4mQJpVPAGAG2Vj\n\tCJ3qU1ftVCl+eQX3kBbPvhZuaKvyCJvBtOlmDKHKJmfP0K6AN5Z2x2lZXiIuwuwDs+\n\tRmFh6fvQKOelQq2nynxx8Tb/vhnBxEzxEk03dXWA=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 30 Jul 2021 04:02:58 +0300", "Message-Id": "<20210730010306.19956-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.31.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 0/8] libcamera: Add DRM/KMS viewfinder\n\tdisplay to cam", "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": "Hello,\n\nThis patch series extends the cam application to implement live\nviewfinder display using a DRM/KMS device. Supported display features\nare currently fairly limited (scaling and overlays are not supported for\ninstance), but should nonetheless be a good first step.\n\nPatches 1/8 extends to EventLoop class to support file descriptor\nevents, needed by KMS. Patches 2/8 to 4/8 then refactor the cam\napplication and the BufferWriter class to introduce an abstract\nFrameSink class. Patch 5/8 adds a set of classes to wrap the DRM/KMS API\n(using libdrm). Patches 6/8 and 7/8 add a DRM/KMS frame sink\nimplementation, and patch 8/8 wires it up in the cam application.\n\nI've kept patch 7/8 separate from 6/8 from now as I'm not entirely sure\nwhat the best course of action is. Enabling the display is a costly\noperation, so doing it at start() time would be best. However, we would\nneed a frame buffer to be displayed at that point, and none is available\nyet from the camera. Patch 7/8 thus delays enabling the display to the\nfirst frame. The operation isn't too costly from a userspace point of\nview as the atomic request is committed asynchronously (although it\nstill requires two ioctl calls, one to create the mode blob - but this\ncould be moved to start() - and one to commit the request). Another\noption would be to allocate an extra dumb buffer and fill it with static\ndata for the first frame.\n\nI've tested this with the simple pipeline handler on an R-Car H3\nSalvator-XS board, running\n\ncam -c 'platform/vimc.0 Sensor B' \\\n\t-s pixelformat=BGR888,width=1440,height=900 -C -D HDMI-A-1\n\nwith vimc as a source. As the R-Car DU requires DMA contiguous memory by\ndefault (IOMMU support is enabled), a patch is required to use the vb2\ndma-contig allocator in vimc. It can be found at [1].\n\nThe size of the stream has to match the size of the display, as scaling\nisn't supported yet. As vimc requires the output size to be a multiple\nof 3, this restricts the possible resolutions (we should *really* fix\nthis in the vimc driver).\n\nCompared to v1, the frame sink implementation is now based on requests\ninstead of buffers, which should address Niklas' concerns.\n\n[1] https://lore.kernel.org/linux-media/20210730001939.30769-1-laurent.pinchart+renesas@ideasonboard.com/T/#u\n\nLaurent Pinchart (8):\n cam: event_loop: Add support for file descriptor events\n cam: Add FrameSink base class\n cam: Turn BufferWriter into a FrameSink\n cam: Rename BufferWriter to FileSink\n cam: Add DRM helper classes\n cam: Add KMS sink class\n cam: kms_sink: Enable display on first frame\n cam: Add support for viewfinder through DRM/KMS\n\n src/cam/buffer_writer.h | 31 -\n src/cam/camera_session.cpp | 92 ++-\n src/cam/camera_session.h | 6 +-\n src/cam/drm.cpp | 663 +++++++++++++++++++\n src/cam/drm.h | 331 +++++++++\n src/cam/event_loop.cpp | 44 ++\n src/cam/event_loop.h | 20 +\n src/cam/{buffer_writer.cpp => file_sink.cpp} | 43 +-\n src/cam/file_sink.h | 35 +\n src/cam/frame_sink.cpp | 31 +\n src/cam/frame_sink.h | 34 +\n src/cam/kms_sink.cpp | 289 ++++++++\n src/cam/kms_sink.h | 74 +++\n src/cam/main.cpp | 6 +\n src/cam/main.h | 1 +\n src/cam/meson.build | 17 +-\n 16 files changed, 1664 insertions(+), 53 deletions(-)\n delete mode 100644 src/cam/buffer_writer.h\n create mode 100644 src/cam/drm.cpp\n create mode 100644 src/cam/drm.h\n rename src/cam/{buffer_writer.cpp => file_sink.cpp} (68%)\n create mode 100644 src/cam/file_sink.h\n create mode 100644 src/cam/frame_sink.cpp\n create mode 100644 src/cam/frame_sink.h\n create mode 100644 src/cam/kms_sink.cpp\n create mode 100644 src/cam/kms_sink.h" }