mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 17:01:14 +00:00
14940aee45
Removed upstreamed: target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch The following patch does not apply to upstream any more and needs some more work to make it work fully again. I am not sure if we are still able to set the UART to a none standard baud rate. target/linux/ath79/patches-5.4/921-serial-core-add-support-for-boot-console-with-arbitr.patch These patches needed manually changes: target/linux/generic/pending-5.4/110-ehci_hcd_ignore_oc.patch target/linux/ipq806x/patches-5.4/0065-arm-override-compiler-flags.patch target/linux/layerscape/patches-5.4/804-crypto-0016-MLKU-114-1-crypto-caam-reduce-page-0-regs-access-to-.patch target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch All others updated automatically. Compile-tested on: malta/le, armvirt/64, lantiq/xrx200 Runtime-tested on: malta/le, armvirt/64, lantiq/xrx200 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
95 lines
3.7 KiB
Diff
95 lines
3.7 KiB
Diff
From 8dbbff7b75eee842c00ebaa53fa0a34b3e9bbcaa Mon Sep 17 00:00:00 2001
|
|
From: Naushir Patuck <naush@raspberrypi.com>
|
|
Date: Thu, 23 Apr 2020 10:20:26 +0100
|
|
Subject: [PATCH] media: uapi: v4l2-core: Add ISP statistics output
|
|
V4L2 fourcc type
|
|
|
|
Add V4L2_META_FMT_BCM2835_ISP_STATS V4L2 format type.
|
|
|
|
This new format will be used by the BCM2835 ISP device to return
|
|
out ISP statistics for 3A.
|
|
|
|
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
|
|
---
|
|
Documentation/media/uapi/v4l/meta-formats.rst | 1 +
|
|
.../v4l/pixfmt-meta-bcm2835-isp-stats.rst | 41 +++++++++++++++++++
|
|
drivers/media/v4l2-core/v4l2-ioctl.c | 1 +
|
|
include/uapi/linux/videodev2.h | 1 +
|
|
4 files changed, 44 insertions(+)
|
|
create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-bcm2835-isp-stats.rst
|
|
|
|
--- a/Documentation/media/uapi/v4l/meta-formats.rst
|
|
+++ b/Documentation/media/uapi/v4l/meta-formats.rst
|
|
@@ -19,6 +19,7 @@ These formats are used for the :ref:`met
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
+ pixfmt-meta-bcm2835-isp-stats
|
|
pixfmt-meta-d4xx
|
|
pixfmt-meta-intel-ipu3
|
|
pixfmt-meta-sensor-data
|
|
--- /dev/null
|
|
+++ b/Documentation/media/uapi/v4l/pixfmt-meta-bcm2835-isp-stats.rst
|
|
@@ -0,0 +1,41 @@
|
|
+.. Permission is granted to copy, distribute and/or modify this
|
|
+.. document under the terms of the GNU Free Documentation License,
|
|
+.. Version 1.1 or any later version published by the Free Software
|
|
+.. Foundation, with no Invariant Sections, no Front-Cover Texts
|
|
+.. and no Back-Cover Texts. A copy of the license is included at
|
|
+.. Documentation/media/uapi/fdl-appendix.rst.
|
|
+..
|
|
+.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
|
|
+
|
|
+.. _v4l2-meta-fmt-bcm2835-isp-stats:
|
|
+
|
|
+*****************************************
|
|
+V4L2_META_FMT_BCM2835_ISP_STATS ('BSTA')
|
|
+*****************************************
|
|
+
|
|
+BCM2835 ISP Statistics
|
|
+
|
|
+Description
|
|
+===========
|
|
+
|
|
+The BCM2835 ISP hardware calculate image statistics for an input Bayer frame.
|
|
+These statistics are obtained from the "bcm2835-isp0-capture3" device node
|
|
+using the :c:type:`v4l2_meta_format` interface. They are formatted as described
|
|
+by the :c:type:`bcm2835_isp_stats` structure below.
|
|
+
|
|
+.. code-block:: c
|
|
+
|
|
+ #define DEFAULT_AWB_REGIONS_X 16
|
|
+ #define DEFAULT_AWB_REGIONS_Y 12
|
|
+
|
|
+ #define NUM_HISTOGRAMS 2
|
|
+ #define NUM_HISTOGRAM_BINS 128
|
|
+ #define AWB_REGIONS (DEFAULT_AWB_REGIONS_X * DEFAULT_AWB_REGIONS_Y)
|
|
+ #define FLOATING_REGIONS 16
|
|
+ #define AGC_REGIONS 16
|
|
+ #define FOCUS_REGIONS 12
|
|
+
|
|
+.. kernel-doc:: include/uapi/linux/bcm2835-isp.h
|
|
+ :functions: bcm2835_isp_stats_hist bcm2835_isp_stats_region
|
|
+ bcm2835_isp_stats_focus bcm2835_isp_stats
|
|
+
|
|
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
|
|
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
|
|
@@ -1351,6 +1351,7 @@ static void v4l_fill_fmtdesc(struct v4l2
|
|
case V4L2_META_FMT_UVC: descr = "UVC Payload Header Metadata"; break;
|
|
case V4L2_META_FMT_D4XX: descr = "Intel D4xx UVC Metadata"; break;
|
|
case V4L2_META_FMT_SENSOR_DATA: descr = "Sensor Ancillary Metadata"; break;
|
|
+ case V4L2_META_FMT_BCM2835_ISP_STATS: descr = "BCM2835 ISP Image Statistics"; break;
|
|
|
|
default:
|
|
/* Compressed formats */
|
|
--- a/include/uapi/linux/videodev2.h
|
|
+++ b/include/uapi/linux/videodev2.h
|
|
@@ -769,6 +769,7 @@ struct v4l2_pix_format {
|
|
#define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */
|
|
#define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */
|
|
#define V4L2_META_FMT_SENSOR_DATA v4l2_fourcc('S', 'E', 'N', 'S') /* Sensor Ancillary metadata */
|
|
+#define V4L2_META_FMT_BCM2835_ISP_STATS v4l2_fourcc('B', 'S', 'T', 'A') /* BCM2835 ISP image statistics output */
|
|
|
|
/* priv field value to indicates that subsequent fields are valid. */
|
|
#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
|