Cover Letter Detail
Show a cover letter.
GET /api/covers/1533/?format=api
{ "id": 1533, "url": "https://patchwork.libcamera.org/api/covers/1533/?format=api", "web_url": "https://patchwork.libcamera.org/cover/1533/", "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": "<20190630181049.9548-1-jacopo@jmondi.org>", "date": "2019-06-30T18:10:41", "name": "[libcamera-devel,RFC,0/8] libcamera: Add support for importing external memory buffers", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "mbox": "https://patchwork.libcamera.org/cover/1533/mbox/", "series": [ { "id": 383, "url": "https://patchwork.libcamera.org/api/series/383/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=383", "date": "2019-06-30T18:10:41", "name": "libcamera: Add support for importing external memory buffers", "version": 1, "mbox": "https://patchwork.libcamera.org/series/383/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/covers/1533/comments/", "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C822360BC0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 30 Jun 2019 20:09:37 +0200 (CEST)", "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 53503200007;\n\tSun, 30 Jun 2019 18:09:37 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sun, 30 Jun 2019 20:10:41 +0200", "Message-Id": "<20190630181049.9548-1-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.21.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC 0/8] libcamera: Add support for importing\n\texternal memory buffers", "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": "Sun, 30 Jun 2019 18:09:37 -0000" }, "content": "The libcamera APIs need to be augmented to allow application to use buffers\nwhose memory has been allocated outside of the library.\n\nThis feature is particularly essential to support the Android camera HAL, which\nuses buffers allocated by mean of gralloc and exported by using DMABUF file\ndescriptor.\n\nEach Stream has a buffer pool which contains buffers which are used to interact\nwith the underlying video devices and whose memory is directly accessed by\napplications in case a Stream uses its internal memory, but could also be mapped\non buffers whose memory is allocated elsewhere by exchanging the dmabuf file\ndescriptors associated to each buffer's plane.\n\nExtend the StreamConfiguration class with a flag that defines the memory\ntype a Stream uses (internal or external) and use said flag in pipeline handler\nto either allocate memory for the buffer, or prepare to use externally\nallocated buffers. As a consequence, rename PipelineHandler::allocateBuffers()\nto PipelineHandler::setupBuffers().\n\nOn top of this perform buffer mapping for streams using external memory at\nrequest queueing time, hiding the mapping from pipeline handler that will\nalways only interact with streams from the Stream's internal pool.\n\nAdd a map of buffers to each request to perform back-and-forth translation of\napplication provided buffers to stream internal buffer at request complete time.\n\nFinally, add a test application that use buffers allocated in the vivid output\ndevice to stream a Camera. The test is not meant to be considered for merge, but\nmore a proof a concept (it has my camera name hardcoded...) and fails for buffer\n#0 (but works for all others).\n\nComments are missing, rough edges here and there, I'm sending as RFC as this\ntouches several part of the core APIs and I would like to have feedbacks sooner\nthan later.\n\nThanks\n j\n\nJacopo Mondi (8):\n libcamera: v4l2_videodevice: Re-group operations\n libcamera: stream: Provide accessors to buffers\n libcamera: stream: Add Stream memory type\n libcamera: Rename PipelineHandler::allocateBuffers\n libcamera: request: Rename the Stream to Buffer map\n libcamera: stream: Add operation to map buffers\n libcamera: request: Support buffer mapping\n test: v4l2_videodevice: Add buffer import test\n\n include/libcamera/buffer.h | 1 +\n include/libcamera/request.h | 8 +-\n include/libcamera/stream.h | 25 +++\n src/cam/capture.cpp | 4 +-\n src/libcamera/camera.cpp | 11 +-\n src/libcamera/include/pipeline_handler.h | 4 +-\n src/libcamera/include/v4l2_videodevice.h | 6 +-\n src/libcamera/pipeline/ipu3/ipu3.cpp | 12 +-\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 6 +-\n src/libcamera/pipeline/uvcvideo.cpp | 16 +-\n src/libcamera/pipeline/vimc.cpp | 16 +-\n src/libcamera/pipeline_handler.cpp | 12 +-\n src/libcamera/request.cpp | 43 ++++-\n src/libcamera/stream.cpp | 115 ++++++++++-\n src/libcamera/v4l2_videodevice.cpp | 170 ++++++++--------\n src/qcam/main_window.cpp | 4 +-\n test/camera/capture.cpp | 3 +-\n test/camera/statemachine.cpp | 3 +-\n test/v4l2_videodevice/buffer_import.cpp | 234 +++++++++++++++++++++++\n test/v4l2_videodevice/meson.build | 1 +\n 20 files changed, 547 insertions(+), 147 deletions(-)\n create mode 100644 test/v4l2_videodevice/buffer_import.cpp\n\n--\n2.21.0" }