summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin M. Forbes <jforbes@fedoraproject.org>2020-06-22 08:40:50 -0500
committerJustin M. Forbes <jforbes@fedoraproject.org>2020-06-22 08:40:50 -0500
commite104d77877b61dcc801be763a9624f7dfe08f926 (patch)
tree046d3fcbd62f2c3b57be9a43bd1a19e8202a03b2
parent58c962e62c5680a9b3025c2e31e5dbb9232f45ed (diff)
downloadkernel-e104d77877b61dcc801be763a9624f7dfe08f926.tar.gz
kernel-e104d77877b61dcc801be763a9624f7dfe08f926.tar.xz
kernel-e104d77877b61dcc801be763a9624f7dfe08f926.zip
Linux v5.7.5
Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
-rw-r--r--0001-pwm-lpss-Fix-get_state-runtime-pm-reference-handling.patch100
-rw-r--r--kernel.spec6
-rw-r--r--sources1
3 files changed, 4 insertions, 103 deletions
diff --git a/0001-pwm-lpss-Fix-get_state-runtime-pm-reference-handling.patch b/0001-pwm-lpss-Fix-get_state-runtime-pm-reference-handling.patch
deleted file mode 100644
index 1e07d8e45..000000000
--- a/0001-pwm-lpss-Fix-get_state-runtime-pm-reference-handling.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede@redhat.com>
-Date: Tue, 12 May 2020 00:39:24 +0200
-Subject: [PATCH] pwm: lpss: Fix get_state runtime-pm reference handling
-
-Before commit cfc4c189bc70 ("pwm: Read initial hardware state at request
-time"), a driver's get_state callback would get called once per PWM from
-pwmchip_add().
-
-pwm-lpss' runtime-pm code was relying on this, getting a runtime-pm ref for
-PWMs which are enabled at probe time from within its get_state callback,
-before enabling runtime-pm.
-
-The change to calling get_state at request time causes a number of
-problems:
-
-1. PWMs enabled at probe time may get runtime suspended before they are
-requested, causing e.g. a LCD backlight controlled by the PWM to turn off.
-
-2. When the request happens when the PWM has been runtime suspended, the
-ctrl register will read all 1 / 0xffffffff, causing get_state to store
-bogus values in the pwm_state.
-
-3. get_state was using an async pm_runtime_get() call, because it assumed
-that runtime-pm has not been enabled yet. If shortly after the request an
-apply call is made, then the pwm_lpss_is_updating() check may trigger
-because the resume triggered by the pm_runtime_get() call is not complete
-yet, so the ctrl register still reads all 1 / 0xffffffff.
-
-This commit fixes these issues by moving the initial pm_runtime_get() call
-for PWMs which are enabled at probe time to the pwm_lpss_probe() function;
-and by making get_state take a runtime-pm ref before reading the ctrl reg.
-
-BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1828927
-Fixes: cfc4c189bc70 ("pwm: Read initial hardware state at request time")
-Cc: stable@vger.kernel.org
-Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-Upstream Status: https://lore.kernel.org/linux-acpi/5f15f6bc-8650-d86e-893f-0d41557c57c7@redhat.com/
----
- drivers/pwm/pwm-lpss.c | 15 +++++++++++----
- 1 file changed, 11 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c
-index 75bbfe5f3bc2..9d965ffe66d1 100644
---- a/drivers/pwm/pwm-lpss.c
-+++ b/drivers/pwm/pwm-lpss.c
-@@ -158,7 +158,6 @@ static int pwm_lpss_apply(struct pwm_chip *chip, struct pwm_device *pwm,
- return 0;
- }
-
--/* This function gets called once from pwmchip_add to get the initial state */
- static void pwm_lpss_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
- struct pwm_state *state)
- {
-@@ -167,6 +166,8 @@ static void pwm_lpss_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
- unsigned long long base_unit, freq, on_time_div;
- u32 ctrl;
-
-+ pm_runtime_get_sync(chip->dev);
-+
- base_unit_range = BIT(lpwm->info->base_unit_bits);
-
- ctrl = pwm_lpss_read(pwm);
-@@ -187,8 +188,7 @@ static void pwm_lpss_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
- state->polarity = PWM_POLARITY_NORMAL;
- state->enabled = !!(ctrl & PWM_ENABLE);
-
-- if (state->enabled)
-- pm_runtime_get(chip->dev);
-+ pm_runtime_put(chip->dev);
- }
-
- static const struct pwm_ops pwm_lpss_ops = {
-@@ -202,7 +202,8 @@ struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
- {
- struct pwm_lpss_chip *lpwm;
- unsigned long c;
-- int ret;
-+ int i, ret;
-+ u32 ctrl;
-
- if (WARN_ON(info->npwm > MAX_PWMS))
- return ERR_PTR(-ENODEV);
-@@ -232,6 +233,12 @@ struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
- return ERR_PTR(ret);
- }
-
-+ for (i = 0; i < lpwm->info->npwm; i++) {
-+ ctrl = pwm_lpss_read(&lpwm->chip.pwms[i]);
-+ if (ctrl & PWM_ENABLE)
-+ pm_runtime_get(dev);
-+ }
-+
- return lpwm;
- }
- EXPORT_SYMBOL_GPL(pwm_lpss_probe);
---
-2.26.2
-
diff --git a/kernel.spec b/kernel.spec
index c5207a622..aba9959dd 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -92,7 +92,7 @@ Summary: The Linux kernel
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
-%define stable_update 4
+%define stable_update 5
# Set rpm version accordingly
%if 0%{?stable_update}
%define stablerev %{stable_update}
@@ -830,7 +830,6 @@ Patch73: 0001-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timing-calcu.patch
Patch74: 0001-arm64-allwinner-dts-a64-add-LCD-related-device-nodes.patch
Patch75: 0001-e1000e-bump-up-timeout-to-wait-when-ME-un-configure-.patch
Patch76: 0001-perf-cs-etm-Move-defined-of-traceid_list.patch
-Patch77: 0001-pwm-lpss-Fix-get_state-runtime-pm-reference-handling.patch
Patch79: 0001-disp-gv100-expose-capabilities-class.patch
Patch80: 0001-core-memory-remove-redundant-assignments-to-variable.patch
Patch81: 0001-acr-Use-kmemdup-instead-of-kmalloc-and-memcpy.patch
@@ -2958,6 +2957,9 @@ fi
#
#
%changelog
+* Mon Jun 22 2020 Justin M. Forbes <jforbes@fedoraproject.org> - 5.7.5-200
+- Linux v5.7.5
+
* Thu Jun 18 2020 Justin M. Forbes <jforbes@fedoraproject.org> - 5.7.4-200
- Linux v5.7.4
diff --git a/sources b/sources
index 4c4c775a0..82099a097 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
SHA512 (linux-5.7.tar.xz) = 45bde01593f6147c8c169b9e46b4b56eee998142552ae0ff82f1dd21b1fd54f3b32f6283f6bd77ea717d374672167849e468c157f235d2f12f7d7816e4623bf6
-SHA512 (patch-5.7.4.xz) = 754fe2f3cd2e7ab32f7ce8194239ca3940b470bd9da35ba2712e45025a1ff0e4780904361a4cadbcdc513b697dbc1eb0b86bea7f3e0f5e886dbee3a6cc661a40