{"id":20146,"url":"https://patchwork.libcamera.org/api/1.1/covers/20146/?format=json","web_url":"https://patchwork.libcamera.org/cover/20146/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240530171600.259495-1-hdegoede@redhat.com>","date":"2024-05-30T17:15:55","name":"[v2,0/5] libcamera: dma_buffer_allocator: Add support for using udmabuf to alloc dma-buffers","submitter":{"id":102,"url":"https://patchwork.libcamera.org/api/1.1/people/102/?format=json","name":"Hans de Goede","email":"hdegoede@redhat.com"},"mbox":"https://patchwork.libcamera.org/cover/20146/mbox/","series":[{"id":4341,"url":"https://patchwork.libcamera.org/api/1.1/series/4341/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4341","date":"2024-05-30T17:15:55","name":"libcamera: dma_buffer_allocator: Add support for using udmabuf to alloc dma-buffers","version":2,"mbox":"https://patchwork.libcamera.org/series/4341/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/20146/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 09DC1BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 May 2024 17:16:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 25536634B6;\n\tThu, 30 May 2024 19:16:08 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A99361A43\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 May 2024 19:16:06 +0200 (CEST)","from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n\t[66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-549-2tAfxOF_NUOjBHA8zRuC6A-1; Thu, 30 May 2024 13:16:03 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mimecast-mx02.redhat.com (Postfix) with ESMTPS id A0E11801780;\n\tThu, 30 May 2024 17:16:02 +0000 (UTC)","from shalem.redhat.com (unknown [10.39.192.43])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 8AEC0286E;\n\tThu, 30 May 2024 17:16:01 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"RoSVxKPC\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1717089365;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding;\n\tbh=r9U5sSjdjo+5VzOD4SKvhOSeb+ugW+PTtSeCHIwkueE=;\n\tb=RoSVxKPCExqX7Meaqh6FHh103rHfwQB6pexoEXFwZ4gqVi+Wu9W/O0rgkpwpl/7owNVPHU\n\tV+8yHsB58QPA15dRV3IaIFUGUGhIcNIx/lmkUgb+l8z5CAABYBqQOiIgkNzKWjrDzMmP10\n\tu8+Thy8bAEOzljN4hFP+JHqYOFhpGYk=","X-MC-Unique":"2tAfxOF_NUOjBHA8zRuC6A-1","From":"Hans de Goede <hdegoede@redhat.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Andrey Konovalov <andrey.konovalov.ynk@gmail.com>,\n\tPavel Machek <pavel@ucw.cz>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>, \n\tMilan Zamazal <mzamazal@redhat.com>, Maxime Ripard <mripard@redhat.com>, \n\tHans de Goede <hdegoede@redhat.com>","Subject":"[PATCH v2 0/5] libcamera: dma_buffer_allocator: Add support for\n\tusing udmabuf to alloc dma-buffers","Date":"Thu, 30 May 2024 19:15:55 +0200","Message-ID":"<20240530171600.259495-1-hdegoede@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.11.54.5","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Transfer-Encoding":"8bit","Content-Type":"text/plain; charset=\"US-ASCII\"; x-default=true","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":"Hi All,\n\nHere is v2 of my patch-series to add /dev/udmabuf dma-buffer allocation\nsupport. This is based on:\nhttps://patchwork.libcamera.org/patch/18922/\n\nChanges in v2:\n- New patch: Add linux/udmabuf.h to libcamera's local kernel headers\n- New patch: Rename DmaHeap class to DmaBufAllocator\n- libcamera: DmaBufAllocator: Support allocating from /dev/udmabuf :\n  - Reword the commit message\n  - Add a new DmaBufAllocator::DmaBufAllocatorFlag::UDmaBuf type for udmabuf\n  - Drop unnecessary size != size check\n  - Reword log messages to be more like the DMA heap alloc path\n  - Move UniqueFD(ret) up so as to not leak the fd on errors\n-New patch: software_isp: Allow using dma-buffers from /dev/udmabuf\n\nI have also pushed these patches to:\nhttps://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/udmabuf-v2\n\nfor CI, CI is happy with it except for the lint task which does not like\nthe kernel headers sync, which seems to be a false positive.\n\nRegards,\n\nHans\n\n\nHans de Goede (5):\n  update-kernel-headers: Add linux/udmabuf.h to headers to sync\n  include: linux: Update kernel headers to version v6.10-rc1\n  libcamera: Rename DmaHeap class to DmaBufAllocator\n  libcamera: DmaBufAllocator: Support allocating from /dev/udmabuf\n  libcamera: software_isp: Allow using dma-buffers from /dev/udmabuf\n\n .../libcamera/internal/dma_buf_allocator.h    |  42 +++\n include/libcamera/internal/dma_heaps.h        |  38 ---\n include/libcamera/internal/meson.build        |   2 +-\n .../internal/software_isp/software_isp.h      |   4 +-\n include/linux/README                          |   2 +-\n include/linux/drm_fourcc.h                    |  10 +-\n include/linux/media-bus-format.h              |   9 +\n include/linux/rkisp1-config.h                 |  56 ++--\n include/linux/udmabuf.h                       |  33 +++\n include/linux/v4l2-controls.h                 |   6 +\n include/linux/v4l2-mediabus.h                 |  18 +-\n include/linux/v4l2-subdev.h                   |  29 ++-\n include/linux/videodev2.h                     |  72 ++++--\n src/libcamera/dma_buf_allocator.cpp           | 240 ++++++++++++++++++\n src/libcamera/dma_heaps.cpp                   | 165 ------------\n src/libcamera/meson.build                     |   2 +-\n src/libcamera/pipeline/rpi/vc4/vc4.cpp        |   4 +-\n src/libcamera/software_isp/software_isp.cpp   |   6 +-\n utils/update-kernel-headers.sh                |   1 +\n 19 files changed, 465 insertions(+), 274 deletions(-)\n create mode 100644 include/libcamera/internal/dma_buf_allocator.h\n delete mode 100644 include/libcamera/internal/dma_heaps.h\n create mode 100644 include/linux/udmabuf.h\n create mode 100644 src/libcamera/dma_buf_allocator.cpp\n delete mode 100644 src/libcamera/dma_heaps.cpp"}