- 10 6月, 2013 1 次提交
-
-
由 Rafael J. Wysocki 提交于
With the introduction of ACPI scan handlers, ACPI device objects with an ACPI scan handler attached to them must not be bound to by ACPI drivers any more. Unfortunately, however, the ACPI video driver attempts to do just that if there is a _ROM ACPI control method defined under a device object with an ACPI scan handler. Prevent that from happening by making the video driver's "add" routine check if the device object already has an ACPI scan handler attached to it and return an error code in that case. That is not sufficient, though, because acpi_bus_driver_init() would then clear the device object's driver_data that may be set by its scan handler, so for the fix to work acpi_bus_driver_init() has to be modified to leave driver_data as is on errors. References: https://bugzilla.kernel.org/show_bug.cgi?id=58091Bisected-and-tested-by: NDmitry S. Demin <dmitryy.demin@gmail.com> Reported-and-tested-by: NJason Cassell <bluesloth600@gmail.com> Tracked-down-by: NAaron Lu <aaron.lu@intel.com> Cc: 3.9+ <stable@kernel.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: NAaron Lu <aaron.lu@intel.com>
-
- 02 6月, 2013 2 次提交
-
-
由 Ash Willis 提交于
This patch addresses kernel bug 56661. BIOS reports an incorrect backlight value, causing the driver to switch off the backlight completely during startup. This patch ignores the incorrect value from BIOS. References: https://bugzilla.kernel.org/show_bug.cgi?id=56661Signed-off-by: NAsh Willis <ashwillis@programmer.net> Cc: All <stable@vger.kernel.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Alex Hung 提交于
On HP m4 lapops, BIOS reports minimum backlight on boot and causes backlight to dim completely. This ignores the initial backlight values and set to max brightness. References: https://bugs.launchpad.net/bugs/1184501 Cc: All <stable@vger.kernel.org> Signed-off-by: NAlex Hung <alex.hung@canonical.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 12 5月, 2013 1 次提交
-
-
由 Alex Hung 提交于
On HP 1000 lapops, BIOS reports minimum backlight on boot and causes backlight to dim completely. This ignores the initial backlight values and set to max brightness. References:: https://bugs.launchpad.net/bugs/1167760Signed-off-by: NAlex Hung <alex.hung@canonical.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 25 4月, 2013 1 次提交
-
-
由 Aaron Lu 提交于
acpi_video_bus_get_devices() may fail due to some video output device doesn't have the _ADR method, and in this case, the error processing is to simply free the video structure in acpi_video_bus_add(), while leaving those already registered video output devices in the wild, which means for some video output device, we have already registered a backlight interface and installed a notification handler for it. So it can happen when user is using this system, on hotkey pressing, the notification handler will send a keycode through a non-existing input device, causing kernel freeze. To solve this problem, free all those already registered video output devices once something goes wrong in acpi_video_bus_get_devices(), so that no wild backlight interfaces and notification handlers exist. References: https://bugzilla.kernel.org/show_bug.cgi?id=51731 Reported-and-tested-by: <i-tek@web.de> Signed-off-by: NAaron Lu <aaron.lu@intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 22 4月, 2013 1 次提交
-
-
由 Aaron Lu 提交于
Currently we decide if the _BQC is using index by first setting the level to maximum, and then check if _BQC returned maximum; if not, we say it is using index. This is not true for some buggy systems, where the _BQC method will always return a constant value(e.g. 0 or 100 for the two broken system) and thus break the current logic. So this patch tries to enhance the quirk detect logic for _BQC: we do this by picking a test_level, it can be the maximum level or the mininum one based on some condition. And we don't make the assumption that if _BQC returned a value that is not what we just set, it must be using an index. Instead, we will compare the value returned from _BQC and if it doesn't match, see if the returned value is an index. And if still no, clear the capability of _BQC. References: https://bugzilla.kernel.org/show_bug.cgi?id=42861 References: https://bugzilla.kernel.org/show_bug.cgi?id=56011Reported-and-tested-by: NArtem Savkov <artem.savkov@gmail.com> Reported-by: NLuis Medinas <lmedinas@gmail.com> Reported-by: NCheppes <cheppes@mailinator.com> Signed-off-by: NAaron Lu <aaron.lu@intel.com> Acked-by: NZhang Rui <rui.zhang@intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 25 3月, 2013 4 次提交
-
-
由 Danny Baumann 提交于
The value initially read via _BQC also needs to be offset by 2 to compensate for the first 2 special items in _BCL. Introduce a helper function that does the BQC-value-to-level conversion in order to not needlessly duplicate code. Signed-off-by: NDanny Baumann <dannybaumann@web.de> Reviewed-by: NAaron Lu <aaron.lu@intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Danny Baumann 提交于
Make code paths a little easier to follow, and don't needlessly continue list iteration. Signed-off-by: NDanny Baumann <dannybaumann@web.de> Reviewed-by: NAaron Lu <aaron.lu@intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Danny Baumann 提交于
In particular, this fixes brightness control initialization for all devices that return index values from _BQC and don't happen to have the initial index set by the BIOS in their _BCL table. One example for that is the Dell Inspiron 15R SE (model number 7520). What happened for those devices is that acpi_init_brightness queried the initial brightness by calling acpi_video_device_lcd_get_level_current. This called _BQC, which returned e.g. 13. As _BQC_use_index isn't determined at this point (and thus has its initial value of 0), the index isn't converted into the actual level. As '13' isn't present in the _BCL list, *level is later overwritten with brightness->curr, which was initialized to max_level (100) before. Later in acpi_init_brightness, level_old (with the value 100) is used as an index into the _BCL table, which causes a value outside of the actual table to be used as input into acpi_video_device_lcd_set_level(). Depending on the (undefined) value of that location, this call will fail, causing the brightness control for the device in question not to be enabled. Fix that by returning the raw value returned by the _BQC call in the initialization case. Signed-off-by: NDanny Baumann <dannybaumann@web.de> Reviewed-by: NAaron Lu <aaron.lu@intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
On a HP Pavilion dm4 laptop the BIOS sets minimum backlight on boot, completely dimming the screen. Ignore this initial value for this machine. Signed-off-by: NGustavo Maciel Dias Vieira <gustavo@sagui.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 26 1月, 2013 2 次提交
-
-
由 Rafael J. Wysocki 提交于
The second argument of ACPI driver .remove() operation is only used by the ACPI processor driver and the value passed to that driver through it is always available from the given struct acpi_device object's removal_type field. For this reason, the second ACPI driver .remove() argument is in fact useless, so drop it. Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: NJiang Liu <jiang.liu@huawei.com> Acked-by: NToshi Kani <toshi.kani@hp.com> Acked-by: NYinghai Lu <yinghai@kernel.org>
-
由 Colin Ian King 提交于
ACPI_ERROR() already appends a newline, so there is no need for the error messages to include one too. Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 05 12月, 2012 1 次提交
-
-
由 Zhang Rui 提交于
Or else the laptop will boot with a dimmed screen. References: https://bugzilla.kernel.org/show_bug.cgi?id=51141Tested-by: NStefan Nagy <public@stefan-nagy.at> Signed-off-by: NZhang Rui <rui.zhang@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 03 11月, 2012 1 次提交
-
-
由 Igor Murzov 提交于
There are systems where video module known to work fine regardless of broken _DOD and ignoring returned value here doesn't cause any issues later. This should fix brightness controls on some laptops. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47861Signed-off-by: NIgor Murzov <e-mail@date.by> Reviewed-by: NSergey V <sftp.mtuci@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 21 9月, 2012 1 次提交
-
-
由 Luca Tettamanti 提交于
The standard video events may be overloaded for device specific purposes. For example AMD ACPI interface overloads ACPI_VIDEO_NOTIFY_PROBE (0x81) to signal AMD-specific events. In such cases we don't want to send the keypress (KEY_SWITCHVIDEOMODE) to the userspace because the user did not press the mode switch key (the spurious keypress confuses the DE which usually changes the display configuration and messes up a dual-screen setup). This patch gives the handlers the chance to examine the event and block the keypress if the event is device specific. v2: refactor as suggested by Zhang Rui <rui.zhang@intel.com> Signed-off-by: NLuca Tettamanti <kronos.it@gmail.com> Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
-
- 30 6月, 2012 1 次提交
-
-
由 Zhang Rui 提交于
This fixes a regression in 3.4-rc1 caused by commit ea9f8856 (ACPI video: Harden video bus adding.) Some platforms don't have _DOS control method, but the ACPI backlight still works. We should not invoke _DOS for these platforms. https://bugzilla.kernel.org/show_bug.cgi?id=43168 Cc: Igor Murzov <intergalactic.anonymous@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: NZhang Rui <rui.zhang@intel.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-
- 02 6月, 2012 3 次提交
-
-
由 Dan Carpenter 提交于
We can't use "input" anymore after calling input_unregister_device(). The call to input_free_device() is a double free. The normal way to deal with this is to make input_register_device() the last function called in the function. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NDmitry Torokhov <dtor@mail.ru> Signed-off-by: NLen Brown <len.brown@intel.com>
-
由 Alan Cox 提交于
Stop it poking at random registers on the i740 cards that may be out there still. As per Matthew's feedback remove the conditional checks and never enable the opregion handling unless an appropriate driver has been loaded. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-
由 Alan Cox 提交于
Signed-off-by: NAlan Cox <alan@linux.intel.com> Acked-by: NMatthew Garrett <mjg@redhat.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-
- 31 3月, 2012 2 次提交
-
-
由 Igor Murzov 提交于
Quoth Dmitry Torokhov: In addition to bus notifier we do install device notifier explicitly so it might fire up early. The easiest fox would be to move acpi_video_bus_start_devices() after input_allocate_device() but before input_register_device() - unregistered input devices can handle input_event() calls just fine. May fix crashes reported in: https://bugzilla.kernel.org/show_bug.cgi?id=40672Signed-off-by: NIgor Murzov <e-mail@date.by> Signed-off-by: NLen Brown <len.brown@intel.com>
-
由 Igor Murzov 提交于
It is always better to check return values, so add some new checks and correct existing ones. v2: Be consistent and don't mix errors from -E* and AE_* namespaces. Signed-off-by: NIgor Murzov <e-mail@date.by> Signed-off-by: NLen Brown <len.brown@intel.com>
-
- 13 1月, 2012 1 次提交
-
-
由 Rusty Russell 提交于
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 17 7月, 2011 1 次提交
-
-
由 Vasiliy Kulikov 提交于
Structs battery_file, acpi_dock_ops, file_operations, thermal_cooling_device_ops, thermal_zone_device_ops, kernel_param_ops are not changed in runtime. It is safe to make them const. register_hotplug_dock_device() was altered to take const "ops" argument to respect acpi_dock_ops' const notion. Signed-off-by: NVasiliy Kulikov <segoon@openwall.com> Acked-by: NJeff Garzik <jgarzik@redhat.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-
- 14 7月, 2011 1 次提交
-
-
由 Matthew Garrett 提交于
opregion-based platforms will send ACPI video event 0x80 for a range of notification types for legacy compatibility. This is interpreted as a display switch event, which may not be appropriate in the circumstances. When we receive such an event we should make sure that the platform is genuinely requesting a display switch before passing that event through to userspace. Signed-off-by: NMatthew Garrett <mjg@redhat.com> Tested-by: NAdam Jackson <ajax@redhat.com> Signed-off-by: NKeith Packard <keithp@keithp.com>
-
- 10 5月, 2011 1 次提交
-
-
由 Justin P. Mattock 提交于
- kenrel -> kernel - whetehr -> whether - ttt -> tt - sss -> ss Signed-off-by: NJustin P. Mattock <justinmattock@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 31 3月, 2011 1 次提交
-
-
由 Lucas De Marchi 提交于
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: NLucas De Marchi <lucas.demarchi@profusion.mobi>
-
- 29 3月, 2011 1 次提交
-
-
由 Matthew Garrett 提交于
The acpi video driver attempts to explicitly create a sysfs link between the acpi device and the associated PCI device. However, we're now also doing this from the backlight core, which means that we get a backtrace caused by a duplicate file. Remove the code and leave it up to the backlight core. Reported-by: NJeff Chua <jeff.chua.linux@gmail.com> Signed-off-by: NMatthew Garrett <mjg@redhat.com> Acked-by: NRafael J. Wysocki <rjw@sisk.pl> Tested-by: NAlessandro Suardi <alessandro.suardi@gmail.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 23 3月, 2011 2 次提交
-
-
由 Matthew Garrett 提交于
Dual-GPU machines may provide more than one ACPI backlight interface. Tie the backlight device to the GPU in order to allow userspace to identify the correct interface. Signed-off-by: NMatthew Garrett <mjg@redhat.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: David Airlie <airlied@linux.ie> Cc: Alex Deucher <alexdeucher@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Len Brown <lenb@kernel.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-by: NSedat Dilek <sedat.dilek@googlemail.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Matthew Garrett 提交于
There may be multiple ways of controlling the backlight on a given machine. Allow drivers to expose the type of interface they are providing, making it possible for userspace to make appropriate policy decisions. Signed-off-by: NMatthew Garrett <mjg@redhat.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: David Airlie <airlied@linux.ie> Cc: Alex Deucher <alexdeucher@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Len Brown <lenb@kernel.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 14 12月, 2010 3 次提交
-
-
由 Zhang Rui 提交于
Introduce module parameter video.use_bios_initial_backlight. Some BIOSes claim they use the minimum backlight at boot, and this may bring dimming screen after boot. https://bugzilla.kernel.org/show_bug.cgi?id=21212 use video.use_bios_initl_backlight=0 to use the maximum backlight level after boot. Signed-off-by: NZhang Rui <rui.zhang@intel.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-
由 Zhang Rui 提交于
cap._DDC is defined but never used. Check this flag now and don't try to get EDID for video output devices with this flag cleared. Signed-off-by: NZhang Rui <rui.zhang@intel.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-
由 Zhang Rui 提交于
Remove the ACPI video output switching control as it never works. With the patch applied, ACPI video driver still catches the video output notification, but it does nothing but raises the notification to userspace. Signed-off-by: NZhang Rui <rui.zhang@intel.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-
- 16 11月, 2010 1 次提交
-
-
由 Lionel Debroux 提交于
backlight_device_register has been expecting a const "ops" argument, and using it as such, since 9905a43b. Let's make the remaining backlight_ops instances const. Inspired by hunks of the grsecurity patch, updated for newer kernels. Signed-off-by: NLionel Debroux <lionel_debroux@yahoo.fr> Acked-by: NIngo Molnar <mingo@elte.hu> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 16 10月, 2010 1 次提交
-
-
由 Zhang Rui 提交于
Remove the deprecated ACPI video driver procfs I/F, as stated in the changelog of commit 6e37c658 New sysfs I/F is available at /sys/class/backlight/ Signed-off-by: NZhang Rui <rui.zhang@intel.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-
- 15 8月, 2010 2 次提交
-
-
由 Andi Kleen 提交于
Some minor improvements in error handling, but overall it was mostly dead code. Signed-off-by: NAndi Kleen <ak@linux.intel.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLen Brown <len.brown@intel.com>
-
由 Zhang Rui 提交于
Mark ACPI video driver procfs I/F deprecated, including: /proc/acpi/video/*/info /proc/acpi/video/*/DOS /proc/acpi/video/*/ROM /proc/acpi/video/*/POST /proc/acpi/video/*/POST_info /proc/acpi/video/*/*/info /proc/acpi/video/*/*/state /proc/acpi/video/*/*/EDID and /proc/acpi/video/*/*/brightness, because 1. we already have the sysfs I/F /sysclass/backlight/ as the replacement of /proc/acpi/video/*/*/brightness. 2. the other procfs I/F is not useful for userspace. Signed-off-by: NZhang Rui <rui.zhang@intel.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-
- 20 5月, 2010 1 次提交
-
-
由 Julia Lawall 提交于
kasprintf combines kmalloc and sprintf, and takes care of the size calculation itself. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression a,flag; expression list args; statement S; @@ a = - \(kmalloc\|kzalloc\)(...,flag) + kasprintf(flag,args) <... when != a if (a == NULL || ...) S ...> - sprintf(a,args); // </smpl> [akpm@linux-foundation.org: don't change handling of `count'] Signed-off-by: NJulia Lawall <julia@diku.dk> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLen Brown <len.brown@intel.com>
-
- 20 4月, 2010 1 次提交
-
-
由 Matthew Garrett 提交于
The ACPI spec includes a provision for hardware to provide EDID via the ACPI video extension. In the KMS world it's necessary for a way to obtain this from within the kernel. Add a function that either returns the EDID for the provided ACPI display ID or the first display of the provided type. Also add support for ensuring that devices with legacy IDs are supported. Signed-off-by: NMatthew Garrett <mjg@redhat.com> Acked-by: NZhang Rui <rui.zhang@intel.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-
- 07 4月, 2010 1 次提交
-
-
由 Rafael J. Wysocki 提交于
There is a problem with the ACPI video resume routine that it's executed before the GPU that may be accessed by it. To fix this issue, move the ACPI video resume to a power management notifier, so that's executed after resuming all devices, including the GPU. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15096, which is a listed regression from 2.6.31. Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl> Tested-by: NRafał Miłecki <zajec5@gmail.com> Acked-by: NMatthew Garrett <mjg@redhat.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-
- 04 4月, 2010 1 次提交
-
-
由 Matthew Garrett 提交于
I have a machine here that's sending 0xD1 notifications on the video device once every second or so. I have no idea why (it's a prototype, it may be broken), but sending KEY_UNKNOWN is unhelpful and results in the console becoming unusable. Let's not report keys unless we have something useful to say about them. Signed-off-by: NMatthew Garrett <mjg@redhat.com> Acked-by: NZhang Rui <rui.zhang@intel.com> Signed-off-by: NLen Brown <len.brown@intel.com>
-