Merge branches 'pm-cpufreq' and 'acpi-video'

* pm-cpufreq:
  cpufreq: update 'cpufreq_suspended' after stopping governors
  cpufreq: integrator: fix integrator_cpufreq_remove return type
  cpufreq: pcc-cpufreq: Fix wait_event() under spinlock

* acpi-video:
  ACPI / i915: Update the condition to ignore firmware backlight change request
This commit is contained in:
Rafael J. Wysocki 2014-10-03 03:10:07 +02:00
commit abcadddc85
4 changed files with 18 additions and 11 deletions

View File

@ -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)
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;
} }
/** /**

View File

@ -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[] = {

View File

@ -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,
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);

View File

@ -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)
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;
} }