From patchwork Sun Jun 28 16:17:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 8477 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 56956C2E66 for ; Sun, 28 Jun 2020 16:13:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E86FF609C9; Sun, 28 Jun 2020 18:13:57 +0200 (CEST) Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 54DA0603B5 for ; Sun, 28 Jun 2020 18:13:57 +0200 (CEST) Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id B759210000A; Sun, 28 Jun 2020 16:13:56 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Sun, 28 Jun 2020 18:17:20 +0200 Message-Id: <20200628161723.30625-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] libcamera: pipeline handlers: Fail if roles are not supported 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 Camera API prescribes that if the list of roles supplied to generateConfiguration() is not supported, the function shall fail. All pipeline handlers but the IPU3 do not comply with the specification, silently adjusting the generated configuration to their capabilities. Fix this by failing explicitly if the provided list of roles cannot be satisfied. This small series prepares to rework the IPU3 generate configuration function, which will be aligned to the implementation found in other pipeline handlers (more spcifically to the raspberry pi one, which has similar constraints on the number of supported output streams) Thanks j Jacopo Mondi (3): libcamera: raspberrypi: Refuse invalid roles configuration libcamera: raspberrypi: Fail on unsupported stream role libcamera: pipelines: Fail if more than one role is requested src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 14 +++++++++++++- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 +++++ src/libcamera/pipeline/simple/simple.cpp | 5 +++++ src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 5 +++++ src/libcamera/pipeline/vimc/vimc.cpp | 5 +++++ 5 files changed, 33 insertions(+), 1 deletion(-) --- 2.27.0