From patchwork Thu May 2 08:09:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 19976 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 A3469BDE6B for ; Thu, 2 May 2024 08:09:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9B17F63417; Thu, 2 May 2024 10:09:37 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="pP635tBB"; dkim-atps=neutral Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A33B561A89 for ; Thu, 2 May 2024 10:09:34 +0200 (CEST) Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2e1ff3093f2so2265661fa.0 for ; Thu, 02 May 2024 01:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1714637373; x=1715242173; 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=E2xwwgwZ+bQmiZiu7q3cuN2mBQEk9rmOmTPCpCwF8WM=; b=pP635tBBJ5wLua/uqg4oAtm2vhytlgKibgU2OzEBmHjJ7lWuEUt54y56D6ZzrMX+sj JN/gF05YzMJDYGBvkKcNWAJx7Vy1PmljctUKORm/UrDoXGL+VCd4MgR++UdTlbywDuGc kW9IutdlAD6BLYHPtQfXGe4OJElRWc8C9xNM+VFz4gXbFwgRsgVkxVXMmw8Viu4R8kip pwghO8WXjqvDK8J/WYcSujTKdp4ZysMWeaaOiRqoNOusRX1nbZTIbLqb4OFCmfpoUWNo AbiNWVVzpYs0vulieGYz8pUNYImIm0iHCWwe5loIs4EUbfAqvYoTFaO0lZ/wIbbqGkFg 7s/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714637373; x=1715242173; 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=E2xwwgwZ+bQmiZiu7q3cuN2mBQEk9rmOmTPCpCwF8WM=; b=C4GltfDvMtnIGRzg3bcUctvKSZHVTDm851NuP065Fp7NPQbmqGhvepkNsEvQ8kdMh4 6ZS2XAFJtHX3wwxQdFee3rwK70KKJInvN4Vpb/F+DHOtKZMs6BDpQTzCWce6FMUNIwc+ naeJM9g9s16FUMbQNUy7jvK0S/No/08ISIljobpHQeXoKYp2hcV2J4ocm5hnBg3AkDPP YjQOEBLH0WRdPI4JzJT4FuahSPpv+4q3s+2fujKONkZSJ+yfq7CODDB6RJfICZyhVJ7p z6Llw6w7Z3Zui+/hRWdmHqqbscYNmSqu2w/kmLg5UmuibcOFS2adr6zi/2eJta3prUlX yBbA== X-Gm-Message-State: AOJu0Ywpoj/nctori6ua2XHqAZGMp3upD6udnXIwDt6PLZcrs6VrWY9b wSKSBBvmCR7DPHD2wx0EoZewiwQAjVV79UvIFtypKtsHQIhC1S1D/BV2wjKl2v36y8bVGug3vis W X-Google-Smtp-Source: AGHT+IH5Awb7zJk87gW3MJ9GdQ9wG7TTfG8yFmnSX4DY221+bHlX+K7UyWX1DPp3SDm9Ss2vCJ3IrA== X-Received: by 2002:a2e:98d2:0:b0:2e1:aa94:cf48 with SMTP id s18-20020a2e98d2000000b002e1aa94cf48mr1565188ljj.20.1714637373159; Thu, 02 May 2024 01:09:33 -0700 (PDT) Received: from localhost.localdomain ([188.39.149.98]) by smtp.gmail.com with ESMTPSA id p12-20020a05600c1d8c00b0041bcb898984sm1049970wms.31.2024.05.02.01.09.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 01:09:32 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck Subject: [PATCH v1 0/5] Pre Raspberry Pi 5 support changes Date: Thu, 2 May 2024 09:09:20 +0100 Message-Id: <20240502080925.31730-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.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" Hi all, This series adds some preliminary changes to libcamera for Raspberry Pi 5 support. The patches for the Pi 5 pipeline handler and IPA will be sent in another series. However, these patches can be merged ahead of that. Patches 1 and 2 are updates from a previous series I submitted a while back [1]. I have addressed Jacopo's feedback comments and moved them into this series. Patch 3 adds HDR algorithm support to the RPi IPA and updates the VC4 tuning files with the AGC channel config for HDR. Patches 4 and 5 are minor changes needed in preparation for the Pi 5 pipeline handler and IPA. Thanks, Naush [1] https://patchwork.libcamera.org/project/libcamera/list/?series=4169 Naushir Patuck (5): libcamera: formats: Add RGB48 formats libcamera: formats: Add PiSP specific image and config buffer formats ipa: rpi: Add HDR support ipa: rpi: Move variables from private to protected libcamera: shared_mem_object: Remove is_standard_layout restriction include/libcamera/internal/bayer_format.h | 2 + .../libcamera/internal/shared_mem_object.h | 2 +- include/linux/drm_fourcc.h | 9 + include/linux/videodev2.h | 25 + src/ipa/rpi/common/ipa_base.cpp | 78 ++- src/ipa/rpi/common/ipa_base.h | 13 +- src/ipa/rpi/controller/rpi/hdr.cpp | 112 +++- src/ipa/rpi/controller/rpi/hdr.h | 10 +- src/ipa/rpi/vc4/data/imx219.json | 607 ++++++++--------- src/ipa/rpi/vc4/data/imx219_noir.json | 607 ++++++++--------- src/ipa/rpi/vc4/data/imx290.json | 15 +- src/ipa/rpi/vc4/data/imx296.json | 17 +- src/ipa/rpi/vc4/data/imx296_mono.json | 17 +- src/ipa/rpi/vc4/data/imx378.json | 15 +- src/ipa/rpi/vc4/data/imx477.json | 615 +++++++++--------- src/ipa/rpi/vc4/data/imx477_noir.json | 607 ++++++++--------- src/ipa/rpi/vc4/data/imx477_scientific.json | 15 +- src/ipa/rpi/vc4/data/imx477_v1.json | 15 +- src/ipa/rpi/vc4/data/imx519.json | 15 +- src/ipa/rpi/vc4/data/imx708.json | 555 ++++++++-------- src/ipa/rpi/vc4/data/imx708_noir.json | 555 ++++++++-------- src/ipa/rpi/vc4/data/imx708_wide.json | 555 ++++++++-------- src/ipa/rpi/vc4/data/imx708_wide_noir.json | 555 ++++++++-------- src/ipa/rpi/vc4/data/ov5647.json | 611 ++++++++--------- src/ipa/rpi/vc4/data/ov5647_noir.json | 15 +- src/ipa/rpi/vc4/data/ov9281_mono.json | 5 +- src/ipa/rpi/vc4/data/se327m12.json | 15 +- src/ipa/rpi/vc4/data/uncalibrated.json | 5 +- src/libcamera/bayer_format.cpp | 14 + src/libcamera/formats.cpp | 71 +- src/libcamera/formats.yaml | 21 + src/libcamera/v4l2_pixelformat.cpp | 14 + src/libcamera/v4l2_subdevice.cpp | 28 + 33 files changed, 3227 insertions(+), 2588 deletions(-)