From patchwork Fri Dec 3 17:48:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 15021 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 2B859BF415 for ; Fri, 3 Dec 2021 17:49:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 621CC60832; Fri, 3 Dec 2021 18:48:59 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="IOPAoPFk"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0A25260725 for ; Fri, 3 Dec 2021 18:48:57 +0100 (CET) Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 88255A59; Fri, 3 Dec 2021 18:48:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1638553737; bh=dyq9cN1Tx1I7jO+hKqF9n4mUkOs7nGqbJ0WaBRFrUOk=; h=From:To:Cc:Subject:Date:From; b=IOPAoPFkkWOSt9Ump5ATOvTKnNpfUrgLhWJR4SNsdwTzw5r92TSw0e6P6oLW8PdAD DtNc/LwG3Bkc4OaLhuM1jhdn3O7DC4bzZ9r1ufpVZ3ccJi/rXiErc1Rt8+wKfsvcb/ c3Eo+A9syG7nnrdvUvZ2DaY4tr5bdob4kisBF/9Y= From: Kieran Bingham To: libcamera devel Date: Fri, 3 Dec 2021 17:48:53 +0000 Message-Id: <20211203174853.130537-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [IPU3-IPA PATCH] libcamera-helpers: mapped_framebuffer: Update to new FD API X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The plane file descriptors API has been updated in the libcamera base library. Update our mapped_framebuffer class accordingly. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain --- src/libcamera-helpers/mapped_framebuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera-helpers/mapped_framebuffer.cpp b/src/libcamera-helpers/mapped_framebuffer.cpp index a65740831331..3d231147ed91 100644 --- a/src/libcamera-helpers/mapped_framebuffer.cpp +++ b/src/libcamera-helpers/mapped_framebuffer.cpp @@ -198,7 +198,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags) std::map mappedBuffers; for (const FrameBuffer::Plane &plane : buffer->planes()) { - const int fd = plane.fd.fd(); + const int fd = plane.fd.get(); if (mappedBuffers.find(fd) == mappedBuffers.end()) { const size_t length = lseek(fd, 0, SEEK_END); mappedBuffers[fd] = MappedBufferInfo{ nullptr, 0, length }; @@ -220,7 +220,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags) } for (const FrameBuffer::Plane &plane : buffer->planes()) { - const int fd = plane.fd.fd(); + const int fd = plane.fd.get(); auto &info = mappedBuffers[fd]; if (!info.address) { void *address = mmap(nullptr, info.mapLength, mmapFlags,