From patchwork Tue Apr 27 13:08:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 12118 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 4EF83BDE3B for ; Tue, 27 Apr 2021 13:08:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7B06D6885A; Tue, 27 Apr 2021 15:08:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Pmv4mDgc"; dkim-atps=neutral Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id ED541602C2 for ; Tue, 27 Apr 2021 15:08:49 +0200 (CEST) Received: by mail-wm1-x332.google.com with SMTP id o21-20020a1c4d150000b029012e52898006so6839195wmh.0 for ; Tue, 27 Apr 2021 06:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H9LAHavle3NGr4uzhb4oyAzudMQf9RxaoJF4pAhApq4=; b=Pmv4mDgcjgIDVlAwuEqDrWgczBzWmGCVuqBRWFg4S2KxIU7eoyqFSzTofsEZ/dXg4m YwcA27R8JKfBD2AqLLUbfP/mKk7eTYmhHrHU4aw2U/BiOoxeWNA1vJgpaR1nLZSujrPy U1Md52cUSe+TkW6JwNpJY5XJfRTvE8n+NB/kcB4+au1dH6Ea2JcXzzmDWeKx+SlNf5/K 4dsj+433Asqjx3y6AG88blJ41q66De6Ut8Mitfc6TGf7AlSXKvuqnkzPAo/44Uy1vlui EX3zFYjav8wcmiTDyH27fNKqQcBW7pGT9NK6l1LEShrOSrCuLaNlQBhIh8KCCfXKrRLm lEwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H9LAHavle3NGr4uzhb4oyAzudMQf9RxaoJF4pAhApq4=; b=rEy0Hm04dC0mMPL4eFjBMDBi2di1F7K5iS70E1QFA2JU8/vdm1Ehn15BM2tgHgJGWm R+zqm6CLpRYvWDT1n6Onn//Rbu0HQPIEPH1Dt/iVAidUD2t21+R0dGbWYcHa6rBvyE41 WLn10T6dYmdUHUllwofZYyLcN9eRe6j+crRun2mI3Uwm8UTFJmWa9EN4Am4KKPNBJxvi pbU8Ln3Glmj5Hi8xbPLzNdg3fFYhBHJi6KsRwKtgwS+1eWRp4WlgXj0IueyI252lOqsb tUTbegWJyRdjHqb9+UCsXL1srEa+JAK2dih7q9ftz3lU7+iYBMk2aaoxHl9gica0Hyw+ WwWA== X-Gm-Message-State: AOAM533wdAJI16yZWhWR/T+rHNRINtkoDm4t2OzfXZE2/2gruqybNdaZ 0xBJHLrU912xrp4UyxWLOXHVJ1IxuaXRcA== X-Google-Smtp-Source: ABdhPJz5yjTeYgOmMYANT2V2qT0frTVdkZAiQpewprx0keMvNW4le9xPF6tg6SKUkdO9uiltK2LeDQ== X-Received: by 2002:a1c:2587:: with SMTP id l129mr24686144wml.135.1619528929409; Tue, 27 Apr 2021 06:08:49 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id r11sm3899327wrx.22.2021.04.27.06.08.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 06:08:49 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Tue, 27 Apr 2021 14:08:40 +0100 Message-Id: <20210427130844.11357-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/4] Raspberry Pi: handle sensors more flexibly 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" Hi Here's a version 4 of this patch set. The only difference over v3 is a new penultimate patch that adds new V4L2 controls for informing the sensor of the colour gains. I've actually added a control for each of the 4 Bayer colour channels even though I use only two of them. It feels like one of those things where some sensor may eventually want the ones that I might have been tempted to miss out, at which point why not just include them? Though I still wonder if having both GREENR and GREENB is overkill, and just GREEN would have sufficed. Any thoughts on that? Once we're happy with the changes here I can apply them in the Raspberry Pi Linux distribution, and then we can look to upstream them too. Thanks in advance David David Plowman (4): ipa: raspberrypi: Make CamHelper exposure methods virtual ipa: raspberrypi: Add CamHelper::ColourGainCode method include: linux: Add V4L2_CID_NOTIFY_GAIN_XXX controls ipa: raspberrypi: Update sensor's V4L2_CID_NOTIFY_GAIN_RED/BLUE controls when present include/libcamera/ipa/raspberrypi.mojom | 1 + include/linux/v4l2-controls.h | 4 ++++ src/ipa/raspberrypi/cam_helper.cpp | 18 ++++++++++++++++++ src/ipa/raspberrypi/cam_helper.hpp | 8 +++++--- src/ipa/raspberrypi/raspberrypi.cpp | 13 +++++++++++++ .../pipeline/raspberrypi/raspberrypi.cpp | 10 ++++++++++ 6 files changed, 51 insertions(+), 3 deletions(-)