From patchwork Mon Nov 21 15:44:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 17822 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 59AE5BE08B for ; Mon, 21 Nov 2022 15:44:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 91B0B6331A; Mon, 21 Nov 2022 16:44:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1669045467; bh=3io9YxQA6OYhaa5dGqDUqSJRc1BS09HOrYcLhIS2b0A=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=G0tEtG6abmPQRXjOKY6+AAjKDSFXNwynzOAnCDEWsvc2wUbMP68SuYEQxxg+cSV6x QPV91qYny4N3lnWY9WmkhPE7DSI+99h/S0qvsw+s0iA0DCjmltZK7Mp1mVsbCxpEp8 EFGOJQePQLt9WhmOA0Ld263BfEylX8iBZEdwtpRbVKJF00OZVVpX3PxazmMRWBb/AA bNLGA2+ZkDjnXgS3qJXpstKLgzmM3fQpuJwAa6Us8mt2dL17yE5Fa7a8S8nE2MVtJI wLhsWxwfBhCpCkQIMnSTU6DvTJhT9FF+9XXsNYpizqf1C0KpOTDKh7Nh6YUQ7EMX+F T1kQg2SpgKh0g== Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 949CF63097 for ; Mon, 21 Nov 2022 16:44:26 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="XAmheHZT"; dkim-atps=neutral Received: by mail-wm1-x335.google.com with SMTP id r10-20020a1c440a000000b003d0283bf132so314354wma.4 for ; Mon, 21 Nov 2022 07:44:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NH9T7Pow8akWZ5KOP2d/i2ppu9Goxe7jwp6V7wcwY6c=; b=XAmheHZTn+2hahsanqR8TDYc8w+kU0rbewUfVbooE81v48DWECFrsckdLOKCcNSc/Y WFCR1adMW4XeQx2YDsMId7F8OhKrzQdVrU5h3Yj5C7bWZD9sK/OScgY3ivJO3NlJmkQu RjSlt4FTZRBK78CGrL+uTp5GCElYCVXjL0x5cPxsgs7MnkVxFaDZ4xLcD2APRUppJG6K wOByRgD9XS1tuxoTEBAwhgN3jhusznaOUjKf7C6Ko/wh5ExsIPKm65Uh0Zz+feoaHYHm xVEvf9abauCOMPlmBTcGYJ361AhjGAaWecRh9swg2PrdZE4FB1RELKFyFfA7vSG+vC29 6aNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=NH9T7Pow8akWZ5KOP2d/i2ppu9Goxe7jwp6V7wcwY6c=; b=282vkYHe7v41fmpE5P1mo6MuIGTD3ZiWqJ1pC6stTVHD+N6IMQLcdaPcgRbl9A0HDW pvnCA7Jq3PPPgLqxoCopXb8CLhpOgWl57ojEhVNU6agEFHJHplWMSbcti9c1w5cP/fgq lDwEuxVC1LLnVZO8KLRw6qT9Y/4yw9RNF7Z+vwU6ESLZvwhTLlJyM8GGBbjK1ZI7PSuX 7I9ffEEQEAsslIlkBxpQqtczK70tem6sGRRwV/wxxw4G/gvf9w2bEP/uGevoRFSoM9qi ul3fjoyyNf25f7HBCacrUJlgMKaIjYdi6omRTsd0SW3nvaxF3UvivbnXSbM2a0ro5q+Z MxMg== X-Gm-Message-State: ANoB5pl70AeBA1jR1Wrf83Kbny1ndYwheS7hI10Jz92RXf3PrKNBSx/w gVLR1OjXf2SdthcTay8HKv+lCPZ7qNdzNQ== X-Google-Smtp-Source: AA0mqf5su4C7DSkGXW5QSBe0zOF1gtbCn+bBRDbfUDmbUVuhfDKWYxLRkzatg3GANar2UP+VhqBbCA== X-Received: by 2002:a05:600c:601f:b0:3c6:f1fa:d677 with SMTP id az31-20020a05600c601f00b003c6f1fad677mr5376850wmb.59.1669045465756; Mon, 21 Nov 2022 07:44:25 -0800 (PST) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:e4a2:3070:eea4:e434]) by smtp.gmail.com with ESMTPSA id t11-20020adff60b000000b0022e035a4e93sm11742257wrp.87.2022.11.21.07.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 07:44:25 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Mon, 21 Nov 2022 15:44:16 +0000 Message-Id: <20221121154421.11732-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/5] Resolve invalid attempts to set sensor flip controls 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: David Plowman via libcamera-devel From: David Plowman Reply-To: David Plowman Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi again In v2 of this set, the first 3 patches are unchanged, so thanks for some of the reviews there. In the light of the various discussions, I've updated the changes to those other PHs (uvcvideo, simple and rkisp1). In all cases I'm being more explicit that I want to preserve the previous behaviour before this patch set was introduced. This may or may not (probably may not) be the actual correct behaviour that people would want. So: uvcvideo: I've deleted the patch that updated this. These are unaffected by CameraSensor changes so I think I'm better off just leaving them alone. simple and rkisp1: Both of these, AIUI, use the CameraSensor class so previously the flips were getting cleared. Therefore I've added exactly this into the PHs so that the behaviour is unchanged. As we had discussed, I think there are concerns that the simple and rkisp1 PHs implement incorrect behaviours in at least some respects, but I think it's probably a separate job for someone working on those platforms to investigate. Does that make sense? Thanks! David David Plowman (5): libcamera: bayer_format: Add toMbusCode method libcamera: camera_sensor: Do not clear camera flips when listing formats libcamera: v4l2_device: Add setTransform method to set a device's flip controls libcamera: pipeline: simple: Set device's flip controls as previously libcamera: pipeline: rkisp1: Set device's flip controls as previously include/libcamera/internal/bayer_format.h | 1 + include/libcamera/internal/v4l2_device.h | 3 ++ src/libcamera/bayer_format.cpp | 11 +++++ src/libcamera/camera_sensor.cpp | 49 ++++++++++++++++++----- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 3 ++ src/libcamera/pipeline/simple/simple.cpp | 3 ++ src/libcamera/v4l2_device.cpp | 37 +++++++++++++++++ 7 files changed, 97 insertions(+), 10 deletions(-)