From patchwork Thu Apr 25 10:52:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 19952 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 A231EC3220 for ; Thu, 25 Apr 2024 10:52:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B6D3E633F4; Thu, 25 Apr 2024 12:52:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="tUlUJ4ta"; dkim-atps=neutral Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 48ECB61A9B for ; Thu, 25 Apr 2024 12:52:04 +0200 (CEST) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-41b5e74f7d1so1613115e9.3 for ; Thu, 25 Apr 2024 03:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1714042323; x=1714647123; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JPcAxzTXAmFFhUiHHwW69jiZxNOr3P+QZ25HWVEtvv0=; b=tUlUJ4tabWxmpML7OULjRUs8WpST5vWTRNhjZzSpmNaVJMD3Tt0p/RiRy/H17YtLQn gOhCmsKT18BEFDAXMXI9iEaBHAfSLfNs40wovPg0582AZfbNnrTyKdaf1cAjpahCFB5u DyBs6FzQYy0tPZCGkyLj2/MUks72VYMrtmit9rXyq2EsnMcTt9YExMgd6gIw5JARt/Vh v9pdmXtuntXF+7XNkcpTT91b2iT9XsMaBvbAhVX2lMEFVDo2Z4AqhwMyd1k8enU1naHj IpcO7i17s0sPc9K8jlH1GD/hOkdqt9ETTTKOCr0O2PaakYD++zLouWsoGqCoI80K60is dAXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714042323; x=1714647123; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JPcAxzTXAmFFhUiHHwW69jiZxNOr3P+QZ25HWVEtvv0=; b=XmA0bu7H2qvIJOyhU4fMLrWpA5gLgf+CrL9DYpKDfAQjKH2rkOCEd2StM1GSRglG2Y JJzaezHzaCif3T6KoewZOPDommN+lFACiuRSiRF7oaUmAD/yVpiT9u8Ggn7kdUwi4nlf 2O7Ik0p18blGVJIpdlDiqetnt0OxcaRzTMXK4RYyNGXCd0SvhXigIfzieefs4awxQUE9 gHxyzXHoT5Vgsh/b1vyivguR21/P2x3RsrIgW1OSSSJdC7VlJj+nBVebDRPLB9unjb6R 45UexAO59gxuoE1dINk3Qbjwn5b76Iej+y0EhroJlegEg3pOn0C8U+NvK4GY9mkpHGKW zfXQ== X-Gm-Message-State: AOJu0YyHZ+C6KYiWFA97bibi9yQES825ffgqYEmRNm6Dn0B85hjlLb7a tvw8mLXobyY6Q0BIgNTg2hfFpis8De0ZQWKLaucvfq859gaH5Rc5X6oxo3oVhKaSZA8nZ5KJVX/ Y X-Google-Smtp-Source: AGHT+IHKWXQG5KhpzWyW+0qtCxDxqvTjQTywlmGZh61qQfC+X3lqPZ2collt171dg/AFaRpUHSnFbQ== X-Received: by 2002:a05:600c:470b:b0:418:969b:cb46 with SMTP id v11-20020a05600c470b00b00418969bcb46mr3776341wmo.28.1714042323445; Thu, 25 Apr 2024 03:52:03 -0700 (PDT) Received: from pi5-davidp.pitowers.org ([2001:4d4e:300:1f:c732:5d0a:406b:ae46]) by smtp.gmail.com with ESMTPSA id e4-20020a05600c4e4400b0041b0f10fc7asm4956519wmq.31.2024.04.25.03.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 03:52:03 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Cc: David Plowman Subject: [PATCH] pipeline: rpi: Avoid duplicating size range for the same pixel format Date: Thu, 25 Apr 2024 11:52:00 +0100 Message-Id: <20240425105200.41167-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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" Some V4L2 formats translate to the same pixel format, e.g. YU12 and YM12 both produce YUV420. In this case our ISP driver advertises the same size range for both, but we must not record the same thing twice for the same pixel format (which will cause a failure later on). Instead, ignore the V4l2 format if the pixel format has already been seen. Signed-off-by: David Plowman Reviewed-by: Naushir Patuck Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index 7e420b3f..0034e06d 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -474,7 +474,11 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span