summaryrefslogtreecommitdiff
path: root/drivers/acpi/video.c
AgeCommit message (Collapse)Author
2009-01-09Merge branch 'misc' into releaseLen Brown
Conflicts: include/acpi/acpixf.h Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30video: always update the brightness when poking "brightness"Zhang Rui
always update props.brightness no matter the backlight is changed via procfs, hotkeys or sysfs. Sighed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-11ACPI: video: Fix reversed brightness behavior on ThinkPad SL seriesZhang Rui
Section B.6.2 of ACPI 3.0b specification that defines _BCL method doesn't require the brightness levels returned to be sorted. At least ThinkPad SL300 (and probably all IdeaPads) returns the array reversed (i.e. bightest levels have lowest indexes), which causes the brightness management behave in completely reversed manner on these machines (brightness increases when the laptop is idle, while the display dims when used). Sorting the array by brightness level values after reading the list fixes the issue. http://bugzilla.kernel.org/show_bug.cgi?id=12037 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-11Merge branch 'video' into releaseLen Brown
Conflicts: Documentation/kernel-parameters.txt Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-07ACPI video: if no ACPI backlight support, use vendor driversThomas Renninger
If an ACPI graphics device supports backlight brightness functions (cmp. with latest ACPI spec Appendix B), let the ACPI video driver control backlight and switch backlight control off in vendor specific ACPI drivers (asus_acpi, thinkpad_acpi, eeepc, fujitsu_laptop, msi_laptop, sony_laptop, acer-wmi). Currently it is possible to load above drivers and let both poke on the brightness HW registers, the video and vendor specific ACPI drivers -> bad. This patch provides the basic support to check for BIOS capabilities before driver loading time. Driver specific modifications are in separate follow up patches. "acpi_backlight=vendor" Prever vendor driver over ACPI driver for backlight. "acpi_backlight=video" (default) Prever ACPI driver over vendor driver for backlight. Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-07ACPI: video: Ignore devices that aren't present in hardwareThomas Renninger
This is a reimplemention of commit 0119509c4fbc9adcef1472817fda295334612976 from Matthew Garrett <mjg59@srcf.ucam.org> This patch got removed because of a regression: ThinkPads with a Intel graphics card and an Integrated Graphics Device BIOS implementation stopped working. In fact, they only worked because the ACPI device of the discrete, the wrong one, got used (via int10). So ACPI functions were poking on the wrong hardware used which is a sever bug. The next patch provides support for above ThinkPads to be able to switch brightness via the legacy thinkpad_acpi driver and automatically detect when to use it. Original commit message from Matthew Garrett: Vendors often ship machines with a choice of integrated or discrete graphics, and use the same DSDT for both. As a result, the ACPI video module will locate devices that may not exist on this specific platform. Attempt to determine whether the device exists or not, and abort the device creation if it doesn't. http://bugzilla.kernel.org/show_bug.cgi?id=9614 Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-07ACPI: consolidate ACPI_*_COMPONENT definitions in acpi_drivers.hBjorn Helgaas
Move all the component definitions for drivers to a single shared place, include/acpi/acpi_drivers.h. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-06ACPI: remove comments about debug layer/level to useBjorn Helgaas
I don't think there's any point in cluttering the code with these. Better to improve the documentation so *anybody* can figure out what layer & level to use. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-10-22Merge branch 'ull' into testLen Brown
Conflicts: drivers/acpi/bay.c drivers/acpi/dock.c drivers/ata/libata-acpi.c Signed-off-by: Len Brown <len.brown@intel.com>
2008-10-22Merge branch 'misc' into testLen Brown
2008-10-22ACPI: replace ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ...) with printkLin Ming
ACPI_DB_ERROR and ACPI_DB_WARN were removed from ACPICA core. So replace ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ...) with printk(KERN_ERR PREFIX ...) and ACPI_DEBUG_PRINT((ACPI_DB_WARN, ...) with printk(KERN_WARNING PREFIX ...) We do not use ACPI_ERROR/ACPI_WARNING since they're not exported, see ------------------------------------------------------------- commit 6468463abd7051fcc29f3ee7c931f9bbbb26f5a4 Author: Len Brown <len.brown@intel.com> Date: Mon Jun 26 23:41:38 2006 -0400 ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...) Signed-off-by: Len Brown <len.brown@intel.com> ------------------------------------------------------------- Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-10-11ACPI: Change acpi_evaluate_integer to support 64-bit on 32-bit kernelsMatthew Wilcox
As of version 2.0, ACPI can return 64-bit integers. The current acpi_evaluate_integer only supports 64-bit integers on 64-bit platforms. Change the argument to take a pointer to an acpi_integer so we support 64-bit integers on all platforms. lenb: replaced use of "acpi_integer" with "unsigned long long" lenb: fixed bug in acpi_thermal_trips_update() Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-10-10ACPI: catch calls of acpi_driver_data on pointer of wrong typePavel Machek
Catch attempts to use of acpi_driver_data on pointers of wrong type. akpm: rewritten to use proper C typechecking and remove the "function"-used-as-lvalue thing. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2008-07-24Merge branch 'release-2.6.27' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6 * 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6: acpi: fix crash in core ACPI code, triggered by CONFIG_ACPI_PCI_SLOT=y ACPI: thinkpad-acpi: don't misdetect in get_thinkpad_model_data() on -ENOMEM ACPI: thinkpad-acpi: bump up version to 0.21 ACPI: thinkpad-acpi: add bluetooth and WWAN rfkill support ACPI: thinkpad-acpi: WLSW overrides other rfkill switches ACPI: thinkpad-acpi: prepare for bluetooth and wwan rfkill support ACPI: thinkpad-acpi: consolidate wlsw notification function ACPI: thinkpad-acpi: minor refactor on radio switch init Revert "ACPI: don't walk tables if ACPI was disabled" Revert "dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled." Revert "Fix FADT parsing" ACPI : Set FAN device to correct state in boot phase ACPI: Ignore _BQC object when registering backlight device ACPI: stop complaints about interrupt link End Tags and blank IRQ descriptors
2008-07-21driver core: fix a lot of printk usages of bus_idGreg Kroah-Hartman
We have the dev_printk() variants for this kind of thing, use them instead of directly trying to access the bus_id field of struct device. This is done in order to remove bus_id entirely. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-18ACPI: Ignore _BQC object when registering backlight deviceZhao Yakui
According to acpi spec , the objectes of _BCL and _BCM are required if integrated LCD is present and supports brightness level and the _BQC is the optional object. So the _BQC object will be ignored when the backlight device is registered. At the same time when there is no _BQC object, the current brightness will be set to the maximum. http://bugzilla.kernel.org/show_bug.cgi?id=10206 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-07-16ACPI: video: fix brightness allocationJulia Jomantaite
Fix use of uninitialized device->brightness. Signed-off-by: Julia Jomantaite <julia.jomantaite@gmail.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-06-14ACPI Exception (video-1721): UNKNOWN_STATUS_CODE, Cant attach deviceZhang Rui
The child of a video bus device is not alway a video device. It should be a warn message rather than an exception here. http://bugzilla.kernel.org/show_bug.cgi?id=9761 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-30Fix ACPI vs proc_create_data() mismergeAlexey Dobriyan
acpi_device_dir() is NULL until all files are createst, so everyting is created in straight in /proc/ and creation code warns. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-30Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (179 commits) ACPI: Fix acpi_processor_idle and idle= boot parameters interaction acpi: fix section mismatch warning in pnpacpi intel_menlo: fix build warning ACPI: Cleanup: Remove unneeded, multiple local dummy variables ACPI: video - fix permissions on some proc entries ACPI: video - properly handle errors when registering proc elements ACPI: video - do not store invalid entries in attached_array list ACPI: re-name acpi_pm_ops to acpi_suspend_ops ACER_WMI/ASUS_LAPTOP: fix build bug thinkpad_acpi: fix possible NULL pointer dereference if kstrdup failed ACPI: check a return value correctly in acpi_power_get_context() #if 0 acpi/bay.c:eject_removable_drive() eeepc-laptop: add hwmon fan control eeepc-laptop: add backlight eeepc-laptop: add base driver ACPI: thinkpad-acpi: bump up version to 0.20 ACPI: thinkpad-acpi: fix selects in Kconfig ACPI: thinkpad-acpi: use a private workqueue ACPI: thinkpad-acpi: fluff really minor fix ACPI: thinkpad-acpi: use uppercase for "LED" on user documentation ... Fixed conflicts in drivers/acpi/video.c and drivers/misc/intel_menlow.c manually.
2008-04-30Merge branches 'release', 'acpica', 'bugzilla-10224', 'bugzilla-9772', ↵Len Brown
'bugzilla-9916', 'ec', 'eeepc', 'idle', 'misc', 'pm-legacy', 'sysfs-links-2.6.26', 'thermal', 'thinkpad' and 'video' into release
2008-04-29acpi: use non-racy method for proc entries creationDenis V. Lunev
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Len Brown <lenb@kernel.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29ACPI: video - fix permissions on some proc entriesDmitry Torokhov
POST and DOS are supposed to be writable but permissions did not allow it. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29ACPI: video - properly handle errors when registering proc elementsDmitry Torokhov
Have acpi_video_device_add_fs() and acpi_video_bus_add_fs() properly unwind proc creation after error. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29ACPI: video - do not store invalid entries in attached_array listDmitry Torokhov
this is a cleanup, not a change to function. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29ACPI: elide a non-zero test on a result that is never 0Julia Lawall
thermal_cooling_device_register used to return NULL if THERMAL is "n". As the ACPI fan, processor and video drivers SELECT the generic thermal in PATCH 01, this is not a problem any more. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-05Revert "ACPI: Ignore _BQC object when registering backlight device"Linus Torvalds
This reverts commit 7c0ea45be4f114d85ee35caeead8e1660699c46f which caused a regression with the backlight being set to off when a laptop doesn't have a _BQC entry to query the actual backlight value. The code blindly then falls back on a value of 0. See http://bugzilla.kernel.org/show_bug.cgi?id=10387 http://lkml.org/lkml/2008/4/2/366 for details. Bisected-and-reported-by: Andrey Borzenkov <arvidjaar@mail.ru> Cc: Zhao Yakui <yakui.zhao@intel.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Len Brown <len.brown@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-28revert "ACPI: drivers/acpi: elide a non-zero test on a result that is never 0"Ingo Molnar
Revert commit 1192aeb957402b45f311895f124e4ca41206843c ("ACPI: drivers/acpi: elide a non-zero test on a result that is never 0") because it turns out that thermal_cooling_device_register() does actually return NULL if CONFIG_THERMAL is turned off (then the routine turns into a dummy inline routine in the header files that returns NULL unconditionally). This was found with randconfig testing, causing a crash during bootup: initcall 0x78878534 ran for 13 msecs: acpi_button_init+0x0/0x51() Calling initcall 0x78878585: acpi_fan_init+0x0/0x2c() BUG: unable to handle kernel NULL pointer dereference at 00000000 IP: [<782b8ad0>] acpi_fan_add+0x7d/0xfd *pde = 00000000 Oops: 0000 [#1] Modules linked in: Pid: 1, comm: swapper Not tainted (2.6.25-rc7-sched-devel.git-x86-latest.git #14) EIP: 0060:[<782b8ad0>] EFLAGS: 00010246 CPU: 0 EIP is at acpi_fan_add+0x7d/0xfd EAX: b787c718 EBX: b787c400 ECX: b782ceb4 EDX: 00000007 ESI: 00000000 EDI: b787c6f4 EBP: b782cee0 ESP: b782cecc DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 Process swapper (pid: 1, ti=b782c000 task=b7846000 task.ti=b782c000) Stack: b787c459 00000000 b787c400 78790888 b787c60c b782cef8 782b6fb8 ffffffda b787c60c 00000000 78790958 b782cf0c 783005d7 b787c60c 78790958 78790584 b782cf1c 783007f6 b782cf28 00000000 b782cf40 782ffc4a 78790958 b794d558 Call Trace: [<782b6fb8>] ? acpi_device_probe+0x3e/0xdb [<783005d7>] ? driver_probe_device+0x82/0xfc [<783007f6>] ? __driver_attach+0x3a/0x70 [<782ffc4a>] ? bus_for_each_dev+0x3e/0x60 [<7830048c>] ? driver_attach+0x14/0x16 [<783007bc>] ? __driver_attach+0x0/0x70 [<7830006a>] ? bus_add_driver+0x9d/0x1b0 [<783008c3>] ? driver_register+0x47/0xa3 [<7813db00>] ? timespec_to_ktime+0x9/0xc [<782b7331>] ? acpi_bus_register_driver+0x3a/0x3c [<78878592>] ? acpi_fan_init+0xd/0x2c [<78863656>] ? kernel_init+0xac/0x1f9 [<788635aa>] ? kernel_init+0x0/0x1f9 [<78114563>] ? kernel_thread_helper+0x7/0x10 ======================= Code: 6e 78 e8 57 44 e7 ff 58 e9 93 00 00 00 8b 55 f0 8d bb f4 02 00 00 80 4b 2d 10 8b 03 e8 87 cb ff ff 8d 83 18 03 00 00 80 63 2d ef <ff> 35 00 00 00 00 50 68 e8 9c 6e 78 e8 22 44 e7 ff b9 b6 9c 6e EIP: [<782b8ad0>] acpi_fan_add+0x7d/0xfd SS:ESP 0068:b782cecc ---[ end trace 778e504de7e3b1e3 ]--- Kernel panic - not syncing: Attempted to kill init! Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Julia Lawall <julia@diku.dk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-27ACPI: drivers/acpi: elide a non-zero test on a result that is never 0Julia Lawall
The function thermal_cooling_device_register always returns either a valid pointer or a value made with ERR_PTR, so a test for non-zero on the result will always succeed. The problem was found using the following semantic match. (http://www.emn.fr/x-info/coccinelle/) //<smpl> @a@ expression E, E1; statement S,S1; position p; @@ E = thermal_cooling_device_register(...) ... when != E = E1 if@p (E) S else S1 @n@ position a.p; expression E,E1; statement S,S1; @@ E = NULL ... when != E = E1 if@p (E) S else S1 @depends on !n@ expression E; statement S,S1; position a.p; @@ * if@p (E) S else S1 //</smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-18Revert "ACPI: video: Ignore devices that aren't present in hardware"Len Brown
This reverts commit 0119509c4fbc9adcef1472817fda295334612976. http://bugzilla.kernel.org/show_bug.cgi?id=9995 Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-18Revert "ACPI: video: Ignore ACPI video devices that aren't present in hardware"Len Brown
This reverts commit 3fa2cdcc45a0176de15cac9dbf4ed2834ebf8932. http://bugzilla.kernel.org/show_bug.cgi?id=9995 Signed-off-by: Len Brown <len.brown>
2008-03-13Merge branches 'release', 'button-sysfs', 'misc', 'mismatch', 'randconfig' ↵Len Brown
and 'toshiba' into release
2008-03-11ACPI: Ignore _BQC object when registering backlight deviceZhao Yakui
According to acpi spec , the objects of _BCL and _BCM are required if integrated LCD is present and supports brightness level .The _BQC is the optional object. So the _BQC object is ignored when the backlight device is registered in ACPI video driver. http://bugzilla.kernel.org/show_bug.cgi?id=10206 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-11ACPI: replace remaining __FUNCTION__ occurrencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-15ACPI video: check for error from thermal_cooling_device_registerThomas Sujith
Need to check whether thermal_cooling_device_register returned ERROR or not. Signed-off-by: Thomas Sujith <sujith.thomas@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07Merge branches 'release' and 'video' into releaseLen Brown
Conflicts: include/acpi/acpi_bus.h Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07ACPI: video: Ignore ACPI video devices that aren't present in hardwareMatthew Garrett
Vendors often ship machines with a choice of integrated or discrete graphics, and use the same DSDT for both. As a result, the ACPI video module will locate devices that may not exist on this specific platform. Attempt to determine whether the device exists or not, and abort the device creation if it do not exist. Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07ACPI: video: reset brightness on resumeMatthew Garrett
Some machines seem to need the backlight brightness to be reset on resume. Add support for doing so to the video module. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07ACPI: video: call ACPI notifier chain for ACPI video notificationsZhang Rui
Call notifier chain for display/brightness switch events. The kernel mode graphics driver is interested in this. Sign-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07ACPI: video: delete unused display switch on hotkey event codeZhang Rui
Display switching via ACPI control methods are not known to work on any platforms. Further, the X community wants to control the display switching all by themselves without BIOS/AML involvement. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07ACPI: video: create "brightness_switch_enabled" modparamZhang Rui
Introduce new module parameter for brightness control. "brightness_switch_enabled" is set by default which means nothing changes upon brightness switch events. When "brightness_switch_enabled" is cleared via "echo 0 > /sys/module/video/parameters/brightness_switch_enabled", ACPI will not try to change the brightness level any more. Either X will take charge of this or users can change the brightness level by poking /sys/class/backlight/acpi_videoX/... Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07Merge branches 'release' and 'menlo' into releaseLen Brown
Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07Merge branches 'release', 'bugzilla-6217', 'bugzilla-6629', 'bugzilla-6933', ↵Len Brown
'bugzilla-7186', 'bugzilla-8269', 'bugzilla-8570', 'bugzilla-9139', 'bugzilla-9277', 'bugzilla-9341', 'bugzilla-9444', 'bugzilla-9614', 'bugzilla-9643' and 'bugzilla-9644' into release
2008-02-02ACPI: video: Ignore devices that aren't present in hardwareMatthew Garrett
Vendors often ship machines with a choice of integrated or discrete graphics, and use the same DSDT for both. As a result, the ACPI video module will locate devices that may not exist on this specific platform. Attempt to determine whether the device exists or not, and abort the device creation if it doesn't. http://bugzilla.kernel.org/show_bug.cgi?id=9614 Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01ACPI: register ACPI Video LCD as generic thermal cooling deviceZhang Rui
Register ACPI video device as thermal cooling devices as they may be listed in _TZD method and the backlight control can be used for throttling. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Thomas Sujith <sujith.thomas@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01ACPI: video: Rationalise ACPI backlight implementationMatthew Garrett
The sysfs backlight class provides no mechanism for querying the acceptable brightness for a backlight. The ACPI spec states that values are only valid if they are reported as available by the firmware. Since we can't provide that information to userspace, instead collapse the range to the number of actual values that can be set. http://bugzilla.kernel.org/show_bug.cgi?id=9277 Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-13ACPI: video_device_list corruptionWilliam Lee Irwin III
The ->cap fields of struct acpi_video_device and struct acpi_video_bus are 1B each, not 4B. The oversized memset()'s corrupted the subsequent list_head fields. This resulted in silent corruption without CONFIG_DEBUG_LIST and BUG's with it. This patch uses sizeof() to pass the proper bounds to the memset() calls and thereby correct the bugs. Signed-off-by: William Irwin <wli@holomorphy.com> Acked-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-19ACPI: Video: Increase buffer size for writes to brightness proc file.Danny Baumann
In order to be able to write the value "100" to /proc/acpi/video/.../brightness, we have to allocate 5 bytes: 4 characters will be written (1, 0, 0 plus null byte), and 1 byte should be buffer for a terminating NULL character. http://bugzilla.kernel.org/show_bug.cgi?id=9278 Signed-off-by: Danny Baumann <dannybaumann@web.de> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-14ACPI: video - delete stray run-time printkLen Brown
printk("video bus notify\n"); Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-14ACPI: video - convert semaphore to a mutexDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>