You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'video' into release
Conflicts: Documentation/kernel-parameters.txt Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
@@ -1297,6 +1297,12 @@ static int __init acer_wmi_init(void)
|
||||
|
||||
set_quirks();
|
||||
|
||||
if (!acpi_video_backlight_support() && has_cap(ACER_CAP_BRIGHTNESS)) {
|
||||
interface->capability &= ~ACER_CAP_BRIGHTNESS;
|
||||
printk(ACER_INFO "Brightness must be controlled by "
|
||||
"generic video driver\n");
|
||||
}
|
||||
|
||||
if (platform_driver_register(&acer_platform_driver)) {
|
||||
printk(ACER_ERR "Unable to register platform driver.\n");
|
||||
goto error_platform_register;
|
||||
|
||||
@@ -1208,9 +1208,13 @@ static int __init asus_laptop_init(void)
|
||||
|
||||
dev = acpi_get_physical_device(hotk->device->handle);
|
||||
|
||||
result = asus_backlight_init(dev);
|
||||
if (result)
|
||||
goto fail_backlight;
|
||||
if (!acpi_video_backlight_support()) {
|
||||
result = asus_backlight_init(dev);
|
||||
if (result)
|
||||
goto fail_backlight;
|
||||
} else
|
||||
printk(ASUS_INFO "Brightness ignored, must be controlled by "
|
||||
"ACPI video driver\n");
|
||||
|
||||
result = asus_led_init(dev);
|
||||
if (result)
|
||||
|
||||
@@ -326,12 +326,14 @@ static int __init compal_init(void)
|
||||
|
||||
/* Register backlight stuff */
|
||||
|
||||
compalbl_device = backlight_device_register("compal-laptop", NULL, NULL,
|
||||
&compalbl_ops);
|
||||
if (IS_ERR(compalbl_device))
|
||||
return PTR_ERR(compalbl_device);
|
||||
if (!acpi_video_backlight_support()) {
|
||||
compalbl_device = backlight_device_register("compal-laptop", NULL, NULL,
|
||||
&compalbl_ops);
|
||||
if (IS_ERR(compalbl_device))
|
||||
return PTR_ERR(compalbl_device);
|
||||
|
||||
compalbl_device->props.max_brightness = COMPAL_LCD_LEVEL_MAX-1;
|
||||
compalbl_device->props.max_brightness = COMPAL_LCD_LEVEL_MAX-1;
|
||||
}
|
||||
|
||||
ret = platform_driver_register(&compal_driver);
|
||||
if (ret)
|
||||
|
||||
@@ -825,9 +825,15 @@ static int __init eeepc_laptop_init(void)
|
||||
return -ENODEV;
|
||||
}
|
||||
dev = acpi_get_physical_device(ehotk->device->handle);
|
||||
result = eeepc_backlight_init(dev);
|
||||
if (result)
|
||||
goto fail_backlight;
|
||||
|
||||
if (!acpi_video_backlight_support()) {
|
||||
result = eeepc_backlight_init(dev);
|
||||
if (result)
|
||||
goto fail_backlight;
|
||||
} else
|
||||
printk(EEEPC_INFO "Backlight controlled by ACPI video "
|
||||
"driver\n");
|
||||
|
||||
result = eeepc_hwmon_init(dev);
|
||||
if (result)
|
||||
goto fail_hwmon;
|
||||
|
||||
@@ -1005,16 +1005,16 @@ static int __init fujitsu_init(void)
|
||||
|
||||
/* Register backlight stuff */
|
||||
|
||||
fujitsu->bl_device =
|
||||
backlight_device_register("fujitsu-laptop", NULL, NULL,
|
||||
&fujitsubl_ops);
|
||||
if (IS_ERR(fujitsu->bl_device))
|
||||
return PTR_ERR(fujitsu->bl_device);
|
||||
|
||||
max_brightness = fujitsu->max_brightness;
|
||||
|
||||
fujitsu->bl_device->props.max_brightness = max_brightness - 1;
|
||||
fujitsu->bl_device->props.brightness = fujitsu->brightness_level;
|
||||
if (!acpi_video_backlight_support()) {
|
||||
fujitsu->bl_device =
|
||||
backlight_device_register("fujitsu-laptop", NULL, NULL,
|
||||
&fujitsubl_ops);
|
||||
if (IS_ERR(fujitsu->bl_device))
|
||||
return PTR_ERR(fujitsu->bl_device);
|
||||
max_brightness = fujitsu->max_brightness;
|
||||
fujitsu->bl_device->props.max_brightness = max_brightness - 1;
|
||||
fujitsu->bl_device->props.brightness = fujitsu->brightness_level;
|
||||
}
|
||||
|
||||
ret = platform_driver_register(&fujitsupf_driver);
|
||||
if (ret)
|
||||
@@ -1050,7 +1050,8 @@ fail_hotkey:
|
||||
|
||||
fail_backlight:
|
||||
|
||||
backlight_device_unregister(fujitsu->bl_device);
|
||||
if (fujitsu->bl_device)
|
||||
backlight_device_unregister(fujitsu->bl_device);
|
||||
|
||||
fail_platform_device2:
|
||||
|
||||
@@ -1077,7 +1078,8 @@ static void __exit fujitsu_cleanup(void)
|
||||
&fujitsupf_attribute_group);
|
||||
platform_device_unregister(fujitsu->pf_device);
|
||||
platform_driver_unregister(&fujitsupf_driver);
|
||||
backlight_device_unregister(fujitsu->bl_device);
|
||||
if (fujitsu->bl_device)
|
||||
backlight_device_unregister(fujitsu->bl_device);
|
||||
|
||||
acpi_bus_unregister_driver(&acpi_fujitsu_driver);
|
||||
|
||||
|
||||
@@ -347,12 +347,16 @@ static int __init msi_init(void)
|
||||
|
||||
/* Register backlight stuff */
|
||||
|
||||
msibl_device = backlight_device_register("msi-laptop-bl", NULL, NULL,
|
||||
&msibl_ops);
|
||||
if (IS_ERR(msibl_device))
|
||||
return PTR_ERR(msibl_device);
|
||||
|
||||
msibl_device->props.max_brightness = MSI_LCD_LEVEL_MAX-1;
|
||||
if (acpi_video_backlight_support()) {
|
||||
printk(KERN_INFO "MSI: Brightness ignored, must be controlled "
|
||||
"by ACPI video driver\n");
|
||||
} else {
|
||||
msibl_device = backlight_device_register("msi-laptop-bl", NULL,
|
||||
NULL, &msibl_ops);
|
||||
if (IS_ERR(msibl_device))
|
||||
return PTR_ERR(msibl_device);
|
||||
msibl_device->props.max_brightness = MSI_LCD_LEVEL_MAX-1;
|
||||
}
|
||||
|
||||
ret = platform_driver_register(&msipf_driver);
|
||||
if (ret)
|
||||
|
||||
@@ -1038,7 +1038,11 @@ static int sony_nc_add(struct acpi_device *device)
|
||||
goto outinput;
|
||||
}
|
||||
|
||||
if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT", &handle))) {
|
||||
if (!acpi_video_backlight_support()) {
|
||||
printk(KERN_INFO DRV_PFX "Sony: Brightness ignored, must be "
|
||||
"controlled by ACPI video driver\n");
|
||||
} else if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT",
|
||||
&handle))) {
|
||||
sony_backlight_device = backlight_device_register("sony", NULL,
|
||||
NULL,
|
||||
&sony_backlight_ops);
|
||||
|
||||
@@ -4932,16 +4932,25 @@ static int __init brightness_init(struct ibm_init_struct *iibm)
|
||||
*/
|
||||
b = tpacpi_check_std_acpi_brightness_support();
|
||||
if (b > 0) {
|
||||
if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) {
|
||||
printk(TPACPI_NOTICE
|
||||
"Lenovo BIOS switched to ACPI backlight "
|
||||
"control mode\n");
|
||||
}
|
||||
if (brightness_enable > 1) {
|
||||
printk(TPACPI_NOTICE
|
||||
"standard ACPI backlight interface "
|
||||
"available, not loading native one...\n");
|
||||
return 1;
|
||||
|
||||
if (acpi_video_backlight_support()) {
|
||||
if (brightness_enable > 1) {
|
||||
printk(TPACPI_NOTICE
|
||||
"Standard ACPI backlight interface "
|
||||
"available, not loading native one.\n");
|
||||
return 1;
|
||||
} else if (brightness_enable == 1) {
|
||||
printk(TPACPI_NOTICE
|
||||
"Backlight control force enabled, even if standard "
|
||||
"ACPI backlight interface is available\n");
|
||||
}
|
||||
} else {
|
||||
if (brightness_enable > 1) {
|
||||
printk(TPACPI_NOTICE
|
||||
"Standard ACPI backlight interface not "
|
||||
"available, thinkpad_acpi native "
|
||||
"brightness control enabled\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user