From patchwork Thu May 1 14:16:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 23329 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 621EAC327D for ; Thu, 1 May 2025 14:16:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9D63568ADB; Thu, 1 May 2025 16:16:14 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vbWk2LNd"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 80455617D7 for ; Thu, 1 May 2025 16:16:13 +0200 (CEST) Received: from Monstersaurus.lgs-net.com (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 33BEC63D; Thu, 1 May 2025 16:16:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1746108966; bh=lQ6Ik85df2OArFpp+rU0pS5/jIFfVEEm5zHZ06de9g4=; h=From:To:Cc:Subject:Date:From; b=vbWk2LNdWdaBRFhxB+3ua7/ibZDoPViywpVlPlqrQn+q1g5BEkOG0OV3hD0EU1xiG N2DDkTRAX3cLgbIvMps9v4B39yQnnGBdgXZmZtSzcIiNZREJeLWFx/FdVkH3nXL3+b vujuHHDN7x96pvkN7Q6rcCWGQYLAYCyAq6O/ZYUs= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham Subject: [PATCH 0/3] libcamera: rkisp1: Camera Sensor Mode Validation Date: Thu, 1 May 2025 15:16:06 +0100 Message-ID: <20250501141609.717148-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.48.1 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" While testing the RKISP1 with dewarp features enabled, it is possible to have a camera with a default 90* rotation. During testing it becomes very easy to transpose the width and height - which can lead to asking for an invalid camera configuration. This demonstrated itself as a configuration that was successfully validated, but that could never successfully configure. Expand the CameraSensor classes to aid reporting this instance to the user, and ensure that if an invalid sensor configuration is selected that the Configuration is rejected as Invalid. Further extend the 'cam' tool to support setting the rotation(Orientations) accordingly which then allows the desired configuration to be tested correctly. Kieran Bingham (3): libcamera: pipeline: rkisp1: Detect invalid sensor configurations libcamera: camera_sensor: Extend reporting in getFormat() apps: cam: Support full orientation options src/apps/cam/camera_session.cpp | 9 +++++++++ src/apps/cam/main.cpp | 5 ++++- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 12 ++++++++++++ src/libcamera/sensor/camera_sensor_legacy.cpp | 4 +++- src/libcamera/sensor/camera_sensor_raw.cpp | 4 +++- 5 files changed, 31 insertions(+), 3 deletions(-)