From patchwork Wed Oct 27 09:27:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 14354 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 17ACBBDB1C for ; Wed, 27 Oct 2021 09:28:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 46B4C64882; Wed, 27 Oct 2021 11:28:09 +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="j5K23oyR"; dkim-atps=neutral Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8556D60122 for ; Wed, 27 Oct 2021 11:28:07 +0200 (CEST) Received: by mail-wr1-x42f.google.com with SMTP id v17so2944914wrv.9 for ; Wed, 27 Oct 2021 02:28:07 -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=5lCJAYOCZUfyQjUmms7B0E6nQiLakN4tuP07gJSQxbs=; b=j5K23oyRAmoMzQvuCivSeUr3/T0FZlHlV4MNcMUPSfLIongul2KhwvxXaOVhcQ/QQe PCie4BsBLefazH5aFXYxwH6pomsT1xgqNQY+1AXmQk2MH3eoNkTvALfFllYtxzsEPSf0 HsKPW3saB/60MnuB8DHf07HZ7Lu91Ly7DABIsO2jftvDqfiV9rBKe4FaLU81Y5j2IEah wnR9pKIqRWFGYlqyUngg9WOEkQLxJMUUjKsPvvCqwbhMVeIpNu08iNEbz1GSH7MgZKb7 yiX2IAxmGK//vj0iyHsvL/95EOTy0Ah6Rvm8o0WziI8W75NGjqPRfe/DNW74AplLiFEK wJTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5lCJAYOCZUfyQjUmms7B0E6nQiLakN4tuP07gJSQxbs=; b=wnbZpnT+aEiE0eExX+lCpyv2/A99jrm/RDvZcJM8NhUYiY2GScj4iByO6QZOk4lYuu HYWU2LRc8T8OGFnLAPIRSKsRBdddSO4p2Ut63Ln53uk8Yn5B3jdwi3oCEmVtU6Jmth1W URnSLHI2IGC79mhXz14ZnsbGq33cttUy1eL28KbO6ISp/3W/w3F377FiObBLFsXGL04N uw9I9PCLbrO2F4DZVv0Sl4YuLHb+6ay1+GeuPkpOJAqGXV5zHHlM/aghZPA04d+qPhwq 7q4PXA4SqOAYeOZinTur/FcjBuzDDhU/Ye5HdPvCohMw4LWILKNoeumNlZDtS4/K7ywr ntmw== X-Gm-Message-State: AOAM533GglLPo77vJUBz4SeGhSoLUCt64cG08Was8tQwGYBDOYYnOHId RjbRxwYdNMnkHKl1aP0O/XlVJtEEfcKQYwH2 X-Google-Smtp-Source: ABdhPJw7Qae/yRtQwYJNIZd1UdMBoP52XVeeqmLgQmNgziUsksXhQa6xXjqaax9qqFK/8S8eyZpUaw== X-Received: by 2002:a5d:4ec2:: with SMTP id s2mr9460754wrv.119.1635326886933; Wed, 27 Oct 2021 02:28:06 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:6561:eb24:3f00:ce98]) by smtp.gmail.com with ESMTPSA id x2sm2861360wmj.3.2021.10.27.02.28.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 02:28:06 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Wed, 27 Oct 2021 10:27:54 +0100 Message-Id: <20211027092803.3671096-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/9] Raspberry Pi: Conversion to media controller 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, Version 3 of this series makes the following changes over v2: - Add Laurent's patches for R10 and R12 mono image formats. - In 3/9, update the BayerFormat converstion table to include PixelFormat types. - In 4/9 add a BayerFormat::fromPixelFormat member function. - In 5/9 add a local mbusCodeToBayerFormat function for conversions instead of relying on the BayerFormat class table. Also switch some labels from "mode" to "format" :-) Default to using CSI2 packing, as that duplicates existing behavior. Also fixed up the various minors from the review feedback. - In 6/9 explicitly pass packing mode into toV4L2DeviceFormat(). - In 9/9 move the h/v flip setup above the sensor->setFormat() call so we do not need an extra sensor->getFormat() once the flips have been setup. Thanks, Naush Laurent Pinchart (2): include: drm_fourcc: Add R10 and R12 FourCC libcamera: formats: Add R10 and R12 formats Naushir Patuck (7): libcamera: bayer_format: Rework BayerFormat conversion table libcamera: bayer_format: Add PixelFormat conversion helpers to BayerFormat class pipeline: raspberrypi: Convert the pipeline handler to use media controller pipeline: raspberrypi: Set packing formats for the Unicam image node pipeline: raspberrypi: Remove "unpacked" format penalty in mode selection pipeline: raspberrypi: Account for a missing Unicam embedded data node pipeline: raspberrypi: Apply sensor flips at the start of configure() include/libcamera/internal/bayer_format.h | 4 + include/linux/drm_fourcc.h | 6 + src/libcamera/bayer_format.cpp | 139 +++++++--- src/libcamera/formats.cpp | 26 ++ src/libcamera/formats.yaml | 4 + .../pipeline/raspberrypi/raspberrypi.cpp | 247 +++++++++++------- src/libcamera/v4l2_pixelformat.cpp | 4 + 7 files changed, 297 insertions(+), 133 deletions(-)