main/linux-postmarketos-stericsson: upgrade to 5.13-rc4 (MR 2220)
And also update patches. See patch files for descriptions.
This commit is contained in:
parent
c792feaa3e
commit
b567756b16
5 changed files with 209 additions and 23 deletions
|
@ -4,9 +4,9 @@
|
|||
_flavor="postmarketos-stericsson"
|
||||
_config="config-$_flavor.armv7"
|
||||
pkgname=linux-$_flavor
|
||||
pkgver=5.13_rc2
|
||||
pkgver=5.13_rc4
|
||||
pkgrel=0
|
||||
_tag="5.13-rc2"
|
||||
_tag="5.13-rc4"
|
||||
pkgdesc="Mainline kernel fork for ST-Ericsson NovaThor devices"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
|
@ -19,6 +19,8 @@ source="
|
|||
$pkgname-$_tag.tar.gz::https://git.kernel.org/torvalds/t/linux-$_tag.tar.gz
|
||||
config-$_flavor.armv7
|
||||
bl.patch
|
||||
panel.patch
|
||||
regulators.patch
|
||||
"
|
||||
builddir="$srcdir/linux-${_tag#v}"
|
||||
|
||||
|
@ -47,7 +49,9 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
eee237da43e08ac6d897510436b52fe042cff6583fd5406f4bc1535bd8a6780cbb0e1dfee9584b88cfa60fbc55a38be4cd5a424587c57168050f6ec6ce96890e linux-postmarketos-stericsson-5.13-rc2.tar.gz
|
||||
a55862ad08db8d9307107a1996c64b59f716870549ca7a9ce38a3ebcbd14b57e1cbb91f830c1f938f8cf3b5b5512a41edf06d9deec5a48fb02a03e8b18cc3873 config-postmarketos-stericsson.armv7
|
||||
44ba95ca1278de476489ed505de6ea18140ee1f5f4176ecb0935a336c01e4468b7cb70176474e7fd12c886428dc74219fbcc3883b285276dda44530cd8262c32 bl.patch
|
||||
94ee9e59d4a3edcaf229c5ec29623302b50dd62d4ef8bdd91539cf0009f5a5fd13be629dbe78d004b016fec822c9e755898ea708fa33e1c74c54a650f64e030e linux-postmarketos-stericsson-5.13-rc4.tar.gz
|
||||
6758b31eeefbb72cf7bb831467dce96acfd33b547d37a45631a74c8e1a58fc7305a9fba77fddc9cbada6d9b0fccacb2255fc4f8562ee25d88ca02cae71a17036 config-postmarketos-stericsson.armv7
|
||||
66ec2d3105540e991bccc8cfb0e4212cb40a31a5a35e8cdc084b8bd7ffa016a86b3b340fd57b077b3c95b5bcb1e80cadaa11e71cd1a54a3e0e595024f3f27346 bl.patch
|
||||
1d4d549c5a8c8bda8eec814cd8632626f16d273d775f082028d15db7a330e0c01b2999668b0963eaeb06410de0c14d1d4c3344ac92a228da9392dba33562dcac panel.patch
|
||||
8206d74c52328827502a32644f70fd149a72a78aaf936cd44f474b9153e8caccf73206df76e24004329edebab90e1a4a0e965630f4817aa5dd642d9ee2729295 regulators.patch
|
||||
"
|
||||
|
|
|
@ -6,43 +6,142 @@ The code is using ndelay() which is not available on
|
|||
platforms such as ARM and will result in 32 * udelay(1)
|
||||
which is substantial.
|
||||
|
||||
Add some code to detect if an interrupt occurs during the
|
||||
tight loop and in that case just redo it from the top.
|
||||
|
||||
Fixes: 5317f37e48b9 ("backlight: Add Kinetic KTD253 backlight driver")
|
||||
Cc: Stephan Gerhold <stephan@gerhold.net>
|
||||
Reported-by: newbyte@disroot.org
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/video/backlight/ktd253-backlight.c | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
ChangeLog v2->v3:
|
||||
- Read my own patch and realized a bug: when we get a timeout
|
||||
we bounce back to max period, but still count down the pwm
|
||||
with one leading to an off-by-one error. Fix it by extending
|
||||
some else clauses.
|
||||
ChangeLog v1->v2:
|
||||
- Alter the dimming code to check for how many ns the pulse
|
||||
is low, and if it gets to ~100 us then redo from start.
|
||||
This is to account for the advent that an IRQ arrives while
|
||||
setting backlight and hits the low pulse making it way
|
||||
too long.
|
||||
---
|
||||
drivers/video/backlight/ktd253-backlight.c | 75 ++++++++++++++++------
|
||||
1 file changed, 55 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/backlight/ktd253-backlight.c b/drivers/video/backlight/ktd253-backlight.c
|
||||
index a7df5bcca9da..b79a47c2801f 100644
|
||||
index a7df5bcca9da..37aa5a669530 100644
|
||||
--- a/drivers/video/backlight/ktd253-backlight.c
|
||||
+++ b/drivers/video/backlight/ktd253-backlight.c
|
||||
@@ -40,7 +40,6 @@ static int ktd253_backlight_update_status(struct backlight_device *bl)
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#define KTD253_T_LOW_NS (200 + 10) /* Additional 10ns as safety factor */
|
||||
#define KTD253_T_HIGH_NS (200 + 10) /* Additional 10ns as safety factor */
|
||||
+#define KTD253_T_OFF_CRIT_NS 100000 /* 100 us, now it doesn't look good */
|
||||
#define KTD253_T_OFF_MS 3
|
||||
|
||||
struct ktd253_backlight {
|
||||
@@ -34,13 +35,50 @@ struct ktd253_backlight {
|
||||
u16 ratio;
|
||||
};
|
||||
|
||||
+static void ktd253_backlight_set_max_ratio(struct ktd253_backlight *ktd253)
|
||||
+{
|
||||
+ gpiod_set_value_cansleep(ktd253->gpiod, 1);
|
||||
+ ndelay(KTD253_T_HIGH_NS);
|
||||
+ /* We always fall back to this when we power on */
|
||||
+}
|
||||
+
|
||||
+static int ktd253_backlight_stepdown(struct ktd253_backlight *ktd253)
|
||||
+{
|
||||
+ /*
|
||||
+ * These GPIO operations absolutely can NOT sleep so no _cansleep
|
||||
+ * suffixes, and no using GPIO expanders on slow buses for this!
|
||||
+ *
|
||||
+ * The maximum number of cycles of the loop is 32 so the time taken
|
||||
+ * should nominally be:
|
||||
+ * (T_LOW_NS + T_HIGH_NS + loop_time) * 32
|
||||
+ *
|
||||
+ * Architectures do not always support ndelay() and we will get a few us
|
||||
+ * instead. If we get to a critical time limit an interrupt has likely
|
||||
+ * occured in the low part of the loop and we need to restart from the
|
||||
+ * top so we have the backlight in a known state.
|
||||
+ */
|
||||
+ u64 ns;
|
||||
+
|
||||
+ ns = ktime_get_ns();
|
||||
+ gpiod_set_value(ktd253->gpiod, 0);
|
||||
+ ndelay(KTD253_T_LOW_NS);
|
||||
+ gpiod_set_value(ktd253->gpiod, 1);
|
||||
+ ns = ktime_get_ns() - ns;
|
||||
+ if (ns >= KTD253_T_OFF_CRIT_NS) {
|
||||
+ dev_err(ktd253->dev, "PCM on backlight took too long (%llu ns)\n", ns);
|
||||
+ return -EAGAIN;
|
||||
+ }
|
||||
+ ndelay(KTD253_T_HIGH_NS);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int ktd253_backlight_update_status(struct backlight_device *bl)
|
||||
{
|
||||
struct ktd253_backlight *ktd253 = bl_get_data(bl);
|
||||
int brightness = backlight_get_brightness(bl);
|
||||
u16 target_ratio;
|
||||
u16 current_ratio = ktd253->ratio;
|
||||
- unsigned long flags;
|
||||
+ int ret;
|
||||
|
||||
dev_dbg(ktd253->dev, "new brightness/ratio: %d/32\n", brightness);
|
||||
|
||||
@@ -69,13 +68,9 @@ static int ktd253_backlight_update_status(struct backlight_device *bl)
|
||||
@@ -62,37 +100,34 @@ static int ktd253_backlight_update_status(struct backlight_device *bl)
|
||||
}
|
||||
|
||||
/*
|
||||
if (current_ratio == 0) {
|
||||
- gpiod_set_value_cansleep(ktd253->gpiod, 1);
|
||||
- ndelay(KTD253_T_HIGH_NS);
|
||||
- /* We always fall back to this when we power on */
|
||||
+ ktd253_backlight_set_max_ratio(ktd253);
|
||||
current_ratio = KTD253_MAX_RATIO;
|
||||
}
|
||||
|
||||
- /*
|
||||
- * WARNING:
|
||||
- * The loop to set the correct current level is performed
|
||||
- * with interrupts disabled as it is timing critical.
|
||||
* The maximum number of cycles of the loop is 32
|
||||
* so the time taken will be (T_LOW_NS + T_HIGH_NS + loop_time) * 32,
|
||||
*/
|
||||
- * The maximum number of cycles of the loop is 32
|
||||
- * so the time taken will be (T_LOW_NS + T_HIGH_NS + loop_time) * 32,
|
||||
- */
|
||||
- local_irq_save(flags);
|
||||
while (current_ratio != target_ratio) {
|
||||
/*
|
||||
* These GPIO operations absolutely can NOT sleep so no
|
||||
@@ -92,7 +87,6 @@ static int ktd253_backlight_update_status(struct backlight_device *bl)
|
||||
else
|
||||
* _cansleep suffixes, and no using GPIO expanders on
|
||||
* slow buses for this!
|
||||
*/
|
||||
- gpiod_set_value(ktd253->gpiod, 0);
|
||||
- ndelay(KTD253_T_LOW_NS);
|
||||
- gpiod_set_value(ktd253->gpiod, 1);
|
||||
- ndelay(KTD253_T_HIGH_NS);
|
||||
- /* After 1/32 we loop back to 32/32 */
|
||||
- if (current_ratio == KTD253_MIN_RATIO)
|
||||
+ ret = ktd253_backlight_stepdown(ktd253);
|
||||
+ if (ret == -EAGAIN) {
|
||||
+ /*
|
||||
+ * Something disturbed the backlight setting code when
|
||||
+ * running so we need to bring the PWM back to a known
|
||||
+ * state. This shouldn't happen too much.
|
||||
+ */
|
||||
+ gpiod_set_value_cansleep(ktd253->gpiod, 0);
|
||||
+ msleep(KTD253_T_OFF_MS);
|
||||
+ ktd253_backlight_set_max_ratio(ktd253);
|
||||
+ current_ratio = KTD253_MAX_RATIO;
|
||||
+ } else if (current_ratio == KTD253_MIN_RATIO) {
|
||||
+ /* After 1/32 we loop back to 32/32 */
|
||||
current_ratio = KTD253_MAX_RATIO;
|
||||
- else
|
||||
+ } else {
|
||||
current_ratio--;
|
||||
+ }
|
||||
}
|
||||
- local_irq_restore(flags);
|
||||
ktd253->ratio = current_ratio;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 5.13.0-rc2 Kernel Configuration
|
||||
# Linux/arm 5.13.0-rc4 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="armv7-alpine-linux-musleabihf-gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
|
@ -81,6 +81,16 @@ CONFIG_NO_HZ_IDLE=y
|
|||
CONFIG_HIGH_RES_TIMERS=y
|
||||
# end of Timers subsystem
|
||||
|
||||
CONFIG_BPF=y
|
||||
CONFIG_HAVE_EBPF_JIT=y
|
||||
|
||||
#
|
||||
# BPF subsystem
|
||||
#
|
||||
# CONFIG_BPF_SYSCALL is not set
|
||||
# CONFIG_BPF_JIT is not set
|
||||
# end of BPF subsystem
|
||||
|
||||
CONFIG_PREEMPT_NONE=y
|
||||
# CONFIG_PREEMPT_VOLUNTARY is not set
|
||||
# CONFIG_PREEMPT is not set
|
||||
|
@ -159,7 +169,6 @@ CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
|
|||
CONFIG_LD_ORPHAN_WARN=y
|
||||
CONFIG_SYSCTL=y
|
||||
CONFIG_HAVE_UID16=y
|
||||
CONFIG_BPF=y
|
||||
# CONFIG_EXPERT is not set
|
||||
CONFIG_UID16=y
|
||||
CONFIG_MULTIUSER=y
|
||||
|
@ -185,7 +194,6 @@ CONFIG_MEMBARRIER=y
|
|||
CONFIG_KALLSYMS=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_KALLSYMS_BASE_RELATIVE=y
|
||||
# CONFIG_BPF_SYSCALL is not set
|
||||
# CONFIG_USERFAULTFD is not set
|
||||
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
|
||||
CONFIG_KCMP=y
|
||||
|
@ -888,7 +896,6 @@ CONFIG_XPS=y
|
|||
# CONFIG_CGROUP_NET_CLASSID is not set
|
||||
CONFIG_NET_RX_BUSY_POLL=y
|
||||
CONFIG_BQL=y
|
||||
# CONFIG_BPF_JIT is not set
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
|
||||
#
|
||||
|
@ -978,7 +985,6 @@ CONFIG_GRO_CELLS=y
|
|||
CONFIG_NET_SELFTESTS=y
|
||||
# CONFIG_FAILOVER is not set
|
||||
CONFIG_ETHTOOL_NETLINK=y
|
||||
CONFIG_HAVE_EBPF_JIT=y
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
|
@ -1068,6 +1074,7 @@ CONFIG_BLK_DEV_RAM_SIZE=65536
|
|||
# NVME Support
|
||||
#
|
||||
# CONFIG_NVME_FC is not set
|
||||
# CONFIG_NVME_TCP is not set
|
||||
# CONFIG_NVME_TARGET is not set
|
||||
# end of NVME Support
|
||||
|
||||
|
@ -1717,7 +1724,6 @@ CONFIG_SPI_MASTER=y
|
|||
# SPI Master Controller Drivers
|
||||
#
|
||||
# CONFIG_SPI_ALTERA is not set
|
||||
# CONFIG_SPI_ALTERA_CORE is not set
|
||||
# CONFIG_SPI_AXI_SPI_ENGINE is not set
|
||||
CONFIG_SPI_BITBANG=y
|
||||
# CONFIG_SPI_CADENCE is not set
|
||||
|
@ -4144,7 +4150,6 @@ CONFIG_INOTIFY_USER=y
|
|||
#
|
||||
# Caches
|
||||
#
|
||||
# CONFIG_NETFS_SUPPORT is not set
|
||||
# CONFIG_FSCACHE is not set
|
||||
# end of Caches
|
||||
|
||||
|
|
34
main/linux-postmarketos-stericsson/panel.patch
Normal file
34
main/linux-postmarketos-stericsson/panel.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
Failing to read the MTP over DSI should not bring down the
|
||||
system and make us bail out from using the display, it turns
|
||||
out that this happens when toggling the display off and on,
|
||||
and that write is often still working so the display output
|
||||
is just fine. Printing an error is enough.
|
||||
|
||||
Tested by killing the Gnome session repeatedly on the
|
||||
Samsung Skomer.
|
||||
|
||||
Fixes: 899f24ed8d3a ("drm/panel: Add driver for Novatek NT35510-based panels")
|
||||
Cc: Stephan Gerhold <stephan@gerhold.net>
|
||||
Reported-by: newbyte@disroot.org
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/gpu/drm/panel/panel-novatek-nt35510.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
|
||||
index ef70140c5b09..873cbd38e6d3 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
|
||||
@@ -706,9 +706,7 @@ static int nt35510_power_on(struct nt35510 *nt)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- ret = nt35510_read_id(nt);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
+ nt35510_read_id(nt);
|
||||
|
||||
/* Set up stuff in manufacturer control, page 1 */
|
||||
ret = nt35510_send_long(nt, dsi, MCS_CMD_MAUCCTR,
|
||||
--
|
||||
2.31.1
|
44
main/linux-postmarketos-stericsson/regulators.patch
Normal file
44
main/linux-postmarketos-stericsson/regulators.patch
Normal file
|
@ -0,0 +1,44 @@
|
|||
From 08eb3117ef1d2eb9f634920bc671125284d80e7b Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Fri, 4 Jun 2021 00:00:04 +0200
|
||||
Subject: ARM: dts: ux500: Skomer regulator fixes
|
||||
|
||||
AUX2 has slightly wrong voltage and AUX5 doesn't need to be
|
||||
always on.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
arch/arm/boot/dts/ste-ux500-samsung-skomer.dts | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts b/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts
|
||||
index feee836c6c56c..368abbd9b10b7 100644
|
||||
--- a/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts
|
||||
+++ b/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts
|
||||
@@ -307,10 +307,10 @@
|
||||
};
|
||||
|
||||
ab8500_ldo_aux2 {
|
||||
- /* Supplies the Cypress TMA140 touchscreen only with 3.3V */
|
||||
+ /* Supplies the Cypress TMA140 touchscreen only with 3.0V */
|
||||
regulator-name = "AUX2";
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
};
|
||||
|
||||
ab8500_ldo_aux3 {
|
||||
@@ -329,9 +329,9 @@
|
||||
|
||||
ab8500_ldo_aux5 {
|
||||
regulator-name = "AUX5";
|
||||
+ /* Intended for 1V8 for touchscreen but actually left unused */
|
||||
regulator-min-microvolt = <1050000>;
|
||||
regulator-max-microvolt = <2790000>;
|
||||
- regulator-always-on;
|
||||
};
|
||||
|
||||
ab8500_ldo_aux6 {
|
||||
--
|
||||
cgit 1.2.3-1.el7
|
Loading…
Reference in a new issue