linux/drivers/gpu/drm/nouveau
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
..
core More ACPI and power management updates for 3.13-rc1 2013-11-20 13:25:04 -08:00
dispnv04 drm/nouveau/i2c: use a custom bitbanging delay for the adt7473 2013-11-08 15:39:54 +10:00
Kconfig drm: Add separate Kconfig option for fbdev helpers 2013-10-11 23:36:58 +02:00
Makefile drm/nouveau/fb: implement various bits of work towards memory reclocking 2013-11-08 15:40:19 +10:00
nouveau_abi16.c drm/nv10-: we no longer need to create nvsw object on user channels 2013-11-14 14:56:43 +10:00
nouveau_abi16.h drm/nouveau: port all engines to new engine module format 2012-10-03 13:12:56 +10:00
nouveau_acpi.c ACPIPHP / radeon / nouveau: Fix VGA switcheroo problem related to hotplug 2013-12-31 13:39:42 +01:00
nouveau_acpi.h nouveau: ACPI support depends on X86 and X86_PLATFORM_DEVICES 2013-02-20 16:05:16 +10:00
nouveau_agp.c drm/nouveau/agp: add a quirk list to limit agp modes 2013-11-08 15:39:54 +10:00
nouveau_agp.h
nouveau_backlight.c drm/sysfs: sort out minor and connector device object lifetimes. 2013-10-22 09:37:40 +01:00
nouveau_bios.c drm: Remove pci_vendor and pci_device from struct drm_device 2013-10-09 15:55:33 +10:00
nouveau_bios.h drm/nv04/disp: hide all the cruft away in its own little hole 2013-04-26 15:37:51 +10:00
nouveau_bo.c drm/nouveau: do not map evicted vram buffers in nouveau_bo_vma_add 2013-11-14 14:57:09 +10:00
nouveau_bo.h drm/nouveau: embed gem object in nouveau_bo 2013-10-09 14:37:55 +10:00
nouveau_chan.c drm/nv10-: we no longer need to create nvsw object on user channels 2013-11-14 14:56:43 +10:00
nouveau_chan.h drm/nve0: use async copy engine for ttm buffer moves if available 2012-10-03 13:13:02 +10:00
nouveau_connector.c drm/nv10: introduce a new NV_11 card type 2013-11-08 15:37:35 +10:00
nouveau_connector.h drm/nouveau: remove prototype for non-existent nouveau_connector_bpp 2013-11-08 15:36:08 +10:00
nouveau_crtc.h drm/nouveau: rename nvd0_display to nv50_display to reflect reality since merge 2012-11-29 09:57:58 +10:00
nouveau_debugfs.c drm/nouveau: restore debugfs/vbios.rom support 2013-02-20 20:46:34 +10:00
nouveau_debugfs.h drm/nouveau: restore debugfs/vbios.rom support 2013-02-20 20:46:34 +10:00
nouveau_display.c drm/nv11-: synchronise flips to vblank, unless async flip requested 2013-11-14 14:56:56 +10:00
nouveau_display.h drm/nouveau/core: convert event handler apis to split create/enable semantics 2013-11-08 15:36:06 +10:00
nouveau_dma.c drm/nouveau: port all engines to new engine module format 2012-10-03 13:12:56 +10:00
nouveau_dma.h drm/nvc0-: remove nasty fifo swmthd hack for flip completion method 2013-11-14 14:56:51 +10:00
nouveau_dp.c drm/nv50-/disp: move DP link training to core and train from supervisor 2013-02-20 16:01:02 +10:00
nouveau_drm.c drm/nv10-: we no longer need to create nvsw object on user channels 2013-11-14 14:56:43 +10:00
nouveau_drm.h drm/nv10-: we no longer need to create nvsw object on user channels 2013-11-14 14:56:43 +10:00
nouveau_encoder.h drm/nv04/disp: hide all the cruft away in its own little hole 2013-04-26 15:37:51 +10:00
nouveau_fbcon.c drm/nouveau/fbcon: bracket entrypoints with a per-device enabled check 2013-11-08 15:39:56 +10:00
nouveau_fbcon.h Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
nouveau_fence.c drm/nouveau: allow nouveau_fence_ref() to be a noop 2013-11-14 14:55:06 +10:00
nouveau_fence.h drm/nouveau: delay busy bo vma removal until fence signals 2013-07-01 13:50:31 +10:00
nouveau_gem.c drm/nouveau: when bailing out of a pushbuf ioctl, do not remove previous fence 2013-11-14 14:55:06 +10:00
nouveau_gem.h drm: kill ->gem_init_object() and friends 2013-10-09 14:38:02 +10:00
nouveau_hwmon.c drm/nouveau/drm/pm: remove everything except the hwmon interfaces to THERM 2013-11-08 15:40:00 +10:00
nouveau_hwmon.h drm/nouveau/drm/pm: remove everything except the hwmon interfaces to THERM 2013-11-08 15:40:00 +10:00
nouveau_ioc32.c drm/nouveau: fix up 32-bit ioctls and device wake up. 2013-09-02 09:52:55 +10:00
nouveau_ioctl.h drm/nouveau: fix up 32-bit ioctls and device wake up. 2013-09-02 09:52:55 +10:00
nouveau_prime.c drm/nouveau: embed gem object in nouveau_bo 2013-10-09 14:37:55 +10:00
nouveau_reg.h
nouveau_sgdma.c drm/nouveau/ttm: prevent double-free in nouveau_sgdma_create_ttm() failure path 2013-09-18 00:16:29 +10:00
nouveau_sysfs.c drm/nouveau: implement a simple sysfs interface to new pm code 2013-11-08 15:40:18 +10:00
nouveau_sysfs.h drm/nouveau: implement a simple sysfs interface to new pm code 2013-11-08 15:40:18 +10:00
nouveau_ttm.c Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next 2013-07-01 14:10:20 +10:00
nouveau_ttm.h drm/nouveau: port remainder of drm code, and rip out compat layer 2012-10-03 13:12:59 +10:00
nouveau_vga.c nouveau: add runtime PM support (v0.9) 2013-08-29 13:30:46 +10:00
nouveau_vga.h drm/nouveau: port remainder of drm code, and rip out compat layer 2012-10-03 13:12:59 +10:00
nv04_fbcon.c drm/nv11-: synchronise flips to vblank, unless async flip requested 2013-11-14 14:56:56 +10:00
nv04_fence.c drm/nouveau/fence: make internal hooks part of the context 2013-02-20 16:00:53 +10:00
nv10_fence.c drm/nouveau/fence: make internal hooks part of the context 2013-02-20 16:00:53 +10:00
nv10_fence.h drm/nouveau: share fence structures between nv10+ and nv50 implementations 2013-02-20 16:00:34 +10:00
nv17_fence.c drm/nouveau: fix semaphore dmabuf obj 2013-07-30 16:46:55 +10:00
nv50_display.c drm/nv50-/kms: assume analog display connected if load on any pin 2013-09-04 13:47:07 +10:00
nv50_display.h drm/nouveau: rename nvd0_display to nv50_display to reflect reality since merge 2012-11-29 09:57:58 +10:00
nv50_fbcon.c drm/nouveau: port remainder of drm code, and rip out compat layer 2012-10-03 13:12:59 +10:00
nv50_fence.c drm/nouveau: fix semaphore dmabuf obj 2013-07-30 16:46:55 +10:00
nv84_fence.c drm/nv84-/fence: prepare for emit/sync support of sysram sequences 2013-02-20 16:00:53 +10:00
nvc0_fbcon.c drm/nouveau: port remainder of drm code, and rip out compat layer 2012-10-03 13:12:59 +10:00
nvc0_fence.c drm/nv84-/fence: prepare for emit/sync support of sysram sequences 2013-02-20 16:00:53 +10:00