linux_dsm_epyc7002/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: Add CMOS RTC Operation Region handler support 2013-06-27 21:35:37 +02:00
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 Merge branch 'acpi-assorted' 2013-04-28 01:54:08 +02:00
custom_method.c The sweeping change is to make add_taint() explicitly indicate whether to disable 2013-02-25 15:41:43 -08:00
debugfs.c acpi: add export.h to files using THIS_MODULE/EXPORT_SYMBOL 2011-10-31 19:30:34 -04:00
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_sys.c ACPI / EC: access user space with get_user()/put_user() 2013-06-19 23:29:20 +02:00
ec.c Merge branch 'acpi-ec' 2013-11-19 01:06:06 +01:00
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 ACPI: Remove useless type argument of driver .remove() operation 2013-01-26 00:37:24 +01:00
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 ACPI / PM: print physical addresses consistently with other parts of kernel 2012-03-30 02:46:57 -04:00
osl.c Merge branch 'acpi-hotplug' 2013-11-07 19:31:15 +01:00
pci_irq.c PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers 2013-02-16 11:58:34 -07:00
pci_link.c ACPI: Set length even for TYPE_END_TAG acpi resource 2013-03-24 01:00:38 +01:00
pci_root.c Merge branch 'acpi-hotplug' 2013-11-19 01:05:46 +01:00
pci_slot.c ACPI / PCI: Make bus registration and unregistration symmetric 2013-07-23 03:58:42 +02:00
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 ACPI: suppress compiler warnings in processor_throttling.c 2013-03-25 00:05:48 +01:00
reboot.c Revert "ACPI: ignore FADT reset-reg-sup flag" 2012-04-20 11:19:35 -07:00
resource.c ACPI: introduce helper function acpi_has_method() 2013-07-15 01:33:10 +02:00
sbs.c ACPI / SBS: Remove SBS's proc directory 2013-10-12 00:19:44 +02:00
sbshc.c ACPI: Remove useless type argument of driver .remove() operation 2013-01-26 00:37:24 +01:00
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 ACPI: Drop power resources driver 2013-01-17 14:11:06 +01:00
sysfs.c Merge branch 'acpi-assorted' 2013-10-28 01:20:24 +01:00
tables.c ACPICA: Cleanup table handler naming conflicts. 2013-01-11 13:10:16 +01:00
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_detect.c ACPI / video: Add Lenovo IdeaPad Yoga 13 to acpi video detect blacklist 2013-10-16 01:27:33 +02:00
video.c ACPI / video: clean up DMI table for initial black screen problem 2013-11-15 23:23:17 +01:00
wakeup.c ACPI / Wakeup: Enable button GPEs unconditionally during initialization 2011-02-12 01:39:53 +01:00