summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video.c
Commit message (Collapse)AuthorAgeFilesLines
...
| |
| \
| \
| \
*---. \ Merge branches 'release', 'button-sysfs', 'misc', 'mismatch', 'randconfig' ↵Len Brown2008-03-131-1/+1
|\ \ \ \ | | |_|/ | |/| | | | | | and 'toshiba' into release
| | * | ACPI: replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-03-111-1/+1
| |/ / | | | | | | | | | | | | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
* / / ACPI: Ignore _BQC object when registering backlight deviceZhao Yakui2008-03-111-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | 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>
* / ACPI video: check for error from thermal_cooling_device_registerThomas Sujith2008-02-151-0/+3
|/ | | | | | | | 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>
* Merge branches 'release' and 'video' into releaseLen Brown2008-02-071-69/+66
|\ | | | | | | | | | | | | | | Conflicts: include/acpi/acpi_bus.h Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: video: Ignore ACPI video devices that aren't present in hardwareMatthew Garrett2008-02-071-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ACPI: video: reset brightness on resumeMatthew Garrett2008-02-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | 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>
| * ACPI: video: call ACPI notifier chain for ACPI video notificationsZhang Rui2008-02-071-0/+2
| | | | | | | | | | | | | | | | 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>
| * ACPI: video: delete unused display switch on hotkey event codeZhang Rui2008-02-071-63/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
| * ACPI: video: create "brightness_switch_enabled" modparamZhang Rui2008-02-071-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branches 'release' and 'menlo' into releaseLen Brown2008-02-071-1/+77
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown <len.brown@intel.com>
| * | ACPI: register ACPI Video LCD as generic thermal cooling deviceZhang Rui2008-02-011-1/+77
| |/ | | | | | | | | | | | | | | | | 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>
| |
| \
| \
| \
| \
| \
*-----. \ Merge branches 'release', 'bugzilla-6217', 'bugzilla-6629', 'bugzilla-6933', ↵Len Brown2008-02-071-7/+42
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | 'bugzilla-7186', 'bugzilla-8269', 'bugzilla-8570', 'bugzilla-9139', 'bugzilla-9277', 'bugzilla-9341', 'bugzilla-9444', 'bugzilla-9614', 'bugzilla-9643' and 'bugzilla-9644' into release
| | | | * ACPI: video: Ignore devices that aren't present in hardwareMatthew Garrett2008-02-021-0/+29
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * ACPI: video: Rationalise ACPI backlight implementationMatthew Garrett2008-02-011-7/+13
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ACPI: video_device_list corruptionWilliam Lee Irwin III2007-12-131-2/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | 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>
* | ACPI: Video: Increase buffer size for writes to brightness proc file.Danny Baumann2007-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ACPI: video - delete stray run-time printkLen Brown2007-11-141-3/+0
| | | | | | | | | | | | | | printk("video bus notify\n"); Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: video - convert semaphore to a mutexDmitry Torokhov2007-11-141-10/+11
| | | | | | | | | | | | 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>
* | ACPI: video - remove unsafe uses of list_for_each_safe()Dmitry Torokhov2007-11-141-37/+34
| | | | | | | | | | | | | | | | | | | | list_for_each_safe() only protects list from list alterations performed by the same thread. One still needs to implement proper locking when list is being accessed from several threads. 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>
* | ACPI: video - add missing input_free_device()Dmitry Torokhov2007-11-141-35/+34
| | | | | | | | | | | | | | | | | | | | | | If input_register_device() fails input_free_device() must be called to release memory allocated for the device. Also consolidate error handling in acpi_bus_video_add() and handle input_allocate_device() failures. 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>
* | ACPI: video - fit input device into sysfs treeDmitry Torokhov2007-11-141-1/+2
|/ | | | | | | | Properly set up parent on input device registered by the video driver. 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>
* Merge branch 'release' of ↵Linus Torvalds2007-10-191-8/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (41 commits) ACPICA: hw: Don't carry spinlock over suspend ACPICA: hw: remove use_lock flag from acpi_hw_register_{read, write} ACPI: cpuidle: port idle timer suspend/resume workaround to cpuidle ACPI: clean up acpi_enter_sleep_state_prep Hibernation: Make sure that ACPI is enabled in acpi_hibernation_finish ACPI: suppress uninitialized var warning cpuidle: consolidate 2.6.22 cpuidle branch into one patch ACPI: thinkpad-acpi: skip blanks before the data when parsing sysfs ACPI: AC: Add sysfs interface ACPI: SBS: Add sysfs alarm ACPI: SBS: Add ACPI_PROCFS around procfs handling code. ACPI: SBS: Add support for power_supply class (and sysfs) ACPI: SBS: Make SBS reads table-driven. ACPI: SBS: Simplify data structures in SBS ACPI: SBS: Split host controller (ACPI0001) from SBS driver (ACPI0002) ACPI: EC: Add new query handler to list head. ACPI: Add acpi_bus_generate_event4() function ACPI: Battery: add sysfs alarm ACPI: Battery: Add sysfs support ACPI: Battery: Misc clean-ups, no functional changes ... Fix up conflicts in drivers/misc/thinkpad_acpi.[ch] manually
| * Pull video into release branchLen Brown2007-10-101-8/+22
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown <len.brown@intel.com>
| | * ACPI: VIDEO: Adjust current level to closest available one.Alexey Starikovskiy2007-09-051-1/+12
| | | | | | | | | | | | | | | Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
| | * ACPI: video: Don't call absent methodsAlexey Starikovskiy2007-09-051-8/+10
| | | | | | | | | | | | | | | | | | Signed-off-by: Ryan May <rmay@ou.edu> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | | Convert from class_device to device for drivers/videotonyj@suse.de2007-10-121-2/+2
|/ / | | | | | | | | | | | | | | | | | | Convert from class_device to device for drivers/video. Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | ACPI: video: remove dmesg spamMaik Broemme2007-09-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i am actually heavily using the ACPI video extension for my Thinkpad X61 Tablet. I have bound the input events triggered by the brightness up/down keys to a simple echo <value> > /sys/class/backlight/acpi_video1/brightness but everytime the event is triggered and acpi_video_device_lcd_set_level() is called i got a notificication in my kernel log like: set_level status: 0 set_level status: 0 set_level status: 0 set_level status: 0 ... Signed-off-by: Maik Broemme <mbroemme@plusserver.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: video: _DOS=0 by default to prevent hotkey hangZhang Rui2007-09-181-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | In the past, the Linux/ACPI video driver invoked _DOS (Display Output Switch) with the parameter 1 to tell the BIOS to switch the video output display for us. But this conflicts with Linux native graphics drivers, and can cause all sorts of issues, including hanging the system. http://bugzilla.kernel.org/show_bug.cgi?id=6001 Here we change the Linux default to evaluate _DOS=0, which tells the BIOS to simply send us a hotkey event and not touch the graphics hardware. The acpi video driver sends the display switch hotkey event up through the intput layer, and X can interpret that and use its native graphics driver to switch the display. For the case where Linux has no native graphics driver running, or the graphics driver doesn't know how to switch video and the BIOS (safely) does, the previous behaviour can be restored with: # echo 1 > /proc/acpi/video/*/DOS Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull bugzilla-8798 into release branchLen Brown2007-08-251-0/+8
|\
| * ACPI: work around duplicate name "VID" problem on T61Zhang Rui2007-08-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This can only fix the problem that more than one video bus device have the same AML name "VID". ie. the proc I/F for the second "VID" video bus device is located under /proc/acpi/video/VID1/... As this is really rare and the ACPI proc I/F is a legacy feature that we are planning to remove. We won't provide a generic solution for this problem. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull events into release branchLen Brown2007-08-251-10/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown <len.brown@intel.com>
| * | ACPI: Schedule /proc/acpi/event for removalLen Brown2007-08-231-5/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | Schedule /proc/acpi/event for removal in 6 months. Re-name acpi_bus_generate_event() to acpi_bus_generate_proc_event() to make sure there is no confusion that it is for /proc/acpi/event only. Add CONFIG_ACPI_PROC_EVENT to allow removal of /proc/acpi/event. There is no functional change if CONFIG_ACPI_PROC_EVENT=y Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI video hotkey: export missing ACPI video hotkey events via input layerLuming Yu2007-08-241-1/+88
| | | | | | | | | | | | Signed-off-by: Yu Luming <luming.yu@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI video hotkey: remove invalid events handler for video output devicesZhang Rui2007-08-231-4/+0
|/ | | | | | | | | | | | Both ACPI_VIDEO_NOTIFY_SWITCH and ACPI_VIDEO_NOTIFY_PROBE are valid for video bus devices only. Actually ACPI video output device should never be notified for a output device switch/probe. ACPI bus devices notify handler already has the code to handle these kinds of events. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI ↵Thomas Renninger2007-07-231-1/+7
| | | | | | | | | | drivers modpost is going to use these to create e.g. acpi:ACPI0001 in modules.alias. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlightLinus Torvalds2007-07-221-2/+2
|\ | | | | | | | | | | | | * 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight: leds: cr_bllcd.c: build fix backlight: Convert from struct class_device to struct device backlight: Fix order of Kconfig entries
| * backlight: Convert from struct class_device to struct deviceRichard Purdie2007-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert the backlight and LCD classes from struct class_device to struct device since class_device is scheduled for removal. One nasty API break is the backlight power attribute has had to be renamed to bl_power and the LCD power attribute has had to be renamed to lcd_power since the original names clash with the core. I can't see a way around this. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
* | ACPI video: Don't export sysfs backlight interface if query _BCL failDanny Kukawka2007-07-031-38/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the acpi video module export the backlight interface to sysfs also if acpi_video_device_lcd_query_levels() fails to read _BLC method (e.g. because the method is not available). In this case the userspace don't know which brightness level are supported and can't set a brightness level (echo return with: "write error: Invalid Argument"). This happend e.g. on a ASUS RF1 (correct supported by the asus-laptop module). The video module should not export the backlight interface if query _BLC fail, because you can't set anything from userspace and this make it useless. http://bugzilla.kernel.org/show_bug.cgi?id=8375 Signed-off-by: Danny Kukawka <dkukawka@suse.de> Acked-by: Luming Yu <luming.yu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: video: output switch sysfs supportLuming Yu2007-05-091-0/+40
|/ | | | | | | | | | | | | | | | | | | | | | | | Requires CONFIG_VIDEO_OUTPUT_CONTROL and CONFIG_ACPI_VIDEO. After loading output.ko and video.ko, you would have /sys/class/video_output and several device acpi_videoNum there. For example, I got acpi_video0, acpi_video1,acpi_video2,and acpi_video3 under /sys/class/video_output on my T40. I can query the status of output device0 by running " cat /sys/class/video_output/acpi_video0 " The return value is defined in ACPI SPEC B.5.5 _DCS(Return the Status of Output Device). Also you can turn off video1 and turn on video0 by " echo 0 > acpi_video1; echo 0x80000000 > acpi_video0". Please reference ACPI SPEC B.5.7 _DSS for the parameter definition. Please note that it may or may NOT works purely depending on if your vendor providing correct ACPI video extension support in bios. the driver output.ko and video.ko just works like a interface to invoke BIOS. Signed-off-by: Luming Yu <Luming.yu@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: video: Fix spelling and grammar mistakesJulius Volz2007-03-091-19/+19
| | | | | | | | Correct some of the most obvious spelling and grammar mistakes in drivers/acpi/video.c (comments and printk output). Signed-off-by: Julius Volz <juliusrv@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
* backlight: Separate backlight properties from backlight ops pointersRichard Purdie2007-02-201-23/+12
| | | | | | | | | Per device data such as brightness belongs to the indivdual device and should therefore be separate from the the backlight operation function pointers. This patch splits the two types of data and allows simplifcation of some code. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
* backlight: Remove unneeded owner fieldRichard Purdie2007-02-201-1/+0
| | | | | | | | | | | | Remove uneeded owner field from backlight_properties structure. Nothing uses it and it is unlikely that it will ever be used. The backlight class uses other means to ensure that nothing references unloaded code. Based on a patch from Dmitry Torokhov <dtor@insightbb.com> Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
* ACPI: delete extra #defines in /drivers/acpi/ driversLen Brown2007-02-121-2/+1
| | | | | | | | | Cosmetic only. Except in a single case, #define ACPI_*_DRIVER_NAME were invoked 0 or 1 times. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: fix acpi_driver.name usageLen Brown2007-02-121-1/+1
| | | | | | | | | | | | | | | | | | | It was erroneously used as a description rather than a name. ie. turn this: lenb@se7525gp2:/sys> ls bus/acpi/drivers ACPI AC Adapter Driver ACPI Embedded Controller Driver ACPI Power Resource Driver ACPI Battery Driver ACPI Fan Driver ACPI Processor Driver ACPI Button Driver ACPI PCI Interrupt Link Driver ACPI Thermal Zone Driver ACPI container driver ACPI PCI Root Bridge Driver hpet into this: lenb@se7525gp2:~> ls /sys/bus/acpi/drivers ac battery button container ec fan hpet pci_link pci_root power processor thermal Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: clean up ACPI_MODULE_NAME() useLen Brown2007-02-121-2/+2
| | | | | | | | | | cosmetic only Make "module name" actually match the file name. Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care. Fix indentation where Lindent did get confused. Signed-off-by: Len Brown <len.brown@intel.com>
* Pull sysfs into test branchLen Brown2007-02-031-36/+1
|\ | | | | | | | | | | | | | | | | Conflicts: Documentation/feature-removal-schedule.txt include/acpi/acpi_drivers.h Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: Set fake hid for non-PNPID ACPI devicesZhang Rui2006-12-151-36/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We do this mainly because: 1. hid is used to match ACPI devices and drivers. .match method which is incompatible to driver model can be deleted from acpi_driver.ops then. 2. As the .uevent method mark ACPI drivers by PNPID, fake hid is set to non-PNPID devices so that udev script can load the right ACPI driver by looking for "HWID = " or "COMPTID = ". Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull bugzilla-7349 into test branchLen Brown2007-02-021-15/+43
|\ \
| * | ACPI: video: fix LCD monitor seen as CRTRui Zhang2007-01-031-15/+43
| | | | | | | | | | | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=7349 Signed-off-by: Len Brown <len.brown@intel.com>