diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-02 21:47:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-02 21:47:28 -0400 |
commit | 58586869599f6bb38aeca71a847cd77bfea74808 (patch) | |
tree | b8c0539daa5ffaf91981da16a9451ee9aae9a5c4 | |
parent | f929d3995d61ee0ff5d35e9f3fbef3b80bf4ccaa (diff) | |
parent | abcadddc85a4c9595b0a5ede34f2ee876fe4155f (diff) |
Merge tag 'pm+acpi-3.17-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI and power management fixes from Rafael Wysocki:
"These are three regression fixes (cpufreq core, pcc-cpufreq, i915 /
ACPI) and one trivial fix for a callback return value mismatch in the
cpufreq integrator driver.
Specifics:
- A recent cpufreq core fix went too far and introduced a regression
in the system suspend code path. Fix from Viresh Kumar.
- An ACPI-related commit in the i915 driver that fixed backlight
problems for some Thinkpads inadvertently broke a Dell machine (in
3.16). Fix from Aaron Lu.
- The pcc-cpufreq driver was broken during the 3.15 cycle by a commit
that put wait_event() under a spinlock by mistake. Fix that
(Rafael J Wysocki).
- The return value type of integrator_cpufreq_remove() is void, but
should be int. Fix from Arnd Bergmann"
* tag 'pm+acpi-3.17-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: update 'cpufreq_suspended' after stopping governors
ACPI / i915: Update the condition to ignore firmware backlight change request
cpufreq: integrator: fix integrator_cpufreq_remove return type
cpufreq: pcc-cpufreq: Fix wait_event() under spinlock
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 7 | ||||
-rw-r--r-- | drivers/cpufreq/integrator-cpufreq.c | 4 | ||||
-rw-r--r-- | drivers/cpufreq/pcc-cpufreq.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_opregion.c | 16 |
4 files changed, 18 insertions, 11 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 6e93e7f98358..61190f6b4829 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -1658,10 +1658,8 @@ void cpufreq_suspend(void) | |||
1658 | if (!cpufreq_driver) | 1658 | if (!cpufreq_driver) |
1659 | return; | 1659 | return; |
1660 | 1660 | ||
1661 | cpufreq_suspended = true; | ||
1662 | |||
1663 | if (!has_target()) | 1661 | if (!has_target()) |
1664 | return; | 1662 | goto suspend; |
1665 | 1663 | ||
1666 | pr_debug("%s: Suspending Governors\n", __func__); | 1664 | pr_debug("%s: Suspending Governors\n", __func__); |
1667 | 1665 | ||
@@ -1674,6 +1672,9 @@ void cpufreq_suspend(void) | |||
1674 | pr_err("%s: Failed to suspend driver: %p\n", __func__, | 1672 | pr_err("%s: Failed to suspend driver: %p\n", __func__, |
1675 | policy); | 1673 | policy); |
1676 | } | 1674 | } |
1675 | |||
1676 | suspend: | ||
1677 | cpufreq_suspended = true; | ||
1677 | } | 1678 | } |
1678 | 1679 | ||
1679 | /** | 1680 | /** |
diff --git a/drivers/cpufreq/integrator-cpufreq.c b/drivers/cpufreq/integrator-cpufreq.c index c1320528b9d0..6bd69adc3c5e 100644 --- a/drivers/cpufreq/integrator-cpufreq.c +++ b/drivers/cpufreq/integrator-cpufreq.c | |||
@@ -213,9 +213,9 @@ static int __init integrator_cpufreq_probe(struct platform_device *pdev) | |||
213 | return cpufreq_register_driver(&integrator_driver); | 213 | return cpufreq_register_driver(&integrator_driver); |
214 | } | 214 | } |
215 | 215 | ||
216 | static void __exit integrator_cpufreq_remove(struct platform_device *pdev) | 216 | static int __exit integrator_cpufreq_remove(struct platform_device *pdev) |
217 | { | 217 | { |
218 | cpufreq_unregister_driver(&integrator_driver); | 218 | return cpufreq_unregister_driver(&integrator_driver); |
219 | } | 219 | } |
220 | 220 | ||
221 | static const struct of_device_id integrator_cpufreq_match[] = { | 221 | static const struct of_device_id integrator_cpufreq_match[] = { |
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c index 728a2d879499..4d2c8e861089 100644 --- a/drivers/cpufreq/pcc-cpufreq.c +++ b/drivers/cpufreq/pcc-cpufreq.c | |||
@@ -204,7 +204,6 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy, | |||
204 | u32 input_buffer; | 204 | u32 input_buffer; |
205 | int cpu; | 205 | int cpu; |
206 | 206 | ||
207 | spin_lock(&pcc_lock); | ||
208 | cpu = policy->cpu; | 207 | cpu = policy->cpu; |
209 | pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu); | 208 | pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu); |
210 | 209 | ||
@@ -216,6 +215,7 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy, | |||
216 | freqs.old = policy->cur; | 215 | freqs.old = policy->cur; |
217 | freqs.new = target_freq; | 216 | freqs.new = target_freq; |
218 | cpufreq_freq_transition_begin(policy, &freqs); | 217 | cpufreq_freq_transition_begin(policy, &freqs); |
218 | spin_lock(&pcc_lock); | ||
219 | 219 | ||
220 | input_buffer = 0x1 | (((target_freq * 100) | 220 | input_buffer = 0x1 | (((target_freq * 100) |
221 | / (ioread32(&pcch_hdr->nominal) * 1000)) << 8); | 221 | / (ioread32(&pcch_hdr->nominal) * 1000)) << 8); |
diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c index ca52ad2ae7d1..d8de1d5140a7 100644 --- a/drivers/gpu/drm/i915/intel_opregion.c +++ b/drivers/gpu/drm/i915/intel_opregion.c | |||
@@ -396,6 +396,16 @@ int intel_opregion_notify_adapter(struct drm_device *dev, pci_power_t state) | |||
396 | return -EINVAL; | 396 | return -EINVAL; |
397 | } | 397 | } |
398 | 398 | ||
399 | /* | ||
400 | * If the vendor backlight interface is not in use and ACPI backlight interface | ||
401 | * is broken, do not bother processing backlight change requests from firmware. | ||
402 | */ | ||
403 | static bool should_ignore_backlight_request(void) | ||
404 | { | ||
405 | return acpi_video_backlight_support() && | ||
406 | !acpi_video_verify_backlight_support(); | ||
407 | } | ||
408 | |||
399 | static u32 asle_set_backlight(struct drm_device *dev, u32 bclp) | 409 | static u32 asle_set_backlight(struct drm_device *dev, u32 bclp) |
400 | { | 410 | { |
401 | struct drm_i915_private *dev_priv = dev->dev_private; | 411 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -404,11 +414,7 @@ static u32 asle_set_backlight(struct drm_device *dev, u32 bclp) | |||
404 | 414 | ||
405 | DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp); | 415 | DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp); |
406 | 416 | ||
407 | /* | 417 | if (should_ignore_backlight_request()) { |
408 | * If the acpi_video interface is not supposed to be used, don't | ||
409 | * bother processing backlight level change requests from firmware. | ||
410 | */ | ||
411 | if (!acpi_video_verify_backlight_support()) { | ||
412 | DRM_DEBUG_KMS("opregion backlight request ignored\n"); | 418 | DRM_DEBUG_KMS("opregion backlight request ignored\n"); |
413 | return 0; | 419 | return 0; |
414 | } | 420 | } |