pmaports/main/linux-postmarketos-allwinner/0003-Disable-8723cs-power-saving.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

34 lines
1.4 KiB
Diff

From 1020a8a88853f2b9dbbd269079cccb07e9f6e5aa Mon Sep 17 00:00:00 2001
From: Dalton <dalton@ubports.com>
Date: Tue, 23 Jun 2020 20:54:12 -0500
Subject: [PATCH] Disable 8723cs power saving
The runtime power management features in the 8723cs firmware on the
PinePhone don't seem to work correctly. While we expect the chipset to
leave a low power state when it's time to send or receive data, instead
we get a delay of 10-20 seconds before any packets are sent.
---
drivers/staging/rtl8723cs-new/os_dep/linux/os_intfs.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723cs-new/os_dep/linux/os_intfs.c b/drivers/staging/rtl8723cs-new/os_dep/linux/os_intfs.c
index 3e6ba0a0fd17..5bb850a4caf0 100644
--- a/drivers/staging/rtl8723cs-new/os_dep/linux/os_intfs.c
+++ b/drivers/staging/rtl8723cs-new/os_dep/linux/os_intfs.c
@@ -54,7 +54,12 @@ int rtw_adhoc_tx_pwr = 1;
int rtw_soft_ap = 0;
/* int smart_ps = 1; */
#ifdef CONFIG_POWER_SAVING
- int rtw_power_mgnt = PS_MODE_MAX;
+ // Setting PS_MODE_ACTIVE by default keeps the power saving code in the
+ // driver but works around an issue where the 8723cs won't leave Leisure
+ // Power Saving mode without long delays. Allows for testing different
+ // firmwares.
+ // int rtw_power_mgnt = PS_MODE_MAX;
+ int rtw_power_mgnt = PS_MODE_ACTIVE;
#ifdef CONFIG_IPS_LEVEL_2
int rtw_ips_mode = IPS_LEVEL_2;
#else
--
2.25.4