mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #2798 from MilhouseVH/linux4176
linux (Generic): update to linux-4.17.6
This commit is contained in:
commit
71c2fa5fd7
@ -17,12 +17,12 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="intel-ucode"
|
||||
PKG_VERSION="20180425"
|
||||
PKG_SHA256="f0d2492f4561e2559f6c9471b231cb8262d45762c0e7cccf787be5c189b4e2d6"
|
||||
PKG_VERSION="20180703"
|
||||
PKG_SHA256="4a1a346fdf48e1626d4c9d0d47bbbc6a4052f56e359c85a3dd2d10fd555e5938"
|
||||
PKG_ARCH="x86_64"
|
||||
PKG_LICENSE="other"
|
||||
PKG_SITE="https://downloadcenter.intel.com/search?keyword=linux+microcode"
|
||||
PKG_URL="https://downloadmirror.intel.com/27776/eng/microcode-${PKG_VERSION}.tgz"
|
||||
PKG_URL="https://downloadmirror.intel.com/27945/eng/microcode-${PKG_VERSION}.tgz"
|
||||
PKG_DEPENDS_HOST="toolchain"
|
||||
PKG_DEPENDS_TARGET="toolchain intel-ucode:host"
|
||||
PKG_SECTION="linux-firmware"
|
||||
|
@ -61,8 +61,8 @@ case "$LINUX" in
|
||||
PKG_URL="https://github.com/raspberrypi/linux/archive/$PKG_VERSION.tar.gz"
|
||||
;;
|
||||
*)
|
||||
PKG_VERSION="4.17.2"
|
||||
PKG_SHA256="4cebcd6f4ddc49e68543a6d920582d9e0eca431be89f9c1b85fd4ecf1dd87b9c"
|
||||
PKG_VERSION="4.17.6"
|
||||
PKG_SHA256="259dd689d19888936005d8dd75946902842b7e5734dc343061f951c9d2996395"
|
||||
PKG_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_PATCH_DIRS="default"
|
||||
;;
|
||||
|
@ -0,0 +1,265 @@
|
||||
From 77a8e4fee1ad8cf7ec4a8899f76dfb9303b422f8 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Wed, 4 Jul 2018 08:45:48 +0100
|
||||
Subject: [PATCH] drm/i915: Interactive RPS mode
|
||||
|
||||
RPS provides a feedback loop where we use the load during the previous
|
||||
evaluation interval to decide whether to up or down clock the GPU
|
||||
frequency. Our responsiveness is split into 3 regimes, a high and low
|
||||
plateau with the intent to keep the gpu clocked high to cover occasional
|
||||
stalls under high load, and low despite occasional glitches under steady
|
||||
low load, and inbetween. However, we run into situations like kodi where
|
||||
we want to stay at low power (video decoding is done efficiently
|
||||
inside the fixed function HW and doesn't need high clocks even for high
|
||||
bitrate streams), but just occasionally the pipeline is more complex
|
||||
than a video decode and we need a smidgen of extra GPU power to present
|
||||
on time. In the high power regime, we sample at sub frame intervals with
|
||||
a bias to upclocking, and conversely at low power we sample over a few
|
||||
frames worth to provide what we consider to be the right levels of
|
||||
responsiveness respectively. At low power, we more or less expect to be
|
||||
kicked out to high power at the start of a busy sequence by waitboosting.
|
||||
|
||||
Prior to commit e9af4ea2b9e7 ("drm/i915: Avoid waitboosting on the active
|
||||
request") whenever we missed the frame or stalled, we would immediate go
|
||||
full throttle and upclock the GPU to max. But in commit e9af4ea2b9e7, we
|
||||
relaxed the waitboosting to only apply if the pipeline was deep to avoid
|
||||
over-committing resources for a near miss. Sadly though, a near miss is
|
||||
still a miss, and perceptible as jitter in the frame delivery.
|
||||
|
||||
To try and prevent the near miss before having to resort to boosting
|
||||
after the fact, we use the pageflip queue as an indication that we are
|
||||
in an "interactive" regime and so should sample the load more frequently
|
||||
to provide power before the frame misses it vblank. This will make us
|
||||
more favorable to providing a small power increase (one or two bins) as
|
||||
required rather than going all the way to maximum and then having to
|
||||
work back down again. (We still keep the waitboosting mechanism around
|
||||
just in case a dramatic change in system load requires urgent uplocking,
|
||||
faster than we can provide in a few evaluation intervals.)
|
||||
|
||||
References: https://bugs.freedesktop.org/show_bug.cgi?id=107111
|
||||
References: e9af4ea2b9e7 ("drm/i915: Avoid waitboosting on the active request")
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
||||
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
||||
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_debugfs.c | 1 +
|
||||
drivers/gpu/drm/i915/i915_drv.h | 6 +-
|
||||
drivers/gpu/drm/i915/intel_display.c | 20 +++++++
|
||||
drivers/gpu/drm/i915/intel_drv.h | 2 +
|
||||
drivers/gpu/drm/i915/intel_pm.c | 87 ++++++++++++++++++----------
|
||||
5 files changed, 86 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
|
||||
index 544e5e7f011f..7d974cad1cdf 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_debugfs.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
|
||||
@@ -2218,6 +2218,7 @@ static int i915_rps_boost_info(struct seq_file *m, void *data)
|
||||
seq_printf(m, "CPU waiting? %d\n", count_irq_waiters(dev_priv));
|
||||
seq_printf(m, "Boosts outstanding? %d\n",
|
||||
atomic_read(&rps->num_waiters));
|
||||
+ seq_printf(m, "Power overrides? %d\n", READ_ONCE(rps->power_override));
|
||||
seq_printf(m, "Frequency requested %d\n",
|
||||
intel_gpu_freq(dev_priv, rps->cur_freq));
|
||||
seq_printf(m, " min hard:%d, soft:%d; max soft:%d, hard:%d\n",
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
||||
index 09ab12458244..3f9ae1095b98 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||
@@ -783,7 +783,9 @@ struct intel_rps {
|
||||
u8 down_threshold; /* Current %busy required to downclock */
|
||||
|
||||
int last_adj;
|
||||
- enum { LOW_POWER, BETWEEN, HIGH_POWER } power;
|
||||
+ enum { LOW_POWER, BETWEEN, HIGH_POWER, AUTO_POWER } power;
|
||||
+ unsigned int power_override;
|
||||
+ struct mutex power_lock;
|
||||
|
||||
bool enabled;
|
||||
atomic_t num_waiters;
|
||||
@@ -3429,6 +3431,8 @@ extern void i915_redisable_vga_power_on(struct drm_i915_private *dev_priv);
|
||||
extern bool ironlake_set_drps(struct drm_i915_private *dev_priv, u8 val);
|
||||
extern void intel_init_pch_refclk(struct drm_i915_private *dev_priv);
|
||||
extern int intel_set_rps(struct drm_i915_private *dev_priv, u8 val);
|
||||
+extern void intel_rps_set_power(struct drm_i915_private *dev_priv,
|
||||
+ int new_power);
|
||||
extern bool intel_set_memory_cxsr(struct drm_i915_private *dev_priv,
|
||||
bool enable);
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index 8f3199b06d1f..acedd9b2d54a 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -13104,6 +13104,19 @@ intel_prepare_plane_fb(struct drm_plane *plane,
|
||||
add_rps_boost_after_vblank(new_state->crtc, new_state->fence);
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * We declare pageflips to be interactive and so merit a small bias
|
||||
+ * towards upclocking to deliver the frame on time. By only changing
|
||||
+ * the RPS thresholds to sample more regularly and aim for higher
|
||||
+ * clocks we can hopefully deliver low power workloads (like kodi)
|
||||
+ * that are not quite steady state without resorting to forcing
|
||||
+ * maximum clocks following a vblank miss (see do_rps_boost()).
|
||||
+ */
|
||||
+ if (!intel_state->rps_override) {
|
||||
+ intel_rps_set_power(dev_priv, HIGH_POWER);
|
||||
+ intel_state->rps_override = true;
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -13120,8 +13133,15 @@ void
|
||||
intel_cleanup_plane_fb(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
{
|
||||
+ struct intel_atomic_state *intel_state =
|
||||
+ to_intel_atomic_state(old_state->state);
|
||||
struct drm_i915_private *dev_priv = to_i915(plane->dev);
|
||||
|
||||
+ if (intel_state->rps_override) {
|
||||
+ intel_rps_set_power(dev_priv, AUTO_POWER);
|
||||
+ intel_state->rps_override = false;
|
||||
+ }
|
||||
+
|
||||
/* Should only be called after a successful intel_prepare_plane_fb()! */
|
||||
mutex_lock(&dev_priv->drm.struct_mutex);
|
||||
intel_plane_unpin_fb(to_intel_plane_state(old_state));
|
||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||
index 61e715ddd0d5..86685c43e1d2 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||
@@ -482,6 +482,8 @@ struct intel_atomic_state {
|
||||
*/
|
||||
bool skip_intermediate_wm;
|
||||
|
||||
+ bool rps_override;
|
||||
+
|
||||
/* Gen9+ only */
|
||||
struct skl_ddb_values wm_results;
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index 53aaaa3e6886..0245a90d0fe5 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -6264,41 +6264,14 @@ static u32 intel_rps_limits(struct drm_i915_private *dev_priv, u8 val)
|
||||
return limits;
|
||||
}
|
||||
|
||||
-static void gen6_set_rps_thresholds(struct drm_i915_private *dev_priv, u8 val)
|
||||
+static void rps_set_power(struct drm_i915_private *dev_priv, int new_power)
|
||||
{
|
||||
struct intel_rps *rps = &dev_priv->gt_pm.rps;
|
||||
- int new_power;
|
||||
u32 threshold_up = 0, threshold_down = 0; /* in % */
|
||||
u32 ei_up = 0, ei_down = 0;
|
||||
|
||||
- new_power = rps->power;
|
||||
- switch (rps->power) {
|
||||
- case LOW_POWER:
|
||||
- if (val > rps->efficient_freq + 1 &&
|
||||
- val > rps->cur_freq)
|
||||
- new_power = BETWEEN;
|
||||
- break;
|
||||
-
|
||||
- case BETWEEN:
|
||||
- if (val <= rps->efficient_freq &&
|
||||
- val < rps->cur_freq)
|
||||
- new_power = LOW_POWER;
|
||||
- else if (val >= rps->rp0_freq &&
|
||||
- val > rps->cur_freq)
|
||||
- new_power = HIGH_POWER;
|
||||
- break;
|
||||
+ lockdep_assert_held(&rps->power_lock);
|
||||
|
||||
- case HIGH_POWER:
|
||||
- if (val < (rps->rp1_freq + rps->rp0_freq) >> 1 &&
|
||||
- val < rps->cur_freq)
|
||||
- new_power = BETWEEN;
|
||||
- break;
|
||||
- }
|
||||
- /* Max/min bins are special */
|
||||
- if (val <= rps->min_freq_softlimit)
|
||||
- new_power = LOW_POWER;
|
||||
- if (val >= rps->max_freq_softlimit)
|
||||
- new_power = HIGH_POWER;
|
||||
if (new_power == rps->power)
|
||||
return;
|
||||
|
||||
@@ -6365,9 +6338,64 @@ static void gen6_set_rps_thresholds(struct drm_i915_private *dev_priv, u8 val)
|
||||
rps->power = new_power;
|
||||
rps->up_threshold = threshold_up;
|
||||
rps->down_threshold = threshold_down;
|
||||
+}
|
||||
+
|
||||
+static void gen6_set_rps_thresholds(struct drm_i915_private *dev_priv, u8 val)
|
||||
+{
|
||||
+ struct intel_rps *rps = &dev_priv->gt_pm.rps;
|
||||
+ int new_power;
|
||||
+
|
||||
+ new_power = rps->power;
|
||||
+ switch (rps->power) {
|
||||
+ case AUTO_POWER:
|
||||
+ case LOW_POWER:
|
||||
+ if (val > rps->efficient_freq + 1 &&
|
||||
+ val > rps->cur_freq)
|
||||
+ new_power = BETWEEN;
|
||||
+ break;
|
||||
+
|
||||
+ case BETWEEN:
|
||||
+ if (val <= rps->efficient_freq &&
|
||||
+ val < rps->cur_freq)
|
||||
+ new_power = LOW_POWER;
|
||||
+ else if (val >= rps->rp0_freq &&
|
||||
+ val > rps->cur_freq)
|
||||
+ new_power = HIGH_POWER;
|
||||
+ break;
|
||||
+
|
||||
+ case HIGH_POWER:
|
||||
+ if (val < (rps->rp1_freq + rps->rp0_freq) >> 1 &&
|
||||
+ val < rps->cur_freq)
|
||||
+ new_power = BETWEEN;
|
||||
+ break;
|
||||
+ }
|
||||
+ /* Max/min bins are special */
|
||||
+ if (val <= rps->min_freq_softlimit)
|
||||
+ new_power = LOW_POWER;
|
||||
+ if (val >= rps->max_freq_softlimit)
|
||||
+ new_power = HIGH_POWER;
|
||||
+
|
||||
+ mutex_lock(&rps->power_lock);
|
||||
+ if (!rps->power_override)
|
||||
+ rps_set_power(dev_priv, new_power);
|
||||
+ mutex_unlock(&rps->power_lock);
|
||||
rps->last_adj = 0;
|
||||
}
|
||||
|
||||
+void intel_rps_set_power(struct drm_i915_private *dev_priv, int power)
|
||||
+{
|
||||
+ struct intel_rps *rps = &dev_priv->gt_pm.rps;
|
||||
+
|
||||
+ mutex_lock(&rps->power_lock);
|
||||
+ if (power != AUTO_POWER) {
|
||||
+ rps->power_override++;
|
||||
+ rps_set_power(dev_priv, power);
|
||||
+ } else {
|
||||
+ rps->power_override--;
|
||||
+ }
|
||||
+ mutex_unlock(&rps->power_lock);
|
||||
+}
|
||||
+
|
||||
static u32 gen6_rps_pm_mask(struct drm_i915_private *dev_priv, u8 val)
|
||||
{
|
||||
struct intel_rps *rps = &dev_priv->gt_pm.rps;
|
||||
@@ -9604,6 +9632,7 @@ int intel_freq_opcode(struct drm_i915_private *dev_priv, int val)
|
||||
void intel_pm_setup(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
mutex_init(&dev_priv->pcu_lock);
|
||||
+ mutex_init(&dev_priv->gt_pm.rps.power_lock);
|
||||
|
||||
atomic_set(&dev_priv->gt_pm.rps.num_waiters, 0);
|
||||
|
||||
--
|
||||
2.18.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
From df4fa9f4fa87409253bdced78e2cc2b3bc76b253 Mon Sep 17 00:00:00 2001
|
||||
From f3ca010f8a1cced4049fb1b6cf522bac4e778d8c Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Fri, 23 Mar 2018 16:47:37 -0400
|
||||
Subject: [PATCH 01/14] media: rc: set timeout to smallest value required by
|
||||
Subject: [PATCH 01/13] media: rc: set timeout to smallest value required by
|
||||
enabled protocols
|
||||
|
||||
The longer the IR timeout, the longer the rc device waits until delivering
|
||||
@ -30,7 +30,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
13 files changed, 47 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/rc/ir-imon-decoder.c b/drivers/media/rc/ir-imon-decoder.c
|
||||
index a1ff06a26542..52ea3b2fda74 100644
|
||||
index a1ff06a..52ea3b2 100644
|
||||
--- a/drivers/media/rc/ir-imon-decoder.c
|
||||
+++ b/drivers/media/rc/ir-imon-decoder.c
|
||||
@@ -170,6 +170,7 @@ static struct ir_raw_handler imon_handler = {
|
||||
@ -42,7 +42,7 @@ index a1ff06a26542..52ea3b2fda74 100644
|
||||
|
||||
static int __init ir_imon_decode_init(void)
|
||||
diff --git a/drivers/media/rc/ir-jvc-decoder.c b/drivers/media/rc/ir-jvc-decoder.c
|
||||
index 8cb68ae43282..5706cfe60027 100644
|
||||
index 8cb68ae..5706cfe 100644
|
||||
--- a/drivers/media/rc/ir-jvc-decoder.c
|
||||
+++ b/drivers/media/rc/ir-jvc-decoder.c
|
||||
@@ -213,6 +213,7 @@ static struct ir_raw_handler jvc_handler = {
|
||||
@ -54,10 +54,10 @@ index 8cb68ae43282..5706cfe60027 100644
|
||||
|
||||
static int __init ir_jvc_decode_init(void)
|
||||
diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
index c110984ca671..05f2a36769c0 100644
|
||||
index 5478fe0..fa5ce51 100644
|
||||
--- a/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
+++ b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
@@ -475,6 +475,7 @@ static struct ir_raw_handler mce_kbd_handler = {
|
||||
@@ -477,6 +477,7 @@ static struct ir_raw_handler mce_kbd_handler = {
|
||||
.raw_register = ir_mce_kbd_register,
|
||||
.raw_unregister = ir_mce_kbd_unregister,
|
||||
.carrier = 36000,
|
||||
@ -66,7 +66,7 @@ index c110984ca671..05f2a36769c0 100644
|
||||
|
||||
static int __init ir_mce_kbd_decode_init(void)
|
||||
diff --git a/drivers/media/rc/ir-nec-decoder.c b/drivers/media/rc/ir-nec-decoder.c
|
||||
index 21647b809e6f..6a8973ae3684 100644
|
||||
index 21647b8..6a8973a 100644
|
||||
--- a/drivers/media/rc/ir-nec-decoder.c
|
||||
+++ b/drivers/media/rc/ir-nec-decoder.c
|
||||
@@ -253,6 +253,7 @@ static struct ir_raw_handler nec_handler = {
|
||||
@ -78,7 +78,7 @@ index 21647b809e6f..6a8973ae3684 100644
|
||||
|
||||
static int __init ir_nec_decode_init(void)
|
||||
diff --git a/drivers/media/rc/ir-rc5-decoder.c b/drivers/media/rc/ir-rc5-decoder.c
|
||||
index 74d3b859c3a2..cbfaadbee8fa 100644
|
||||
index 74d3b85..cbfaadb 100644
|
||||
--- a/drivers/media/rc/ir-rc5-decoder.c
|
||||
+++ b/drivers/media/rc/ir-rc5-decoder.c
|
||||
@@ -274,6 +274,7 @@ static struct ir_raw_handler rc5_handler = {
|
||||
@ -90,7 +90,7 @@ index 74d3b859c3a2..cbfaadbee8fa 100644
|
||||
|
||||
static int __init ir_rc5_decode_init(void)
|
||||
diff --git a/drivers/media/rc/ir-rc6-decoder.c b/drivers/media/rc/ir-rc6-decoder.c
|
||||
index 8314da32453f..66e07109f6fc 100644
|
||||
index 8314da3..66e0710 100644
|
||||
--- a/drivers/media/rc/ir-rc6-decoder.c
|
||||
+++ b/drivers/media/rc/ir-rc6-decoder.c
|
||||
@@ -394,6 +394,7 @@ static struct ir_raw_handler rc6_handler = {
|
||||
@ -102,7 +102,7 @@ index 8314da32453f..66e07109f6fc 100644
|
||||
|
||||
static int __init ir_rc6_decode_init(void)
|
||||
diff --git a/drivers/media/rc/ir-sanyo-decoder.c b/drivers/media/rc/ir-sanyo-decoder.c
|
||||
index 4efe6db5376a..dd6ee1e339d6 100644
|
||||
index 4efe6db..dd6ee1e 100644
|
||||
--- a/drivers/media/rc/ir-sanyo-decoder.c
|
||||
+++ b/drivers/media/rc/ir-sanyo-decoder.c
|
||||
@@ -210,6 +210,7 @@ static struct ir_raw_handler sanyo_handler = {
|
||||
@ -114,7 +114,7 @@ index 4efe6db5376a..dd6ee1e339d6 100644
|
||||
|
||||
static int __init ir_sanyo_decode_init(void)
|
||||
diff --git a/drivers/media/rc/ir-sharp-decoder.c b/drivers/media/rc/ir-sharp-decoder.c
|
||||
index 6a38c50566a4..f96e0c992eed 100644
|
||||
index 6a38c50..f96e0c9 100644
|
||||
--- a/drivers/media/rc/ir-sharp-decoder.c
|
||||
+++ b/drivers/media/rc/ir-sharp-decoder.c
|
||||
@@ -226,6 +226,7 @@ static struct ir_raw_handler sharp_handler = {
|
||||
@ -126,7 +126,7 @@ index 6a38c50566a4..f96e0c992eed 100644
|
||||
|
||||
static int __init ir_sharp_decode_init(void)
|
||||
diff --git a/drivers/media/rc/ir-sony-decoder.c b/drivers/media/rc/ir-sony-decoder.c
|
||||
index 6764ec9de646..5065c081238d 100644
|
||||
index 6764ec9..5065c08 100644
|
||||
--- a/drivers/media/rc/ir-sony-decoder.c
|
||||
+++ b/drivers/media/rc/ir-sony-decoder.c
|
||||
@@ -224,6 +224,7 @@ static struct ir_raw_handler sony_handler = {
|
||||
@ -138,7 +138,7 @@ index 6764ec9de646..5065c081238d 100644
|
||||
|
||||
static int __init ir_sony_decode_init(void)
|
||||
diff --git a/drivers/media/rc/ir-xmp-decoder.c b/drivers/media/rc/ir-xmp-decoder.c
|
||||
index 58b47af1a763..c965f51df1c1 100644
|
||||
index 58b47af..c965f51 100644
|
||||
--- a/drivers/media/rc/ir-xmp-decoder.c
|
||||
+++ b/drivers/media/rc/ir-xmp-decoder.c
|
||||
@@ -199,6 +199,7 @@ static int ir_xmp_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
@ -150,7 +150,7 @@ index 58b47af1a763..c965f51df1c1 100644
|
||||
|
||||
static int __init ir_xmp_decode_init(void)
|
||||
diff --git a/drivers/media/rc/rc-core-priv.h b/drivers/media/rc/rc-core-priv.h
|
||||
index e0e6a17460f6..f78551344eca 100644
|
||||
index e0e6a17..f785513 100644
|
||||
--- a/drivers/media/rc/rc-core-priv.h
|
||||
+++ b/drivers/media/rc/rc-core-priv.h
|
||||
@@ -37,6 +37,7 @@ struct ir_raw_handler {
|
||||
@ -162,7 +162,7 @@ index e0e6a17460f6..f78551344eca 100644
|
||||
/* These two should only be used by the mce kbd decoder */
|
||||
int (*raw_register)(struct rc_dev *dev);
|
||||
diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
|
||||
index 374f83105a23..22e44c8f16fd 100644
|
||||
index 374f831..22e44c8 100644
|
||||
--- a/drivers/media/rc/rc-ir-raw.c
|
||||
+++ b/drivers/media/rc/rc-ir-raw.c
|
||||
@@ -233,7 +233,36 @@ ir_raw_get_allowed_protocols(void)
|
||||
@ -204,7 +204,7 @@ index 374f83105a23..22e44c8f16fd 100644
|
||||
}
|
||||
|
||||
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
|
||||
index b67be33bd62f..6a720e9c7aa8 100644
|
||||
index cea7b2d..8cd7a26 100644
|
||||
--- a/drivers/media/rc/rc-main.c
|
||||
+++ b/drivers/media/rc/rc-main.c
|
||||
@@ -1241,6 +1241,9 @@ static ssize_t store_protocols(struct device *device,
|
||||
@ -248,13 +248,13 @@ index b67be33bd62f..6a720e9c7aa8 100644
|
||||
set_bit(EV_REP, dev->input_dev->evbit);
|
||||
set_bit(EV_MSC, dev->input_dev->evbit);
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From cfff3db62aa2d6bc9860f9785cdacdaa83c7f278 Mon Sep 17 00:00:00 2001
|
||||
From ef6ca369163f1b5d4a838bfbcd373dec8377f653 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Fri, 23 Mar 2018 16:59:52 -0400
|
||||
Subject: [PATCH 02/14] media: rc: add ioctl to get the current timeout
|
||||
Subject: [PATCH 02/13] media: rc: add ioctl to get the current timeout
|
||||
|
||||
Since the kernel now modifies the timeout, make it possible to retrieve
|
||||
the current value.
|
||||
@ -269,7 +269,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
4 files changed, 23 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Documentation/media/uapi/rc/lirc-func.rst b/Documentation/media/uapi/rc/lirc-func.rst
|
||||
index ddb4620de294..9656423a3f28 100644
|
||||
index ddb4620..9656423 100644
|
||||
--- a/Documentation/media/uapi/rc/lirc-func.rst
|
||||
+++ b/Documentation/media/uapi/rc/lirc-func.rst
|
||||
@@ -17,6 +17,7 @@ LIRC Function Reference
|
||||
@ -281,7 +281,7 @@ index ddb4620de294..9656423a3f28 100644
|
||||
lirc-set-rec-carrier
|
||||
lirc-set-rec-carrier-range
|
||||
diff --git a/Documentation/media/uapi/rc/lirc-set-rec-timeout.rst b/Documentation/media/uapi/rc/lirc-set-rec-timeout.rst
|
||||
index b3e16bbdbc90..a833a6a4c25a 100644
|
||||
index b3e16bb..a833a6a 100644
|
||||
--- a/Documentation/media/uapi/rc/lirc-set-rec-timeout.rst
|
||||
+++ b/Documentation/media/uapi/rc/lirc-set-rec-timeout.rst
|
||||
@@ -1,19 +1,23 @@
|
||||
@ -322,7 +322,7 @@ index b3e16bbdbc90..a833a6a4c25a 100644
|
||||
If supported by the hardware, setting it to 0 disables all hardware timeouts
|
||||
and data should be reported as soon as possible. If the exact value
|
||||
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
|
||||
index 24e9fbb80e81..17f40c8e939f 100644
|
||||
index 24e9fbb..17f40c8 100644
|
||||
--- a/drivers/media/rc/lirc_dev.c
|
||||
+++ b/drivers/media/rc/lirc_dev.c
|
||||
@@ -575,6 +575,13 @@ static long ir_lirc_ioctl(struct file *file, unsigned int cmd,
|
||||
@ -340,30 +340,30 @@ index 24e9fbb80e81..17f40c8e939f 100644
|
||||
if (!dev->timeout)
|
||||
ret = -ENOTTY;
|
||||
diff --git a/include/uapi/linux/lirc.h b/include/uapi/linux/lirc.h
|
||||
index f189931042a7..6b319581882f 100644
|
||||
index f189931..6b31958 100644
|
||||
--- a/include/uapi/linux/lirc.h
|
||||
+++ b/include/uapi/linux/lirc.h
|
||||
@@ -134,6 +134,12 @@
|
||||
@@ -133,6 +133,12 @@
|
||||
|
||||
#define LIRC_SET_WIDEBAND_RECEIVER _IOW('i', 0x00000023, __u32)
|
||||
|
||||
/*
|
||||
+/*
|
||||
+ * Return the recording timeout, which is either set by
|
||||
+ * the ioctl LIRC_SET_REC_TIMEOUT or by the kernel after setting the protocols.
|
||||
+ */
|
||||
+#define LIRC_GET_REC_TIMEOUT _IOR('i', 0x00000024, __u32)
|
||||
+
|
||||
+/*
|
||||
/*
|
||||
* struct lirc_scancode - decoded scancode with protocol for use with
|
||||
* LIRC_MODE_SCANCODE
|
||||
*
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From cb1cedbe3615b2ff39e63cb59943d1f22f2d40ac Mon Sep 17 00:00:00 2001
|
||||
From 840d6701d0e1650cfc69bc0af79b983c4674d8c0 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Sat, 24 Mar 2018 08:02:48 -0400
|
||||
Subject: [PATCH 03/14] media: rc: per-protocol repeat period and minimum keyup
|
||||
Subject: [PATCH 03/13] media: rc: per-protocol repeat period and minimum keyup
|
||||
timer
|
||||
|
||||
Each IR protocol has its own repeat period. We can minimise the keyup
|
||||
@ -383,7 +383,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
3 files changed, 31 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/cec/cec-core.c b/drivers/media/cec/cec-core.c
|
||||
index b0c87f9ea08f..b278ab90b387 100644
|
||||
index b0c87f9..b278ab9 100644
|
||||
--- a/drivers/media/cec/cec-core.c
|
||||
+++ b/drivers/media/cec/cec-core.c
|
||||
@@ -322,7 +322,7 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
|
||||
@ -396,7 +396,7 @@ index b0c87f9ea08f..b278ab90b387 100644
|
||||
return adap;
|
||||
}
|
||||
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
|
||||
index 17f40c8e939f..19660f9757e1 100644
|
||||
index 17f40c8..19660f9 100644
|
||||
--- a/drivers/media/rc/lirc_dev.c
|
||||
+++ b/drivers/media/rc/lirc_dev.c
|
||||
@@ -583,7 +583,7 @@ static long ir_lirc_ioctl(struct file *file, unsigned int cmd,
|
||||
@ -409,7 +409,7 @@ index 17f40c8e939f..19660f9757e1 100644
|
||||
else
|
||||
fh->send_timeout_reports = !!val;
|
||||
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
|
||||
index 6a720e9c7aa8..9f4df60f62e1 100644
|
||||
index 8cd7a26..3b11241 100644
|
||||
--- a/drivers/media/rc/rc-main.c
|
||||
+++ b/drivers/media/rc/rc-main.c
|
||||
@@ -26,50 +26,50 @@ static const struct {
|
||||
@ -524,13 +524,13 @@ index 6a720e9c7aa8..9f4df60f62e1 100644
|
||||
timer_setup(&dev->timer_repeat, ir_timer_repeat, 0);
|
||||
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From 20d8ec0acdf9788ae6c3a1317cddab769032d00d Mon Sep 17 00:00:00 2001
|
||||
From 62a0d8ca1d2ee90ce57d6f1700e011ec2ec50c92 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Sun, 25 Mar 2018 11:45:40 -0400
|
||||
Subject: [PATCH 04/14] media: rc: mce_kbd decoder: low timeout values cause
|
||||
Subject: [PATCH 04/13] media: rc: mce_kbd decoder: low timeout values cause
|
||||
double keydowns
|
||||
|
||||
The mce keyboard repeats pressed keys every 100ms. If the IR timeout
|
||||
@ -548,10 +548,10 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
index 05f2a36769c0..9d609dca6e2b 100644
|
||||
index fa5ce51..03d0f7e 100644
|
||||
--- a/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
+++ b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
@@ -322,11 +322,13 @@ static int ir_mce_kbd_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
@@ -324,11 +324,13 @@ static int ir_mce_kbd_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
scancode = data->body & 0xffff;
|
||||
dev_dbg(&dev->dev, "keyboard data 0x%08x\n",
|
||||
data->body);
|
||||
@ -571,13 +571,13 @@ index 05f2a36769c0..9d609dca6e2b 100644
|
||||
ir_mce_kbd_process_keyboard_data(dev, scancode);
|
||||
lsc.rc_proto = RC_PROTO_MCIR2_KBD;
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From f237198b260ea1891437f991178657a0bf4de43d Mon Sep 17 00:00:00 2001
|
||||
From 109b96feab8cdb9660aa8f5c18fe019671c38949 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Sat, 7 Apr 2018 17:41:17 -0400
|
||||
Subject: [PATCH 05/14] media: rc: mce_kbd protocol encodes two scancodes
|
||||
Subject: [PATCH 05/13] media: rc: mce_kbd protocol encodes two scancodes
|
||||
|
||||
If two keys are pressed, then both keys are encoded in the scancode. This
|
||||
makes the mce keyboard more responsive.
|
||||
@ -590,10 +590,10 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
2 files changed, 13 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
index 9d609dca6e2b..f94e89ebc724 100644
|
||||
index 03d0f7e..002b832 100644
|
||||
--- a/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
+++ b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
@@ -147,13 +147,14 @@ static enum mce_kbd_mode mce_kbd_mode(struct mce_kbd_dec *data)
|
||||
@@ -149,13 +149,14 @@ static enum mce_kbd_mode mce_kbd_mode(struct mce_kbd_dec *data)
|
||||
static void ir_mce_kbd_process_keyboard_data(struct rc_dev *dev, u32 scancode)
|
||||
{
|
||||
struct mce_kbd_dec *data = &dev->raw->mce_kbd;
|
||||
@ -612,7 +612,7 @@ index 9d609dca6e2b..f94e89ebc724 100644
|
||||
|
||||
for (i = 0; i < 7; i++) {
|
||||
maskcode = kbd_keycodes[MCIR2_MASK_KEYS_START + i];
|
||||
@@ -164,10 +165,12 @@ static void ir_mce_kbd_process_keyboard_data(struct rc_dev *dev, u32 scancode)
|
||||
@@ -166,10 +167,12 @@ static void ir_mce_kbd_process_keyboard_data(struct rc_dev *dev, u32 scancode)
|
||||
input_report_key(data->idev, maskcode, keystate);
|
||||
}
|
||||
|
||||
@ -629,7 +629,7 @@ index 9d609dca6e2b..f94e89ebc724 100644
|
||||
for (i = 0; i < MCIR2_MASK_KEYS_START; i++)
|
||||
input_report_key(data->idev, kbd_keycodes[i], 0);
|
||||
}
|
||||
@@ -319,7 +322,7 @@ static int ir_mce_kbd_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
@@ -321,7 +324,7 @@ static int ir_mce_kbd_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
|
||||
switch (data->wanted_bits) {
|
||||
case MCIR2_KEYBOARD_NBITS:
|
||||
@ -639,7 +639,7 @@ index 9d609dca6e2b..f94e89ebc724 100644
|
||||
data->body);
|
||||
if (scancode) {
|
||||
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
|
||||
index 9f4df60f62e1..b7071bde670a 100644
|
||||
index 3b11241..2e222d9 100644
|
||||
--- a/drivers/media/rc/rc-main.c
|
||||
+++ b/drivers/media/rc/rc-main.c
|
||||
@@ -51,7 +51,7 @@ static const struct {
|
||||
@ -652,46 +652,13 @@ index 9f4df60f62e1..b7071bde670a 100644
|
||||
.scancode_bits = 0x1fffff, .repeat_period = 100 },
|
||||
[RC_PROTO_RC6_0] = { .name = "rc-6-0",
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From 6b911bbe130adae94296b099441b82914784ee94 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Sun, 8 Apr 2018 06:36:40 -0400
|
||||
Subject: [PATCH 06/14] media: rc: mce_kbd decoder: fix stuck keys
|
||||
|
||||
The MCE Remote sends a 0 scancode when keys are released. If this is not
|
||||
received or decoded, then keys can get "stuck"; the keyup event is not
|
||||
sent since the input_sync() is missing from the timeout handler.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Sean Young <sean@mess.org>
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
---
|
||||
drivers/media/rc/ir-mce_kbd-decoder.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
index f94e89ebc724..002b8323ae69 100644
|
||||
--- a/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
+++ b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
@@ -130,6 +130,8 @@ static void mce_kbd_rx_timeout(struct timer_list *t)
|
||||
|
||||
for (i = 0; i < MCIR2_MASK_KEYS_START; i++)
|
||||
input_report_key(raw->mce_kbd.idev, kbd_keycodes[i], 0);
|
||||
+
|
||||
+ input_sync(raw->mce_kbd.idev);
|
||||
}
|
||||
|
||||
static enum mce_kbd_mode mce_kbd_mode(struct mce_kbd_dec *data)
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
||||
From 2734db8383a3761d32f96bef9d173a9390f753d9 Mon Sep 17 00:00:00 2001
|
||||
From 83fd4cbbb5e3f6b1a27a2098ae4e4ed53abcdc4a Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Wed, 11 Apr 2018 11:02:16 -0400
|
||||
Subject: [PATCH 07/14] media: rc: mce_kbd decoder: remove superfluous call to
|
||||
Subject: [PATCH 06/13] media: rc: mce_kbd decoder: remove superfluous call to
|
||||
input_sync
|
||||
|
||||
There is nothing to sync in this code path.
|
||||
@ -704,7 +671,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
index 002b8323ae69..2fc78710a724 100644
|
||||
index 002b832..2fc7871 100644
|
||||
--- a/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
+++ b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
@@ -362,7 +362,6 @@ static int ir_mce_kbd_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
@ -716,13 +683,13 @@ index 002b8323ae69..2fc78710a724 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From b7793b3f5899b82d2527d0fa89c3582c5074436d Mon Sep 17 00:00:00 2001
|
||||
From 58e8f06c164bc725c359c9f6dd22f7fb1718768c Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Thu, 12 Apr 2018 16:28:39 -0400
|
||||
Subject: [PATCH 08/14] media: rc: mce_kbd decoder: fix race condition
|
||||
Subject: [PATCH 07/13] media: rc: mce_kbd decoder: fix race condition
|
||||
|
||||
The MCE keyboard sends both key down and key up events. We have a timeout
|
||||
handler mce_kbd_rx_timeout() in case the keyup event is never received;
|
||||
@ -743,7 +710,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
2 files changed, 18 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
index 2fc78710a724..9574c3dd90f2 100644
|
||||
index 2fc7871..9574c3d 100644
|
||||
--- a/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
+++ b/drivers/media/rc/ir-mce_kbd-decoder.c
|
||||
@@ -119,19 +119,25 @@ static void mce_kbd_rx_timeout(struct timer_list *t)
|
||||
@ -804,7 +771,7 @@ index 2fc78710a724..9574c3dd90f2 100644
|
||||
input_set_drvdata(idev, mce_kbd);
|
||||
|
||||
diff --git a/drivers/media/rc/rc-core-priv.h b/drivers/media/rc/rc-core-priv.h
|
||||
index f78551344eca..07ba77fe6a3b 100644
|
||||
index f785513..07ba77f 100644
|
||||
--- a/drivers/media/rc/rc-core-priv.h
|
||||
+++ b/drivers/media/rc/rc-core-priv.h
|
||||
@@ -105,6 +105,8 @@ struct ir_raw_event_ctrl {
|
||||
@ -817,13 +784,13 @@ index f78551344eca..07ba77fe6a3b 100644
|
||||
char name[64];
|
||||
char phys[64];
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From c5aeb74f46ec942f4079c36a59724824cb188592 Mon Sep 17 00:00:00 2001
|
||||
From c9142eda7fe068269339893a910f2cd2e71dc8a4 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Wed, 18 Apr 2018 05:36:25 -0400
|
||||
Subject: [PATCH 09/14] media: rc: mceusb: IR of length 0 means IR timeout, not
|
||||
Subject: [PATCH 08/13] media: rc: mceusb: IR of length 0 means IR timeout, not
|
||||
reset
|
||||
|
||||
The last usb packet with IR data will end with 0x80 (MCE_IRDATA_TRAILER).
|
||||
@ -836,7 +803,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
|
||||
index 69ba57372c05..a1c21903b96c 100644
|
||||
index 69ba573..a1c2190 100644
|
||||
--- a/drivers/media/rc/mceusb.c
|
||||
+++ b/drivers/media/rc/mceusb.c
|
||||
@@ -1182,7 +1182,12 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
|
||||
@ -854,13 +821,13 @@ index 69ba57372c05..a1c21903b96c 100644
|
||||
ir->pulse_count = 0;
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From 410a96b5bed5a814ae27129fad5ceda7aa4b4c07 Mon Sep 17 00:00:00 2001
|
||||
From 072bc4a62bb580904d43bbc2fbe04d97115a4020 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Sun, 8 Apr 2018 11:06:49 -0400
|
||||
Subject: [PATCH 10/14] media: rc: mceusb: allow the timeout to be configurable
|
||||
Subject: [PATCH 09/13] media: rc: mceusb: allow the timeout to be configurable
|
||||
|
||||
mceusb devices have a default timeout of 100ms, but this can be changed.
|
||||
|
||||
@ -871,7 +838,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
|
||||
index a1c21903b96c..5c0bf61fae26 100644
|
||||
index a1c2190..5c0bf61 100644
|
||||
--- a/drivers/media/rc/mceusb.c
|
||||
+++ b/drivers/media/rc/mceusb.c
|
||||
@@ -982,6 +982,25 @@ static int mceusb_set_tx_carrier(struct rc_dev *dev, u32 carrier)
|
||||
@ -912,13 +879,13 @@ index a1c21903b96c..5c0bf61fae26 100644
|
||||
rc->s_tx_mask = mceusb_set_tx_mask;
|
||||
rc->s_tx_carrier = mceusb_set_tx_carrier;
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From bb0b2578562412817987efc0aef6e635b789ae63 Mon Sep 17 00:00:00 2001
|
||||
From 880ddf029177c5a26889672c67db37572fff36e8 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Wed, 9 May 2018 06:11:28 -0400
|
||||
Subject: [PATCH 11/14] media: mceusb: MCE_CMD_SETIRTIMEOUT cause strange
|
||||
Subject: [PATCH 10/13] media: mceusb: MCE_CMD_SETIRTIMEOUT cause strange
|
||||
behaviour on device
|
||||
|
||||
If the IR timeout is set on vid 1784 pid 0011, the device starts
|
||||
@ -932,7 +899,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
||||
1 file changed, 19 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
|
||||
index 5c0bf61fae26..1619b748469b 100644
|
||||
index 5c0bf61..1619b74 100644
|
||||
--- a/drivers/media/rc/mceusb.c
|
||||
+++ b/drivers/media/rc/mceusb.c
|
||||
@@ -181,6 +181,7 @@ enum mceusb_model_type {
|
||||
@ -993,13 +960,13 @@ index 5c0bf61fae26..1619b748469b 100644
|
||||
rc->s_tx_mask = mceusb_set_tx_mask;
|
||||
rc->s_tx_carrier = mceusb_set_tx_carrier;
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From 9fddaafa32f2fbf5d91e719f4d39208c3b782c3a Mon Sep 17 00:00:00 2001
|
||||
From 45bfc4c9f1747c826cb98f477f0a18ebbcdd957d Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Thu, 10 May 2018 07:37:51 -0400
|
||||
Subject: [PATCH 12/14] media: mceusb: filter out bogus timing irdata of
|
||||
Subject: [PATCH 11/13] media: mceusb: filter out bogus timing irdata of
|
||||
duration 0
|
||||
|
||||
A mceusb device has been observed producing invalid irdata. Proactively
|
||||
@ -1013,7 +980,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
|
||||
index 1619b748469b..1ca49491abc8 100644
|
||||
index 1619b74..1ca49491 100644
|
||||
--- a/drivers/media/rc/mceusb.c
|
||||
+++ b/drivers/media/rc/mceusb.c
|
||||
@@ -1177,6 +1177,11 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
|
||||
@ -1029,13 +996,13 @@ index 1619b748469b..1ca49491abc8 100644
|
||||
ir->pulse_tunit += rawir.duration;
|
||||
ir->pulse_count++;
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From 1f8b44307727f56f360eb7a43097504fe478e2a9 Mon Sep 17 00:00:00 2001
|
||||
From d3f6e4507c2714234a5fac8428b5e5db4514a717 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Thu, 10 May 2018 07:49:49 -0400
|
||||
Subject: [PATCH 13/14] media: mceusb: add missing break
|
||||
Subject: [PATCH 12/13] media: mceusb: add missing break
|
||||
|
||||
Fallthrough is not intended here.
|
||||
|
||||
@ -1046,7 +1013,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
|
||||
index 1ca49491abc8..4c0c8008872a 100644
|
||||
index 1ca49491..4c0c800 100644
|
||||
--- a/drivers/media/rc/mceusb.c
|
||||
+++ b/drivers/media/rc/mceusb.c
|
||||
@@ -572,6 +572,7 @@ static int mceusb_cmd_datasize(u8 cmd, u8 subcmd)
|
||||
@ -1058,13 +1025,13 @@ index 1ca49491abc8..4c0c8008872a 100644
|
||||
switch (subcmd) {
|
||||
case MCE_CMD_UNKNOWN:
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
||||
From 4b6434f8b34298bd30af762265f25feac4fada62 Mon Sep 17 00:00:00 2001
|
||||
From e7898b7a6ce902107232cb516d854609d71a9426 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Reichl <hias@horus.com>
|
||||
Date: Sun, 13 May 2018 07:24:31 -0400
|
||||
Subject: [PATCH 14/14] media: rc: ite-cir: lower timeout and extend allowed
|
||||
Subject: [PATCH 13/13] media: rc: ite-cir: lower timeout and extend allowed
|
||||
timeout range
|
||||
|
||||
The minimum possible timeout of ite-cir is 8 samples, which is
|
||||
@ -1090,7 +1057,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
||||
2 files changed, 5 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
|
||||
index 65e104c7ddfc..de77d22c30a7 100644
|
||||
index 65e104c..de77d22 100644
|
||||
--- a/drivers/media/rc/ite-cir.c
|
||||
+++ b/drivers/media/rc/ite-cir.c
|
||||
@@ -1561,9 +1561,11 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
|
||||
@ -1109,7 +1076,7 @@ index 65e104c7ddfc..de77d22c30a7 100644
|
||||
itdev->params.sample_period;
|
||||
rdev->tx_resolution = ITE_BAUDRATE_DIVISOR *
|
||||
diff --git a/drivers/media/rc/ite-cir.h b/drivers/media/rc/ite-cir.h
|
||||
index 0e8ebc880d1f..9cb24ac01350 100644
|
||||
index 0e8ebc8..9cb24ac 100644
|
||||
--- a/drivers/media/rc/ite-cir.h
|
||||
+++ b/drivers/media/rc/ite-cir.h
|
||||
@@ -154,13 +154,6 @@ struct ite_dev {
|
||||
@ -1127,5 +1094,5 @@ index 0e8ebc880d1f..9cb24ac01350 100644
|
||||
#define ITE_BITS_TO_NS(bits, sample_period) \
|
||||
((u32) ((bits) * ITE_BAUDRATE_DIVISOR * sample_period))
|
||||
--
|
||||
2.11.0
|
||||
2.14.1
|
||||
|
||||
|
@ -1,75 +0,0 @@
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
||||
index be8c2f0..da196b4 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||
@@ -656,6 +656,7 @@ enum intel_sbi_destination {
|
||||
#define QUIRK_BACKLIGHT_PRESENT (1<<3)
|
||||
#define QUIRK_PIN_SWIZZLED_PAGES (1<<5)
|
||||
#define QUIRK_INCREASE_T12_DELAY (1<<6)
|
||||
+#define QUIRK_INCREASE_DDI_DISABLED_TIME (1<<7)
|
||||
|
||||
struct intel_fbdev;
|
||||
struct intel_fbc_work;
|
||||
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
|
||||
index ca73387..bc3d012 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_ddi.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_ddi.c
|
||||
@@ -1791,6 +1791,9 @@ void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state)
|
||||
I915_WRITE(TRANS_DDI_FUNC_CTL(cpu_transcoder), temp);
|
||||
}
|
||||
|
||||
+/* Quirk time computed based on 24fps frame time of 41.25ms */
|
||||
+#define DDI_DISABLED_QUIRK_TIME 42
|
||||
+
|
||||
void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
|
||||
enum transcoder cpu_transcoder)
|
||||
{
|
||||
@@ -1800,6 +1803,11 @@ void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
|
||||
val &= ~(TRANS_DDI_FUNC_ENABLE | TRANS_DDI_PORT_MASK | TRANS_DDI_DP_VC_PAYLOAD_ALLOC);
|
||||
val |= TRANS_DDI_PORT_NONE;
|
||||
I915_WRITE(reg, val);
|
||||
+
|
||||
+ if (dev_priv->quirks & QUIRK_INCREASE_DDI_DISABLED_TIME) {
|
||||
+ msleep(DDI_DISABLED_QUIRK_TIME);
|
||||
+ DRM_DEBUG_KMS("Quirk Increase DDI disabled time\n");
|
||||
+ }
|
||||
}
|
||||
|
||||
int intel_ddi_toggle_hdcp_signalling(struct intel_encoder *intel_encoder,
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index 8251e18..40e0306 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -14749,6 +14749,17 @@ static void quirk_increase_t12_delay(struct drm_device *dev)
|
||||
DRM_INFO("Applying T12 delay quirk\n");
|
||||
}
|
||||
|
||||
+/* GeminiLake NUC HDMI outputs require additional off time
|
||||
+ * this allows the onboard retimer to correctly sync to signal
|
||||
+ */
|
||||
+static void quirk_increase_ddi_disabled_time(struct drm_device *dev)
|
||||
+{
|
||||
+ struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
+
|
||||
+ dev_priv->quirks |= QUIRK_INCREASE_DDI_DISABLED_TIME;
|
||||
+ DRM_INFO("Applying Increase DDI Disabled quirk\n");
|
||||
+}
|
||||
+
|
||||
struct intel_quirk {
|
||||
int device;
|
||||
int subsystem_vendor;
|
||||
@@ -14835,6 +14846,14 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
|
||||
|
||||
/* Toshiba Satellite P50-C-18C */
|
||||
{ 0x191B, 0x1179, 0xF840, quirk_increase_t12_delay },
|
||||
+
|
||||
+ /* GeminiLake NUC */
|
||||
+ { 0x3185, 0x8086, 0x2072, quirk_increase_ddi_disabled_time },
|
||||
+ { 0x3184, 0x8086, 0x2072, quirk_increase_ddi_disabled_time },
|
||||
+ /* ASRock ITX*/
|
||||
+ { 0x3185, 0x1849, 0x2212, quirk_increase_ddi_disabled_time },
|
||||
+ { 0x3184, 0x1849, 0x2212, quirk_increase_ddi_disabled_time },
|
||||
+
|
||||
};
|
||||
|
||||
static void intel_init_quirks(struct drm_device *dev)
|
@ -0,0 +1,106 @@
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
||||
index 2cefe4c..c1526ea 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||
@@ -650,6 +650,7 @@ enum intel_sbi_destination {
|
||||
#define QUIRK_BACKLIGHT_PRESENT (1<<3)
|
||||
#define QUIRK_PIN_SWIZZLED_PAGES (1<<5)
|
||||
#define QUIRK_INCREASE_T12_DELAY (1<<6)
|
||||
+#define QUIRK_INCREASE_DDI_DISABLED_TIME (1<<7)
|
||||
|
||||
struct intel_fbdev;
|
||||
struct intel_fbc_work;
|
||||
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
|
||||
index 0319825..6d33010 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_ddi.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_ddi.c
|
||||
@@ -1807,15 +1807,27 @@ void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state)
|
||||
I915_WRITE(TRANS_DDI_FUNC_CTL(cpu_transcoder), temp);
|
||||
}
|
||||
|
||||
-void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
|
||||
- enum transcoder cpu_transcoder)
|
||||
+/* Quirk time at 100ms for reliable operation */
|
||||
+#define DDI_DISABLED_QUIRK_TIME 100
|
||||
+
|
||||
+void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
+ struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
|
||||
+ struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
|
||||
+ enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
|
||||
+
|
||||
i915_reg_t reg = TRANS_DDI_FUNC_CTL(cpu_transcoder);
|
||||
uint32_t val = I915_READ(reg);
|
||||
-
|
||||
val &= ~(TRANS_DDI_FUNC_ENABLE | TRANS_DDI_PORT_MASK | TRANS_DDI_DP_VC_PAYLOAD_ALLOC);
|
||||
val |= TRANS_DDI_PORT_NONE;
|
||||
I915_WRITE(reg, val);
|
||||
+
|
||||
+ if (dev_priv->quirks & QUIRK_INCREASE_DDI_DISABLED_TIME &&
|
||||
+ (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI) ||
|
||||
+ intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DDI))) {
|
||||
+ DRM_DEBUG_KMS("Quirk Increase DDI disabled time\n");
|
||||
+ msleep(DDI_DISABLED_QUIRK_TIME);
|
||||
+ }
|
||||
}
|
||||
|
||||
int intel_ddi_toggle_hdcp_signalling(struct intel_encoder *intel_encoder,
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index 681e071..8d31ff3 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -5837,7 +5837,7 @@ static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state,
|
||||
intel_ddi_set_vc_payload_alloc(old_crtc_state, false);
|
||||
|
||||
if (!transcoder_is_dsi(cpu_transcoder))
|
||||
- intel_ddi_disable_transcoder_func(dev_priv, cpu_transcoder);
|
||||
+ intel_ddi_disable_transcoder_func(old_crtc_state);
|
||||
|
||||
if (INTEL_GEN(dev_priv) >= 9)
|
||||
skylake_scaler_disable(intel_crtc);
|
||||
@@ -14847,6 +14847,17 @@ static void quirk_increase_t12_delay(struct drm_device *dev)
|
||||
DRM_INFO("Applying T12 delay quirk\n");
|
||||
}
|
||||
|
||||
+/* GeminiLake NUC HDMI outputs require additional off time
|
||||
+ * this allows the onboard retimer to correctly sync to signal
|
||||
+ */
|
||||
+static void quirk_increase_ddi_disabled_time(struct drm_device *dev)
|
||||
+{
|
||||
+ struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
+
|
||||
+ dev_priv->quirks |= QUIRK_INCREASE_DDI_DISABLED_TIME;
|
||||
+ DRM_INFO("Applying Increase DDI Disabled quirk\n");
|
||||
+}
|
||||
+
|
||||
struct intel_quirk {
|
||||
int device;
|
||||
int subsystem_vendor;
|
||||
@@ -14933,6 +14944,13 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
|
||||
|
||||
/* Toshiba Satellite P50-C-18C */
|
||||
{ 0x191B, 0x1179, 0xF840, quirk_increase_t12_delay },
|
||||
+
|
||||
+ /* GeminiLake NUC */
|
||||
+ { 0x3185, 0x8086, 0x2072, quirk_increase_ddi_disabled_time },
|
||||
+ { 0x3184, 0x8086, 0x2072, quirk_increase_ddi_disabled_time },
|
||||
+ /* ASRock ITX*/
|
||||
+ { 0x3185, 0x1849, 0x2212, quirk_increase_ddi_disabled_time },
|
||||
+ { 0x3184, 0x1849, 0x2212, quirk_increase_ddi_disabled_time },
|
||||
};
|
||||
|
||||
static void intel_init_quirks(struct drm_device *dev)
|
||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||
index b9b7032..2490221 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||
@@ -1384,8 +1384,7 @@ void hsw_fdi_link_train(struct intel_crtc *crtc,
|
||||
void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port);
|
||||
bool intel_ddi_get_hw_state(struct intel_encoder *encoder, enum pipe *pipe);
|
||||
void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state);
|
||||
-void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
|
||||
- enum transcoder cpu_transcoder);
|
||||
+void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state);
|
||||
void intel_ddi_enable_pipe_clock(const struct intel_crtc_state *crtc_state);
|
||||
void intel_ddi_disable_pipe_clock(const struct intel_crtc_state *crtc_state);
|
||||
void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state);
|
Loading…
x
Reference in New Issue
Block a user