Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm+acpi-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:
"These are just two fixes, a revert of the would-be backlight fix that
didn't work and an intel_pstate fix for two problems related to
maximum P-state selection.

Specifics:

- Revert of the ACPI video commit that I hoped would help fix
backlight problems related to Windows 8 compatibility on some
systems. Unfortunately, it turned out to cause problems to happen
too.

- Fix for two problems in intel_pstate, a possible failure to respond
to a load change on a quiet system and a possible failure to select
the highest available P-state on some systems. From Dirk
Brandewie"

* tag 'pm+acpi-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
Revert "ACPI / video / i915: No ACPI backlight if firmware expects Windows 8"
cpufreq / intel_pstate: Change to scale off of max P-state

+17 -93
-2
drivers/acpi/internal.h
··· 169 169 -------------------------------------------------------------------------- */ 170 170 #if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) 171 171 bool acpi_video_backlight_quirks(void); 172 - bool acpi_video_verify_backlight_support(void); 173 172 #else 174 173 static inline bool acpi_video_backlight_quirks(void) { return false; } 175 - static inline bool acpi_video_verify_backlight_support(void) { return false; } 176 174 #endif 177 175 178 176 #endif /* _ACPI_INTERNAL_H_ */
+8 -59
drivers/acpi/video.c
··· 911 911 if (acpi_video_init_brightness(device)) 912 912 return; 913 913 914 - if (acpi_video_verify_backlight_support()) { 914 + if (acpi_video_backlight_support()) { 915 915 struct backlight_properties props; 916 916 struct pci_dev *pdev; 917 917 acpi_handle acpi_parent; ··· 1366 1366 unsigned long long level_current, level_next; 1367 1367 int result = -EINVAL; 1368 1368 1369 - /* no warning message if acpi_backlight=vendor or a quirk is used */ 1370 - if (!acpi_video_verify_backlight_support()) 1369 + /* no warning message if acpi_backlight=vendor is used */ 1370 + if (!acpi_video_backlight_support()) 1371 1371 return 0; 1372 1372 1373 1373 if (!device->brightness) ··· 1875 1875 return 0; 1876 1876 } 1877 1877 1878 - static acpi_status video_unregister_backlight(acpi_handle handle, u32 lvl, 1879 - void *context, void **rv) 1880 - { 1881 - struct acpi_device *acpi_dev; 1882 - struct acpi_video_bus *video; 1883 - struct acpi_video_device *dev, *next; 1884 - 1885 - if (acpi_bus_get_device(handle, &acpi_dev)) 1886 - return AE_OK; 1887 - 1888 - if (acpi_match_device_ids(acpi_dev, video_device_ids)) 1889 - return AE_OK; 1890 - 1891 - video = acpi_driver_data(acpi_dev); 1892 - if (!video) 1893 - return AE_OK; 1894 - 1895 - acpi_video_bus_stop_devices(video); 1896 - mutex_lock(&video->device_list_lock); 1897 - list_for_each_entry_safe(dev, next, &video->video_device_list, entry) { 1898 - if (dev->backlight) { 1899 - backlight_device_unregister(dev->backlight); 1900 - dev->backlight = NULL; 1901 - kfree(dev->brightness->levels); 1902 - kfree(dev->brightness); 1903 - } 1904 - if (dev->cooling_dev) { 1905 - sysfs_remove_link(&dev->dev->dev.kobj, 1906 - "thermal_cooling"); 1907 - sysfs_remove_link(&dev->cooling_dev->device.kobj, 1908 - "device"); 1909 - thermal_cooling_device_unregister(dev->cooling_dev); 1910 - dev->cooling_dev = NULL; 1911 - } 1912 - } 1913 - mutex_unlock(&video->device_list_lock); 1914 - acpi_video_bus_start_devices(video); 1915 - return AE_OK; 1916 - } 1917 - 1918 1878 static int __init is_i740(struct pci_dev *dev) 1919 1879 { 1920 1880 if (dev->device == 0x00D1) ··· 1906 1946 return opregion; 1907 1947 } 1908 1948 1909 - int __acpi_video_register(bool backlight_quirks) 1949 + int acpi_video_register(void) 1910 1950 { 1911 - bool no_backlight; 1912 - int result; 1913 - 1914 - no_backlight = backlight_quirks ? acpi_video_backlight_quirks() : false; 1915 - 1951 + int result = 0; 1916 1952 if (register_count) { 1917 1953 /* 1918 - * If acpi_video_register() has been called already, don't try 1919 - * to register acpi_video_bus, but unregister backlight devices 1920 - * if no backlight support is requested. 1954 + * if the function of acpi_video_register is already called, 1955 + * don't register the acpi_vide_bus again and return no error. 1921 1956 */ 1922 - if (no_backlight) 1923 - acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 1924 - ACPI_UINT32_MAX, 1925 - video_unregister_backlight, 1926 - NULL, NULL, NULL); 1927 - 1928 1957 return 0; 1929 1958 } 1930 1959 ··· 1929 1980 1930 1981 return 0; 1931 1982 } 1932 - EXPORT_SYMBOL(__acpi_video_register); 1983 + EXPORT_SYMBOL(acpi_video_register); 1933 1984 1934 1985 void acpi_video_unregister(void) 1935 1986 {
+1 -14
drivers/acpi/video_detect.c
··· 238 238 239 239 bool acpi_video_backlight_quirks(void) 240 240 { 241 - if (acpi_gbl_osi_data >= ACPI_OSI_WIN_8) { 242 - acpi_video_caps_check(); 243 - acpi_video_support |= ACPI_VIDEO_SKIP_BACKLIGHT; 244 - return true; 245 - } 246 - return false; 241 + return acpi_gbl_osi_data >= ACPI_OSI_WIN_8; 247 242 } 248 243 EXPORT_SYMBOL(acpi_video_backlight_quirks); 249 244 ··· 285 290 return acpi_video_support & ACPI_VIDEO_BACKLIGHT; 286 291 } 287 292 EXPORT_SYMBOL(acpi_video_backlight_support); 288 - 289 - /* For the ACPI video driver use only. */ 290 - bool acpi_video_verify_backlight_support(void) 291 - { 292 - return (acpi_video_support & ACPI_VIDEO_SKIP_BACKLIGHT) ? 293 - false : acpi_video_backlight_support(); 294 - } 295 - EXPORT_SYMBOL(acpi_video_verify_backlight_support); 296 293 297 294 /* 298 295 * Use acpi_backlight=vendor/video to force that backlight switching
+6 -6
drivers/cpufreq/intel_pstate.c
··· 103 103 static struct pstate_adjust_policy default_policy = { 104 104 .sample_rate_ms = 10, 105 105 .deadband = 0, 106 - .setpoint = 109, 107 - .p_gain_pct = 17, 106 + .setpoint = 97, 107 + .p_gain_pct = 20, 108 108 .d_gain_pct = 0, 109 - .i_gain_pct = 4, 109 + .i_gain_pct = 0, 110 110 }; 111 111 112 112 struct perf_limits { ··· 468 468 static inline int intel_pstate_get_scaled_busy(struct cpudata *cpu) 469 469 { 470 470 int32_t busy_scaled; 471 - int32_t core_busy, turbo_pstate, current_pstate; 471 + int32_t core_busy, max_pstate, current_pstate; 472 472 473 473 core_busy = int_tofp(cpu->samples[cpu->sample_ptr].core_pct_busy); 474 - turbo_pstate = int_tofp(cpu->pstate.turbo_pstate); 474 + max_pstate = int_tofp(cpu->pstate.max_pstate); 475 475 current_pstate = int_tofp(cpu->pstate.current_pstate); 476 - busy_scaled = mul_fp(core_busy, div_fp(turbo_pstate, current_pstate)); 476 + busy_scaled = mul_fp(core_busy, div_fp(max_pstate, current_pstate)); 477 477 478 478 return fp_toint(busy_scaled); 479 479 }
+1 -1
drivers/gpu/drm/i915/i915_dma.c
··· 1648 1648 if (INTEL_INFO(dev)->num_pipes) { 1649 1649 /* Must be done after probing outputs */ 1650 1650 intel_opregion_init(dev); 1651 - acpi_video_register_with_quirks(); 1651 + acpi_video_register(); 1652 1652 } 1653 1653 1654 1654 if (IS_GEN5(dev))
+1 -10
include/acpi/video.h
··· 17 17 #define ACPI_VIDEO_DISPLAY_LEGACY_TV 0x0200 18 18 19 19 #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) 20 - extern int __acpi_video_register(bool backlight_quirks); 21 - static inline int acpi_video_register(void) 22 - { 23 - return __acpi_video_register(false); 24 - } 25 - static inline int acpi_video_register_with_quirks(void) 26 - { 27 - return __acpi_video_register(true); 28 - } 20 + extern int acpi_video_register(void); 29 21 extern void acpi_video_unregister(void); 30 22 extern int acpi_video_get_edid(struct acpi_device *device, int type, 31 23 int device_id, void **edid); 32 24 #else 33 25 static inline int acpi_video_register(void) { return 0; } 34 - static inline int acpi_video_register_with_quirks(void) { return 0; } 35 26 static inline void acpi_video_unregister(void) { return; } 36 27 static inline int acpi_video_get_edid(struct acpi_device *device, int type, 37 28 int device_id, void **edid)
-1
include/linux/acpi.h
··· 191 191 #define ACPI_VIDEO_BACKLIGHT_DMI_VIDEO 0x0200 192 192 #define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR 0x0400 193 193 #define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VIDEO 0x0800 194 - #define ACPI_VIDEO_SKIP_BACKLIGHT 0x1000 195 194 196 195 #if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) 197 196