diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-16 23:40:32 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-17 15:11:22 +0200 |
commit | 20ea6adbf199097c4f5f591ffee088340630dae4 (patch) | |
tree | d6719d95e136611a1c25bbf7789652d6d402779d /target/linux/bcm27xx/patches-5.15/950-0662-drivers-bcm2835_unicam-Disable-trigger-mode-operatio.patch | |
parent | bca05bd072180dc38ef740b37ded9572a6db1981 (diff) | |
download | upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.gz upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.bz2 upstream-20ea6adbf199097c4f5f591ffee088340630dae4.zip |
bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0662-drivers-bcm2835_unicam-Disable-trigger-mode-operatio.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0662-drivers-bcm2835_unicam-Disable-trigger-mode-operatio.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0662-drivers-bcm2835_unicam-Disable-trigger-mode-operatio.patch b/target/linux/bcm27xx/patches-5.15/950-0662-drivers-bcm2835_unicam-Disable-trigger-mode-operatio.patch new file mode 100644 index 0000000000..d10a41d3e6 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0662-drivers-bcm2835_unicam-Disable-trigger-mode-operatio.patch @@ -0,0 +1,57 @@ +From 70198f4ed03a3df670d5e12ab78bb3c4c2520396 Mon Sep 17 00:00:00 2001 +From: Naushir Patuck <naush@raspberrypi.com> +Date: Tue, 18 Jan 2022 13:13:14 +0000 +Subject: [PATCH] drivers: bcm2835_unicam: Disable trigger mode + operation + +On a Pi3 B/B+ platform the imx219 sensor frequently generates a single corrupt +frame when the sensor first starts. This can either be a missing line, or +invalid samples within the line. This only occurrs using the Unicam kernel +driver. + +Disabling trigger mode elimiates this corruption. Since trigger mode is a +legacy feature copied from the firmware driver and not expected to be needed, +remove it. Tested on the Raspberry Pi cameras and shows no ill effects. + +Signed-off-by: Naushir Patuck <naush@raspberrypi.com> +--- + drivers/media/platform/bcm2835/bcm2835-unicam.c | 14 +------------- + 1 file changed, 1 insertion(+), 13 deletions(-) + +--- a/drivers/media/platform/bcm2835/bcm2835-unicam.c ++++ b/drivers/media/platform/bcm2835/bcm2835-unicam.c +@@ -984,11 +984,6 @@ static irqreturn_t unicam_isr(int irq, v + } + } + +- if (reg_read(unicam, UNICAM_ICTL) & UNICAM_FCM) { +- /* Switch out of trigger mode if selected */ +- reg_write_field(unicam, UNICAM_ICTL, 1, UNICAM_TFC); +- reg_write_field(unicam, UNICAM_ICTL, 0, UNICAM_FCM); +- } + return IRQ_HANDLED; + } + +@@ -2298,8 +2293,7 @@ static void unicam_start_rx(struct unica + + reg_write_field(dev, UNICAM_ANA, 0, UNICAM_DDL); + +- /* Always start in trigger frame capture mode (UNICAM_FCM set) */ +- val = UNICAM_FSIE | UNICAM_FEIE | UNICAM_FCM | UNICAM_IBOB; ++ val = UNICAM_FSIE | UNICAM_FEIE | UNICAM_IBOB; + set_field(&val, line_int_freq, UNICAM_LCIE_MASK); + reg_write(dev, UNICAM_ICTL, val); + reg_write(dev, UNICAM_STA, UNICAM_STA_MASK_ALL); +@@ -2412,12 +2406,6 @@ static void unicam_start_rx(struct unica + /* Load embedded data buffer pointers if needed */ + if (dev->node[METADATA_PAD].streaming && dev->sensor_embedded_data) + reg_write_field(dev, UNICAM_DCS, 1, UNICAM_LDP); +- +- /* +- * Enable trigger only for the first frame to +- * sync correctly to the FS from the source. +- */ +- reg_write_field(dev, UNICAM_ICTL, 1, UNICAM_TFC); + } + + static void unicam_disable(struct unicam_device *dev) |