mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
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:
commit
abcadddc85
@ -1658,10 +1658,8 @@ void cpufreq_suspend(void)
|
||||
if (!cpufreq_driver)
|
||||
return;
|
||||
|
||||
cpufreq_suspended = true;
|
||||
|
||||
if (!has_target())
|
||||
return;
|
||||
goto suspend;
|
||||
|
||||
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__,
|
||||
policy);
|
||||
}
|
||||
|
||||
suspend:
|
||||
cpufreq_suspended = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -213,9 +213,9 @@ static int __init integrator_cpufreq_probe(struct platform_device *pdev)
|
||||
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[] = {
|
||||
|
@ -204,7 +204,6 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy,
|
||||
u32 input_buffer;
|
||||
int cpu;
|
||||
|
||||
spin_lock(&pcc_lock);
|
||||
cpu = policy->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.new = target_freq;
|
||||
cpufreq_freq_transition_begin(policy, &freqs);
|
||||
spin_lock(&pcc_lock);
|
||||
|
||||
input_buffer = 0x1 | (((target_freq * 100)
|
||||
/ (ioread32(&pcch_hdr->nominal) * 1000)) << 8);
|
||||
|
@ -396,6 +396,16 @@ int intel_opregion_notify_adapter(struct drm_device *dev, pci_power_t state)
|
||||
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)
|
||||
{
|
||||
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);
|
||||
|
||||
/*
|
||||
* 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()) {
|
||||
if (should_ignore_backlight_request()) {
|
||||
DRM_DEBUG_KMS("opregion backlight request ignored\n");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user