mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 21:56:42 +00:00
Generic: linux: Remove patches included in 5.10.13
This commit is contained in:
parent
c1062e8568
commit
771276758d
@ -1,74 +0,0 @@
|
|||||||
From 1f363deec843ed4e75aa11e466f91e9224376c04 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Matthias Reichl <hias@horus.com>
|
|
||||||
Date: Tue, 5 Jan 2021 09:57:29 +0100
|
|
||||||
Subject: [PATCH] media: rc: fix timeout handling after switch to microsecond
|
|
||||||
durations
|
|
||||||
|
|
||||||
Commit 528222d853f92 ("media: rc: harmonize infrared durations to
|
|
||||||
microseconds") missed to switch some timeout calculations from
|
|
||||||
nanoseconds to microseconds. This resulted in spurious key_up+key_down
|
|
||||||
events at the last scancode if the rc device uses a long timeout
|
|
||||||
(eg 100ms on nuvoton-cir) as the device timeout wasn't properly
|
|
||||||
accounted for in the keyup timeout calculation.
|
|
||||||
|
|
||||||
Fix this by applying the proper conversion functions.
|
|
||||||
|
|
||||||
Fixes: 528222d853f92 ("media: rc: harmonize infrared durations to microseconds")
|
|
||||||
Signed-off-by: Matthias Reichl <hias@horus.com>
|
|
||||||
---
|
|
||||||
drivers/media/rc/ir-mce_kbd-decoder.c | 2 +-
|
|
||||||
drivers/media/rc/rc-main.c | 4 ++--
|
|
||||||
drivers/media/rc/serial_ir.c | 2 +-
|
|
||||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c
|
|
||||||
index be8f2756a444..1524dc0fc566 100644
|
|
||||||
--- a/drivers/media/rc/ir-mce_kbd-decoder.c
|
|
||||||
+++ b/drivers/media/rc/ir-mce_kbd-decoder.c
|
|
||||||
@@ -320,7 +320,7 @@ static int ir_mce_kbd_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
|
||||||
data->body);
|
|
||||||
spin_lock(&data->keylock);
|
|
||||||
if (scancode) {
|
|
||||||
- delay = nsecs_to_jiffies(dev->timeout) +
|
|
||||||
+ delay = usecs_to_jiffies(dev->timeout) +
|
|
||||||
msecs_to_jiffies(100);
|
|
||||||
mod_timer(&data->rx_timeout, jiffies + delay);
|
|
||||||
} else {
|
|
||||||
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
|
|
||||||
index 29d4d01896ff..1fd62c1dac76 100644
|
|
||||||
--- a/drivers/media/rc/rc-main.c
|
|
||||||
+++ b/drivers/media/rc/rc-main.c
|
|
||||||
@@ -737,7 +737,7 @@ static unsigned int repeat_period(int protocol)
|
|
||||||
void rc_repeat(struct rc_dev *dev)
|
|
||||||
{
|
|
||||||
unsigned long flags;
|
|
||||||
- unsigned int timeout = nsecs_to_jiffies(dev->timeout) +
|
|
||||||
+ unsigned int timeout = usecs_to_jiffies(dev->timeout) +
|
|
||||||
msecs_to_jiffies(repeat_period(dev->last_protocol));
|
|
||||||
struct lirc_scancode sc = {
|
|
||||||
.scancode = dev->last_scancode, .rc_proto = dev->last_protocol,
|
|
||||||
@@ -855,7 +855,7 @@ void rc_keydown(struct rc_dev *dev, enum rc_proto protocol, u64 scancode,
|
|
||||||
ir_do_keydown(dev, protocol, scancode, keycode, toggle);
|
|
||||||
|
|
||||||
if (dev->keypressed) {
|
|
||||||
- dev->keyup_jiffies = jiffies + nsecs_to_jiffies(dev->timeout) +
|
|
||||||
+ dev->keyup_jiffies = jiffies + usecs_to_jiffies(dev->timeout) +
|
|
||||||
msecs_to_jiffies(repeat_period(protocol));
|
|
||||||
mod_timer(&dev->timer_keyup, dev->keyup_jiffies);
|
|
||||||
}
|
|
||||||
diff --git a/drivers/media/rc/serial_ir.c b/drivers/media/rc/serial_ir.c
|
|
||||||
index 8cc28c92d05d..96ae0294ac10 100644
|
|
||||||
--- a/drivers/media/rc/serial_ir.c
|
|
||||||
+++ b/drivers/media/rc/serial_ir.c
|
|
||||||
@@ -385,7 +385,7 @@ static irqreturn_t serial_ir_irq_handler(int i, void *blah)
|
|
||||||
} while (!(sinp(UART_IIR) & UART_IIR_NO_INT)); /* still pending ? */
|
|
||||||
|
|
||||||
mod_timer(&serial_ir.timeout_timer,
|
|
||||||
- jiffies + nsecs_to_jiffies(serial_ir.rcdev->timeout));
|
|
||||||
+ jiffies + usecs_to_jiffies(serial_ir.rcdev->timeout));
|
|
||||||
|
|
||||||
ir_raw_event_handle(serial_ir.rcdev);
|
|
||||||
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From a42febb1ed2fe7f21833afaa495a7c7e04ba8f80 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Matthias Reichl <hias@horus.com>
|
|
||||||
Date: Sat, 9 Jan 2021 11:59:18 +0100
|
|
||||||
Subject: [PATCH] media: rc: ite-cir: fix min_timeout calculation
|
|
||||||
|
|
||||||
Commit 528222d853f92 ("media: rc: harmonize infrared durations to
|
|
||||||
microseconds") missed to switch the min_timeout calculation from ns
|
|
||||||
to us. This resulted in a minimum timeout of 1.2 seconds instead of 1.2ms,
|
|
||||||
leading to large delays and long key repeats.
|
|
||||||
|
|
||||||
Fix this by applying proper ns->us conversion.
|
|
||||||
|
|
||||||
Fixes: 528222d853f92 ("media: rc: harmonize infrared durations to microseconds")
|
|
||||||
Signed-off-by: Matthias Reichl <hias@horus.com>
|
|
||||||
---
|
|
||||||
drivers/media/rc/ite-cir.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
|
|
||||||
index a905113fef6e..0c6229592e13 100644
|
|
||||||
--- a/drivers/media/rc/ite-cir.c
|
|
||||||
+++ b/drivers/media/rc/ite-cir.c
|
|
||||||
@@ -1551,7 +1551,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
|
|
||||||
rdev->s_rx_carrier_range = ite_set_rx_carrier_range;
|
|
||||||
/* FIFO threshold is 17 bytes, so 17 * 8 samples minimum */
|
|
||||||
rdev->min_timeout = 17 * 8 * ITE_BAUDRATE_DIVISOR *
|
|
||||||
- itdev->params.sample_period;
|
|
||||||
+ itdev->params.sample_period / 1000;
|
|
||||||
rdev->timeout = IR_DEFAULT_TIMEOUT;
|
|
||||||
rdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT;
|
|
||||||
rdev->rx_resolution = ITE_BAUDRATE_DIVISOR *
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user