pmaports/main/linux-postmarketos-allwinner/0004-media-gc2145-Added-BGGR-bayer-mode.patch
Oliver Smith 3fd5a9a568
main/linux-postmarketos-allwinner: upgrade to 5.9.8_git20201117 (MR 1735)
Update ov5640 autofocus related patch. We had it working with Martijn's
patch in 5.9.1_git20201019-r2 (MR 1654), but then dropped the patch in
favor of the patch that was added to megi's tree in 5.9.3_git20201101
(MR 1678).

It turns out that the patch added to megi's tree was different than the
patch we were carrying, it was a WIP version where loading the autofocus
firmware did not work anymore.

Megi decided to drop the autofocus patch from his tree for now, as the
firmware uploader takes more time in Martijn's proper patch. According
to Martijn it takes about a second, which seems reasonable for the
postmarketOS use case. I've added the previous version again as
out-of-tree patch.

Martijn found that for some reason the continuous autofocus still
doesn't want to start with this kernel and current patch version, as for
some reason the firmware load fails. But he extended the patch to make
autofocus work again with "tap to focus" at least.

0005-dts-pinephone-Disable-flash-led-in-OV5640-node.patch is not needed
anymore, the same change is in megi's tree.

Co-Authored-By: Martijn Braam <martijn@brixit.nl>
[ci:skip-build]: already built successfully in CI
2020-11-20 13:58:34 +01:00

30 lines
940 B
Diff

From 9fe17649b6f8059c603068a710f1fd3fb52a45cf Mon Sep 17 00:00:00 2001
From: Martijn Braam <martijn@brixit.nl>
Date: Fri, 4 Sep 2020 17:35:39 +0200
Subject: [PATCH] media: gc2145: Added BGGR bayer mode
Not all raw bayer modes from the sensor match up with the ones defined
in v4l, mostly because they're mirrored.
---
drivers/media/i2c/gc2145.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/media/i2c/gc2145.c b/drivers/media/i2c/gc2145.c
index 40a50ee17fd3..bed611045de9 100644
--- a/drivers/media/i2c/gc2145.c
+++ b/drivers/media/i2c/gc2145.c
@@ -187,6 +187,11 @@ static const struct gc2145_pixfmt gc2145_formats[] = {
.colorspace = V4L2_COLORSPACE_SRGB,
.fmt_setup = 0x06,
},
+ {
+ .code = MEDIA_BUS_FMT_SBGGR8_1X8,
+ .colorspace = V4L2_COLORSPACE_RAW,
+ .fmt_setup = 0x17,
+ },
};
static const struct gc2145_pixfmt *gc2145_find_format(u32 code)
--
2.25.4