acpi_video.c (93a291dfaf9c328ca5a9cea1733af1a128efe890) acpi_video.c (7ee33baabcae765e1eda73b988a62fe102c0ce76)
1/*
2 * video.c - ACPI Video Driver
3 *
4 * Copyright (C) 2004 Luming Yu <luming.yu@intel.com>
5 * Copyright (C) 2004 Bruno Ducrot <ducrot@poupinou.org>
6 * Copyright (C) 2006 Thomas Tuttle <linux-kernel@ttuttle.net>
7 *
8 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- 369 unchanged lines hidden (view full) ---

378}
379
380/*
381 * For some buggy _BQC methods, we need to add a constant value to
382 * the _BQC return value to get the actual current brightness level
383 */
384
385static int bqc_offset_aml_bug_workaround;
1/*
2 * video.c - ACPI Video Driver
3 *
4 * Copyright (C) 2004 Luming Yu <luming.yu@intel.com>
5 * Copyright (C) 2004 Bruno Ducrot <ducrot@poupinou.org>
6 * Copyright (C) 2006 Thomas Tuttle <linux-kernel@ttuttle.net>
7 *
8 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- 369 unchanged lines hidden (view full) ---

378}
379
380/*
381 * For some buggy _BQC methods, we need to add a constant value to
382 * the _BQC return value to get the actual current brightness level
383 */
384
385static int bqc_offset_aml_bug_workaround;
386static int __init video_set_bqc_offset(const struct dmi_system_id *d)
386static int video_set_bqc_offset(const struct dmi_system_id *d)
387{
388 bqc_offset_aml_bug_workaround = 9;
389 return 0;
390}
391
387{
388 bqc_offset_aml_bug_workaround = 9;
389 return 0;
390}
391
392static int __init video_disable_backlight_sysfs_if(
392static int video_disable_backlight_sysfs_if(
393 const struct dmi_system_id *d)
394{
395 if (disable_backlight_sysfs_if == -1)
396 disable_backlight_sysfs_if = 1;
397 return 0;
398}
399
393 const struct dmi_system_id *d)
394{
395 if (disable_backlight_sysfs_if == -1)
396 disable_backlight_sysfs_if = 1;
397 return 0;
398}
399
400static struct dmi_system_id video_dmi_table[] __initdata = {
400static struct dmi_system_id video_dmi_table[] = {
401 /*
402 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
403 */
404 {
405 .callback = video_set_bqc_offset,
406 .ident = "Acer Aspire 5720",
407 .matches = {
408 DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),

--- 1563 unchanged lines hidden (view full) ---

1972 * don't register the acpi_vide_bus again and return no error.
1973 */
1974 return 0;
1975 }
1976
1977 mutex_init(&video_list_lock);
1978 INIT_LIST_HEAD(&video_bus_head);
1979
401 /*
402 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
403 */
404 {
405 .callback = video_set_bqc_offset,
406 .ident = "Acer Aspire 5720",
407 .matches = {
408 DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),

--- 1563 unchanged lines hidden (view full) ---

1972 * don't register the acpi_vide_bus again and return no error.
1973 */
1974 return 0;
1975 }
1976
1977 mutex_init(&video_list_lock);
1978 INIT_LIST_HEAD(&video_bus_head);
1979
1980 dmi_check_system(video_dmi_table);
1981
1980 ret = acpi_bus_register_driver(&acpi_video_bus);
1981 if (ret)
1982 return ret;
1983
1984 /*
1985 * When the acpi_video_bus is loaded successfully, increase
1986 * the counter reference.
1987 */

--- 49 unchanged lines hidden (view full) ---

2037 * old systems without an AcpiOpRegion.
2038 *
2039 * acpi_video_register() will report -ENODEV later as well due
2040 * to acpi_disabled when i915.ko tries to register itself afterwards.
2041 */
2042 if (acpi_disabled)
2043 return 0;
2044
1982 ret = acpi_bus_register_driver(&acpi_video_bus);
1983 if (ret)
1984 return ret;
1985
1986 /*
1987 * When the acpi_video_bus is loaded successfully, increase
1988 * the counter reference.
1989 */

--- 49 unchanged lines hidden (view full) ---

2039 * old systems without an AcpiOpRegion.
2040 *
2041 * acpi_video_register() will report -ENODEV later as well due
2042 * to acpi_disabled when i915.ko tries to register itself afterwards.
2043 */
2044 if (acpi_disabled)
2045 return 0;
2046
2045 dmi_check_system(video_dmi_table);
2046
2047 if (intel_opregion_present())
2048 return 0;
2049
2050 return acpi_video_register();
2051}
2052
2053static void __exit acpi_video_exit(void)
2054{
2055 acpi_video_detect_exit();
2056 acpi_video_unregister();
2057
2058 return;
2059}
2060
2061module_init(acpi_video_init);
2062module_exit(acpi_video_exit);
2047 if (intel_opregion_present())
2048 return 0;
2049
2050 return acpi_video_register();
2051}
2052
2053static void __exit acpi_video_exit(void)
2054{
2055 acpi_video_detect_exit();
2056 acpi_video_unregister();
2057
2058 return;
2059}
2060
2061module_init(acpi_video_init);
2062module_exit(acpi_video_exit);