alistair23-linux/drivers/acpi
Rafael J. Wysocki f244d8b623 ACPIPHP / radeon / nouveau: Fix VGA switcheroo problem related to hotplug
The changes in the ACPI-based PCI hotplug (ACPIPHP) subsystem made
during the 3.12 development cycle uncovered a problem with VGA
switcheroo that on some systems, when the device-specific method
(ATPX in the radeon case, _DSM in the nouveau case) is used to turn
off the discrete graphics, the BIOS generates ACPI hotplug events for
that device and those events cause ACPIPHP to attempt to remove the
device from the system (they are events for a device that was present
previously and is not present any more, so that's what should be done
according to the spec).  Then, the system stops functioning correctly.

Since the hotplug events in question were simply silently ignored
previously, the least intrusive way to address that problem is to
make ACPIPHP ignore them again.  For this purpose, introduce a new
ACPI device flag, no_hotplug, and modify ACPIPHP to ignore hotplug
events for PCI devices whose ACPI companions have that flag set.
Next, make the radeon and nouveau switcheroo detection code set the
no_hotplug flag for the discrete graphics' ACPI companion.

Fixes: bbd34fcdd1 (ACPI / hotplug / PCI: Register all devices under the given bridge)
References: https://bugzilla.kernel.org/show_bug.cgi?id=61891
References: https://bugzilla.kernel.org/show_bug.cgi?id=64891
Reported-and-tested-by: Mike Lothian <mike@fireburn.co.uk>
Reported-and-tested-by: <madcatx@atlas.cz>
Reported-and-tested-by: Joaquín Aramendía <samsagax@gmail.com>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 3.12+ <stable@vger.kernel.org> # 3.12+
2013-12-31 13:39:42 +01:00
..
acpica Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-11-15 16:47:22 -08:00
apei PCI changes for the v3.13 merge window: 2013-11-14 14:02:00 +09:00
ac.c ACPI / AC: Remove struct acpi_device pointer from struct acpi_ac 2013-11-14 23:23:14 +01:00
acpi_cmos_rtc.c
acpi_extlog.c ACPI, x86: Extended error log driver for x86 platform 2013-10-23 10:09:07 -07:00
acpi_ipmi.c ACPI / IPMI: Cleanup coding styles 2013-09-30 19:46:13 +02:00
acpi_lpss.c Merge branch 'acpi-lpss' 2013-11-16 15:45:13 +01:00
acpi_memhotplug.c Merge branch 'acpi-hotplug' 2013-10-28 01:12:41 +01:00
acpi_pad.c PTR_RET() is a weird name, and led to some confusing usage. We ended 2013-09-04 17:31:11 -07:00
acpi_platform.c ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node 2013-11-14 23:14:43 +01:00
acpi_processor.c Merge branch 'acpi-processor' 2013-10-28 01:11:24 +01:00
battery.c ACPI / Battery: Remove battery's proc directory 2013-10-12 00:19:44 +02:00
bgrt.c acpi: bgrt: fix build error due to attribute change 2013-08-22 08:34:39 -07:00
blacklist.c Merge branch 'acpi-config' 2013-11-16 15:45:00 +01:00
bus.c ACPIPHP / radeon / nouveau: Fix VGA switcheroo problem related to hotplug 2013-12-31 13:39:42 +01:00
button.c ACPI / button: Using input_set_capability() to mark device's event capability 2013-09-25 17:11:57 +02:00
container.c
custom_method.c
debugfs.c
device_pm.c ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro 2013-11-14 23:17:21 +01:00
dock.c Merge branch 'acpi-hotplug' 2013-11-07 19:31:15 +01:00
ec.c Merge branch 'acpi-ec' 2013-11-19 01:06:06 +01:00
ec_sys.c
event.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-11-19 15:50:47 -08:00
fan.c ACP / fan: trivial style cleanup 2013-09-24 01:40:38 +02:00
glue.c ACPI / bind: Use (put|get)_device() on ACPI device objects too 2013-11-14 23:18:32 +01:00
hed.c
internal.h Merge branch 'acpi-hotplug' 2013-11-07 19:31:15 +01:00
Kconfig Merge branch 'acpi-config' 2013-11-16 15:45:00 +01:00
Makefile ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
numa.c ACPI / mm: use NUMA_NO_NODE 2013-09-24 01:40:38 +02:00
nvs.c
osl.c Merge branch 'acpi-hotplug' 2013-11-07 19:31:15 +01:00
pci_irq.c
pci_link.c
pci_root.c Merge branch 'acpi-hotplug' 2013-11-19 01:05:46 +01:00
pci_slot.c
power.c ACPI / power: Drop automaitc resume of power resource dependent devices 2013-10-16 23:05:42 +02:00
proc.c ACPI / proc: Remove alarm proc file 2013-10-12 00:19:45 +02:00
processor_core.c ACPI / processor: Introduce apic_id in struct processor to save parsed APIC id 2013-09-24 01:39:39 +02:00
processor_driver.c ACPI / processor: Do not request ACPI cpufreq module directly 2013-10-30 00:00:30 +01:00
processor_idle.c ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
processor_perflib.c ACPI / processor: Do not request ACPI cpufreq module directly 2013-10-30 00:00:30 +01:00
processor_thermal.c ACPI / processor: Remove acpi_processor_get_limit_info() 2013-08-13 12:11:22 +02:00
processor_throttling.c
reboot.c
resource.c
sbs.c ACPI / SBS: Remove SBS's proc directory 2013-10-12 00:19:44 +02:00
sbshc.c
sbshc.h
scan.c Merge branch 'acpi-hotplug' 2013-11-19 01:05:46 +01:00
sleep.c Merge branch 'acpi-assorted' 2013-08-27 01:29:04 +02:00
sleep.h
sysfs.c Merge branch 'acpi-assorted' 2013-10-28 01:20:24 +01:00
tables.c
thermal.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2013-11-14 14:42:31 +09:00
utils.c ACPI: Fix spelling mistake in error messages 2013-10-30 00:02:42 +01:00
video.c ACPI / video: clean up DMI table for initial black screen problem 2013-11-15 23:23:17 +01:00
video_detect.c ACPI / video: Add Lenovo IdeaPad Yoga 13 to acpi video detect blacklist 2013-10-16 01:27:33 +02:00
wakeup.c