提交 58586869 编写于 作者: L Linus Torvalds

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
...@@ -1658,10 +1658,8 @@ void cpufreq_suspend(void) ...@@ -1658,10 +1658,8 @@ void cpufreq_suspend(void)
if (!cpufreq_driver) if (!cpufreq_driver)
return; return;
cpufreq_suspended = true;
if (!has_target()) if (!has_target())
return; goto suspend;
pr_debug("%s: Suspending Governors\n", __func__); pr_debug("%s: Suspending Governors\n", __func__);
...@@ -1674,6 +1672,9 @@ void cpufreq_suspend(void) ...@@ -1674,6 +1672,9 @@ void cpufreq_suspend(void)
pr_err("%s: Failed to suspend driver: %p\n", __func__, pr_err("%s: Failed to suspend driver: %p\n", __func__,
policy); policy);
} }
suspend:
cpufreq_suspended = true;
} }
/** /**
......
...@@ -213,9 +213,9 @@ static int __init integrator_cpufreq_probe(struct platform_device *pdev) ...@@ -213,9 +213,9 @@ static int __init integrator_cpufreq_probe(struct platform_device *pdev)
return cpufreq_register_driver(&integrator_driver); return cpufreq_register_driver(&integrator_driver);
} }
static void __exit integrator_cpufreq_remove(struct platform_device *pdev) static int __exit integrator_cpufreq_remove(struct platform_device *pdev)
{ {
cpufreq_unregister_driver(&integrator_driver); return cpufreq_unregister_driver(&integrator_driver);
} }
static const struct of_device_id integrator_cpufreq_match[] = { static const struct of_device_id integrator_cpufreq_match[] = {
......
...@@ -204,7 +204,6 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy, ...@@ -204,7 +204,6 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy,
u32 input_buffer; u32 input_buffer;
int cpu; int cpu;
spin_lock(&pcc_lock);
cpu = policy->cpu; cpu = policy->cpu;
pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu); pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu);
...@@ -216,6 +215,7 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy, ...@@ -216,6 +215,7 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy,
freqs.old = policy->cur; freqs.old = policy->cur;
freqs.new = target_freq; freqs.new = target_freq;
cpufreq_freq_transition_begin(policy, &freqs); cpufreq_freq_transition_begin(policy, &freqs);
spin_lock(&pcc_lock);
input_buffer = 0x1 | (((target_freq * 100) input_buffer = 0x1 | (((target_freq * 100)
/ (ioread32(&pcch_hdr->nominal) * 1000)) << 8); / (ioread32(&pcch_hdr->nominal) * 1000)) << 8);
......
...@@ -396,6 +396,16 @@ int intel_opregion_notify_adapter(struct drm_device *dev, pci_power_t state) ...@@ -396,6 +396,16 @@ int intel_opregion_notify_adapter(struct drm_device *dev, pci_power_t state)
return -EINVAL; return -EINVAL;
} }
/*
* If the vendor backlight interface is not in use and ACPI backlight interface
* is broken, do not bother processing backlight change requests from firmware.
*/
static bool should_ignore_backlight_request(void)
{
return acpi_video_backlight_support() &&
!acpi_video_verify_backlight_support();
}
static u32 asle_set_backlight(struct drm_device *dev, u32 bclp) static u32 asle_set_backlight(struct drm_device *dev, u32 bclp)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; 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,11 +414,7 @@ static u32 asle_set_backlight(struct drm_device *dev, u32 bclp)
DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp); DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp);
/* if (should_ignore_backlight_request()) {
* If the acpi_video interface is not supposed to be used, don't
* bother processing backlight level change requests from firmware.
*/
if (!acpi_video_verify_backlight_support()) {
DRM_DEBUG_KMS("opregion backlight request ignored\n"); DRM_DEBUG_KMS("opregion backlight request ignored\n");
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册