From: "Rafael J. Wysocki" Subject: Re: [PATCH][update] ACPIPHP / radeon / nouveau: Fix VGA switcheroo problem related to hotplug events Date: Mon, 30 Dec 2013 13:52:46 +0100 Message-ID: <1571235.xlQ25FNpVL@vostro.rjw.lan> References: <10163453.2AxBLHI1XI@vostro.rjw.lan> <3135179.iXEx1Rk87m@vostro.rjw.lan> <20131230092043.GB2494@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from v094114.home.net.pl ([79.96.170.134]:58693 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755713Ab3L3MjK convert rfc822-to-8bit (ORCPT ); Mon, 30 Dec 2013 07:39:10 -0500 In-Reply-To: <20131230092043.GB2494@intel.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Mika Westerberg Cc: ACPI Devel Maling List , LKML , Linux PCI , Mike Lothian , madcatx@atlas.cz, Alex Deucher , Dave Airlie , Takashi Iwai , =?ISO-8859-1?Q?Joaqu=EDn_Aramend=EDa?= On Monday, December 30, 2013 11:20:43 AM Mika Westerberg wrote: > On Sun, Dec 29, 2013 at 10:36:56PM +0100, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > >=20 > > 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 f= or > > that device and those events cause ACPIPHP to attempt to remove the > > device from the system (they are events for a device that was prese= nt > > previously and is not present any more, so that's what should be do= ne > > according to the spec). Then, the system stops functioning correct= ly. > >=20 > > 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. > >=20 > > Fixes: bbd34fcdd1b2 (ACPI / hotplug / PCI: Register all devices und= er the given bridge) > > References: https://bugzilla.kernel.org/show_bug.cgi?id=3D61891 > > References: https://bugzilla.kernel.org/show_bug.cgi?id=3D64891 > > Reported-and-tested-by: Mike Lothian > > Reported-and-tested-by: > > Reported-by: Joaqu=C3=ADn Aramend=C3=ADa > > Cc: Alex Deucher > > Cc: Dave Airlie > > Cc: Takashi Iwai > > Signed-off-by: Rafael J. Wysocki > > Cc: 3.12+ # 3.12+ >=20 > FWIW, Thunderbolt hotplug still works fine after this patch is applie= d :) I've checked that, but thanks for the confirmation! Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html