From patchwork Wed Feb 3 14:29:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helen Koike X-Patchwork-Id: 11116 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 0A317BD160 for ; Wed, 3 Feb 2021 14:30:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8F86F68446; Wed, 3 Feb 2021 15:30:08 +0100 (CET) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id ED64A683FE for ; Wed, 3 Feb 2021 15:30:06 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id 7CA251F44E07 From: Helen Koike To: libcamera-devel@lists.libcamera.org Date: Wed, 3 Feb 2021 11:29:55 -0300 Message-Id: <20210203142955.1238189-1-helen.koike@collabora.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: v4l2_videodevice: remove confusing memory MMAP assignment before QUERYBUF 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: , Cc: kernel@collabora.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" QUERYBUF doesn't require the memory field to be pre-filled. Also, V4L2VideoDevice::createBuffer uses dmabuf file descriptors, thus using V4L2_MEMORY_MMAP makes things confusing, so remove it. Signed-off-by: Helen Koike Reviewed-by: Laurent Pinchart --- src/libcamera/v4l2_videodevice.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index a9509bff..c77e1aff 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -1255,7 +1255,6 @@ std::unique_ptr V4L2VideoDevice::createBuffer(unsigned int index) buf.index = index; buf.type = bufferType_; - buf.memory = V4L2_MEMORY_MMAP; buf.length = std::size(v4l2Planes); buf.m.planes = v4l2Planes;