From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754744Ab3L3JNq (ORCPT ); Mon, 30 Dec 2013 04:13:46 -0500 Received: from mga09.intel.com ([134.134.136.24]:39007 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754521Ab3L3JNm (ORCPT ); Mon, 30 Dec 2013 04:13:42 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.95,573,1384329600"; d="scan'208";a="431622881" Date: Mon, 30 Dec 2013 11:20:43 +0200 From: Mika Westerberg To: "Rafael J. Wysocki" 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?= Subject: Re: [PATCH][update] ACPIPHP / radeon / nouveau: Fix VGA switcheroo problem related to hotplug events Message-ID: <20131230092043.GB2494@intel.com> References: <10163453.2AxBLHI1XI@vostro.rjw.lan> <3135179.iXEx1Rk87m@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3135179.iXEx1Rk87m@vostro.rjw.lan> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 29, 2013 at 10:36:56PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > 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: bbd34fcdd1b2 (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 > Reported-and-tested-by: > Reported-by: Joaquín Aramendía > Cc: Alex Deucher > Cc: Dave Airlie > Cc: Takashi Iwai > Signed-off-by: Rafael J. Wysocki > Cc: 3.12+ # 3.12+ FWIW, Thunderbolt hotplug still works fine after this patch is applied :)