{"id":18135,"url":"https://patchwork.libcamera.org/api/patches/18135/?format=json","web_url":"https://patchwork.libcamera.org/patch/18135/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20230118085953.7027-10-naush@raspberrypi.com>","date":"2023-01-18T08:59:50","name":"[libcamera-devel,v5,09/12] pipeline: raspberrypi: Validate OptionalStream in queueRequestDevice()","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"c7eb68b6e3d3313c8a59d960c7708e8d5468cac6","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18135/mbox/","series":[{"id":3713,"url":"https://patchwork.libcamera.org/api/series/3713/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3713","date":"2023-01-18T08:59:41","name":"Raspberry Pi: Platform configuration and buffer allocation improvements","version":5,"mbox":"https://patchwork.libcamera.org/series/3713/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18135/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18135/checks/","tags":{},"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 22F8EC3295\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 Jan 2023 09:01:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CACC0625F5;\n\tWed, 18 Jan 2023 10:01:27 +0100 (CET)","from mail-wr1-x430.google.com (mail-wr1-x430.google.com\n\t[IPv6:2a00:1450:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D3891625EF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Jan 2023 10:01:21 +0100 (CET)","by mail-wr1-x430.google.com with SMTP id b7so7192328wrt.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Jan 2023 01:01:21 -0800 (PST)","from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ti6-20020adfe486000000b002423dc3b1a9sm30312464wrm.52.2023.01.18.01.01.20\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 18 Jan 2023 01:01:20 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674032487;\n\tbh=wYQ9Gzq0mgdNx+u92NePezXNkFq6y5MyqGIMkKZ4dww=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=D1NMJBl6OVEKOaYhSv4Bx0kRVmLl2mkNrBScf/Fjussym4EKAa5lCcCZXklJOFBSl\n\tadn6q2O5cnR46EVuMKtDo41IcdjKIPzg6ZngVVdF2ruxpt0OuhKCUxFHdS5fLDpzSC\n\tMrd3yPaL0uuOb6P09nFPjiun0BH/WgP2lO5gcnfm7+5wsuJsbCWeGK4Sbg8+j5RifY\n\t0ZXB0rXEIKaOtmza041kY3E2kqSlHBVFWFcaGOoNyWnyKnT+9Ppd7go5rAP60ong5W\n\tfIGaMmZiaS/qJ4DPD7twc4ghY0MIl7N3uNAIr7LYbtOWGD+DHQdKbmZrAn+X4l1CFa\n\t/3kTs1sn/heLQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=6pw3j43ulVU5D59XUCkB3/cOw6PKc1joLaWHRtaeVno=;\n\tb=IQc4yoHW58QGQwL601r4DyATNVQpXjJYz1gFg/YrMTw2F7+78NhfjrInVvLzzcLwzO\n\t2sVgPj7hIAC05DoF7RetRQTArF3Xv0WcWDNex0u45W7Lut57m1K5vIxAwSlsGOWwdCGy\n\tfbmISNZLpABfQ0dHXax5vsJog5aOH/mLR6WHCx7yRLJ/t4RUfyfpvLjd8pToRosIGOH8\n\ttBeaIoEqZlA71lQUn8j04odmRxGEXYE8CgAMg1enk2jao7zmGhcmL2ng7l8X8lCzrhwJ\n\tn6EwZnTiW+DaRzJrX71qv5pqc2BYmXaNkRv8FgYNIC3noJ0uC+6XE6Rv20oWaTvCj4MN\n\tUrfA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"IQc4yoHW\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=6pw3j43ulVU5D59XUCkB3/cOw6PKc1joLaWHRtaeVno=;\n\tb=RxlgDG68hdlpH/vYClXQY6YDKO+8IYMUfRSY+aEqPv6Nkvlg5Msu1QJxKURJzK+aOs\n\t5sXZr6/+DAyveufk1fFuonkn8l0k4a9PfUJhGmzxCwuRgGuZzafzDx00gDi5YyJUuxJM\n\tGmjl2WyHwYS0fbBO8E95L+Qg9garsCzU+DVyas0Fv82vXf+1warePOpJH4b/JiQ41Hef\n\tfZTp/vmOtXkohhZoVKnhTndPM/3aIFGfi/KlKYs6+Qv2wnyUqyZPAfBjMyj6gCgEVPqF\n\tizwTAdjeA6/SF8HCIJwV5URKGbSXngmoRXw5ndsU0NM87uM+4V4aZI8jQXczq/0RUrNA\n\t/OGw==","X-Gm-Message-State":"AFqh2krKszHHeGBi6TzmkY70C0kEIWqkKfC3W8T6flmR542UJRZklXp4\n\tApW7/sC2F9gCsfSKp2UhevIfFOqpXwaBs2SEb+E=","X-Google-Smtp-Source":"AMrXdXsWXoQMxaNwJV3sBROhppPTSkiKlACiffhbUBCIU/qkc9MaERQlDwhXyOuCZDTF6LPbWcMAUw==","X-Received":"by 2002:a5d:58db:0:b0:2bd:e150:bf54 with SMTP id\n\to27-20020a5d58db000000b002bde150bf54mr1442418wrf.60.1674032481120; \n\tWed, 18 Jan 2023 01:01:21 -0800 (PST)","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 18 Jan 2023 08:59:50 +0000","Message-Id":"<20230118085953.7027-10-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20230118085953.7027-1-naush@raspberrypi.com>","References":"<20230118085953.7027-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v5 09/12] pipeline: raspberrypi: Validate\n\tOptionalStream in queueRequestDevice()","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add some validation in queueRequestDevice() to ensure that a frame buffer is\nprovided in a Request if the MandatoryRequestBuffer flag has not been set in\nthe StreamConfiguration for every configured stream.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 7 +++++++\n 1 file changed, 7 insertions(+)","diff":"diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 13d0ab4c4968..39f48e0a57fb 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1153,6 +1153,13 @@ int PipelineHandlerRPi::queueRequestDevice(Camera *camera, Request *request)\n \t\t\tstream->setExternalBuffer(buffer);\n \t\t}\n \n+\t\tif (!(stream->configuration().hints & StreamConfiguration::Hint::OptionalStream) &&\n+\t\t    !buffer) {\n+\t\t\tLOG(RPI, Error) << \"No buffer provided for mandatory stream \"\n+\t\t\t\t\t<< stream->name();\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n \t\t/*\n \t\t * If no buffer is provided by the request for this stream, we\n \t\t * queue a nullptr to the stream to signify that it must use an\n","prefixes":["libcamera-devel","v5","09/12"]}