From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-tv/v4l-dvb-saa716x/files/, media-tv/v4l-dvb-saa716x/
Date: Wed, 4 Apr 2018 23:34:22 +0000 (UTC) [thread overview]
Message-ID: <1522884451.eac1e428a7e1fef6995e14aba81133fd10f90031.asturm@gentoo> (raw)
commit: eac1e428a7e1fef6995e14aba81133fd10f90031
Author: Martin Dummer <martin.dummer <AT> gmx <DOT> net>
AuthorDate: Fri Mar 30 12:51:50 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Apr 4 23:27:31 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eac1e428
media-tv/v4l-dvb-saa716x: fix compile with kernel 4.15
import fixes from https://github.com/s-moch/linux-saa716x
https://github.com/s-moch/linux-saa716x/commit/0b2276ee2e6383ad577fce5c694f8c4062d5334b.patch
https://github.com/s-moch/linux-saa716x/commit/1002d79c4ba60de0dbeacba0f289119556d7450d.patch
Closes: https://bugs.gentoo.org/631854
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Closes: https://github.com/gentoo/gentoo/pull/7802
.../v4l-dvb-saa716x-4.15-fix-autorepeat.patch | 107 +++++++++++++++++++++
.../files/v4l-dvb-saa716x-4.15-fix-timers.patch | 41 ++++++++
.../v4l-dvb-saa716x-0.0.1_p20170225-r1.ebuild | 2 +
3 files changed, 150 insertions(+)
diff --git a/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-4.15-fix-autorepeat.patch b/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-4.15-fix-autorepeat.patch
new file mode 100644
index 00000000000..e3a3a737663
--- /dev/null
+++ b/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-4.15-fix-autorepeat.patch
@@ -0,0 +1,107 @@
+# Source: https://github.com/s-moch/linux-saa716x/commit/0b2276ee2e6383ad577fce5c694f8c4062d5334b.patch
+
+From 0b2276ee2e6383ad577fce5c694f8c4062d5334b Mon Sep 17 00:00:00 2001
+From: Soeren Moch <smoch@web.de>
+Date: Sat, 2 Dec 2017 20:51:10 +0100
+Subject: [PATCH] saa716x_ff: Remove autorepeat handling
+
+Let the input layer handle autorepeat for the IR remote.
+So no repeat_key timer is required anymore.
+
+Signed-off-by: Soeren Moch <smoch@web.de>
+---
+ drivers/media/common/saa716x/saa716x_ff_ir.c | 45 ++++++++--------------------
+ 1 file changed, 12 insertions(+), 33 deletions(-)
+
+diff --git a/drivers/media/common/saa716x/saa716x_ff_ir.c b/drivers/media/common/saa716x/saa716x_ff_ir.c
+index 35624789aa862..ad6f38611026c 100644
+--- a/linux/drivers/media/common/saa716x/saa716x_ff_ir.c
++++ b/linux/drivers/media/common/saa716x/saa716x_ff_ir.c
+@@ -40,7 +40,7 @@ struct infrared {
+ u8 protocol;
+ u16 last_key;
+ u16 last_toggle;
+- bool delay_timer_finished;
++ bool key_pressed;
+ };
+
+ #define IR_RC5 0
+@@ -52,11 +52,12 @@ static void ir_emit_keyup(unsigned long parm)
+ {
+ struct infrared *ir = (struct infrared *) parm;
+
+- if (!ir || !test_bit(ir->last_key, ir->input_dev->key))
++ if (!ir || !ir->key_pressed)
+ return;
+
+ input_report_key(ir->input_dev, ir->last_key, 0);
+ input_sync(ir->input_dev);
++ ir->key_pressed = false;
+ }
+
+
+@@ -114,28 +115,18 @@ static void ir_emit_key(unsigned long parm)
+ return;
+ }
+
+- if (timer_pending(&ir->keyup_timer)) {
+- del_timer(&ir->keyup_timer);
+- if (ir->last_key != keycode || toggle != ir->last_toggle) {
+- ir->delay_timer_finished = false;
+- input_event(ir->input_dev, EV_KEY, ir->last_key, 0);
+- input_event(ir->input_dev, EV_KEY, keycode, 1);
+- input_sync(ir->input_dev);
+- } else if (ir->delay_timer_finished) {
+- input_event(ir->input_dev, EV_KEY, keycode, 2);
+- input_sync(ir->input_dev);
+- }
+- } else {
+- ir->delay_timer_finished = false;
+- input_event(ir->input_dev, EV_KEY, keycode, 1);
+- input_sync(ir->input_dev);
+- }
++ if (ir->key_pressed &&
++ (ir->last_key != keycode || toggle != ir->last_toggle))
++ input_event(ir->input_dev, EV_KEY, ir->last_key, 0);
+
++ input_event(ir->input_dev, EV_KEY, keycode, 1);
++ input_sync(ir->input_dev);
++
++ ir->key_pressed = true;
+ ir->last_key = keycode;
+ ir->last_toggle = toggle;
+
+- ir->keyup_timer.expires = jiffies + UP_TIMEOUT;
+- add_timer(&ir->keyup_timer);
++ mod_timer(&ir->keyup_timer, jiffies + UP_TIMEOUT);
+
+ }
+
+@@ -166,16 +157,6 @@ static void ir_register_keys(struct infrared *ir)
+ ir->input_dev->keycodemax = ARRAY_SIZE(ir->key_map);
+ }
+
+-
+-/* called by the input driver after rep[REP_DELAY] ms */
+-static void ir_repeat_key(unsigned long parm)
+-{
+- struct infrared *ir = (struct infrared *) parm;
+-
+- ir->delay_timer_finished = true;
+-}
+-
+-
+ /* interrupt handler */
+ void saa716x_ir_handler(struct saa716x_dev *saa716x, u32 ir_cmd)
+ {
+@@ -236,9 +217,7 @@ int saa716x_ir_init(struct saa716x_dev *saa716x)
+ ir->key_map[i] = i+1;
+ ir_register_keys(ir);
+
+- /* override repeat timer */
+- input_dev->timer.function = ir_repeat_key;
+- input_dev->timer.data = (unsigned long) ir;
++ input_enable_softrepeat(input_dev, 800, 200);
+
+ tasklet_init(&ir->tasklet, ir_emit_key, (unsigned long) saa716x);
+ saa716x->ir_priv = ir;
diff --git a/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-4.15-fix-timers.patch b/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-4.15-fix-timers.patch
new file mode 100644
index 00000000000..841c32e0515
--- /dev/null
+++ b/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-4.15-fix-timers.patch
@@ -0,0 +1,41 @@
+# Source: https://github.com/s-moch/linux-saa716x/commit/1002d79c4ba60de0dbeacba0f289119556d7450d.patch
+
+From 1002d79c4ba60de0dbeacba0f289119556d7450d Mon Sep 17 00:00:00 2001
+From: Soeren Moch <smoch@web.de>
+Date: Sat, 2 Dec 2017 21:23:34 +0100
+Subject: [PATCH] saa716x_ff: Convert to new timer API
+
+Convert to new timer API in linux-4.15.
+
+Signed-off-by: Soeren Moch <smoch@web.de>
+---
+ drivers/media/common/saa716x/saa716x_ff_ir.c | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/media/common/saa716x/saa716x_ff_ir.c b/drivers/media/common/saa716x/saa716x_ff_ir.c
+index ad6f38611026c..7894adff4d4f6 100644
+--- a/linux/drivers/media/common/saa716x/saa716x_ff_ir.c
++++ b/linux/drivers/media/common/saa716x/saa716x_ff_ir.c
+@@ -48,9 +48,9 @@ struct infrared {
+
+
+ /* key-up timer */
+-static void ir_emit_keyup(unsigned long parm)
++static void ir_emit_keyup(struct timer_list *t)
+ {
+- struct infrared *ir = (struct infrared *) parm;
++ struct infrared *ir = from_timer(ir, t, keyup_timer);
+
+ if (!ir || !ir->key_pressed)
+ return;
+@@ -184,9 +184,7 @@ int saa716x_ir_init(struct saa716x_dev *saa716x)
+ if (!ir)
+ return -ENOMEM;
+
+- init_timer(&ir->keyup_timer);
+- ir->keyup_timer.function = ir_emit_keyup;
+- ir->keyup_timer.data = (unsigned long) ir;
++ timer_setup(&ir->keyup_timer, ir_emit_keyup, 0);
+
+ input_dev = input_allocate_device();
+ if (!input_dev)
diff --git a/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20170225-r1.ebuild b/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20170225-r1.ebuild
index 665d4501782..9e77e9d3986 100644
--- a/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20170225-r1.ebuild
+++ b/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20170225-r1.ebuild
@@ -45,6 +45,8 @@ src_prepare() {
kernel_is ge 4 9 0 && eapply "${FILESDIR}/v4l-dvb-saa716x-4.9-fix-warnings.patch"
kernel_is ge 4 10 0 && eapply "${FILESDIR}/v4l-dvb-saa716x-4.10-fix-compile.patch"
kernel_is ge 4 14 0 && eapply "${FILESDIR}/v4l-dvb-saa716x-4.14.0-fix-compile.patch"
+ kernel_is ge 4 15 0 && eapply "${FILESDIR}/v4l-dvb-saa716x-4.15-fix-autorepeat.patch"
+ kernel_is ge 4 15 0 && eapply "${FILESDIR}/v4l-dvb-saa716x-4.15-fix-timers.patch"
}
src_compile() {
next reply other threads:[~2018-04-04 23:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-04 23:34 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-02-15 13:13 [gentoo-commits] repo/gentoo:master commit in: media-tv/v4l-dvb-saa716x/files/, media-tv/v4l-dvb-saa716x/ Mike Pagano
2021-02-17 11:36 Joonas Niilola
2020-11-10 12:22 Joonas Niilola
2018-04-04 23:34 Andreas Sturmlechner
2018-03-29 19:20 Michał Górny
2017-07-12 5:47 Michał Górny
2017-07-12 5:47 Michał Górny
2016-05-05 21:09 Joerg Bornkessel
2015-10-10 19:21 Joerg Bornkessel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1522884451.eac1e428a7e1fef6995e14aba81133fd10f90031.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox