From patchwork Fri Jul 15 13:56:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 16646 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 C0332BD1F1 for ; Fri, 15 Jul 2022 13:56:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 28FD86330E; Fri, 15 Jul 2022 15:56:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1657893387; bh=pBZo3GBKPCJBUIonYQH1a1k9kiTCz4NIeiZnyIvF5K0=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=yCt8zdi2sEji4DFb6Yi61r3JDDVVwAKyCfOTH/rTTJqPbK1m/cJa9rqKVJZeD8yfq on5YYJh7Pmfr1U9hdXqxskcJX/ijzFRHXRRaiKx9KhmlQIcOVatURt+rvVSW7G6KtG M/oVnSVUH3wJb+NOuG92kUDiQ2vSkBCpWBvs6DNGpK/XUlgGB5JQOdwcv/ntAZpOSZ +pdPurHCdhyA15SKRiwHMlIq7DfS/UWx4fX/5TTnRCEXfLN0/jiRRKqdYpEJx7m8nc /P2VqUKIQ/995CcNvMYaO1xKOKQskUdZEFsSW84h3/lw6x6IovC83jOAfbLyoM4O5V IKEzPNuTNUwFQ== Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7591F6330A for ; Fri, 15 Jul 2022 15:56:25 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 358CD6000D; Fri, 15 Jul 2022 13:56:23 +0000 (UTC) To: libcamera-devel@lists.libcamera.org Date: Fri, 15 Jul 2022 15:56:09 +0200 Message-Id: <20220715135609.54060-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: raspberry: Fix format validation 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: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" If the pixel format gets adjusted to the default NV12 format during validation, it gets currently ignored and the user-supplied format is used nonetheless. Fix it by using the adjusted pixel format. Signed-off-by: Jacopo Mondi Reviewed-by: Naushir Patuck Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.36.1 diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index fdc24cd530c2..8c8813038483 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -523,7 +523,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate() } V4L2DeviceFormat format; - format.fourcc = V4L2PixelFormat::fromPixelFormat(cfg.pixelFormat); + format.fourcc = V4L2PixelFormat::fromPixelFormat(cfgPixFmt); format.size = cfg.size; format.colorSpace = cfg.colorSpace;