aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_acpi.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_acpi.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
index 279206997e5c..622424692b3b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -46,7 +46,6 @@ static struct nouveau_dsm_priv {
46 bool dsm_detected; 46 bool dsm_detected;
47 bool optimus_detected; 47 bool optimus_detected;
48 acpi_handle dhandle; 48 acpi_handle dhandle;
49 acpi_handle other_handle;
50 acpi_handle rom_handle; 49 acpi_handle rom_handle;
51} nouveau_dsm_priv; 50} nouveau_dsm_priv;
52 51
@@ -222,10 +221,9 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev)
222 if (!dhandle) 221 if (!dhandle)
223 return false; 222 return false;
224 223
225 if (!acpi_has_method(dhandle, "_DSM")) { 224 if (!acpi_has_method(dhandle, "_DSM"))
226 nouveau_dsm_priv.other_handle = dhandle;
227 return false; 225 return false;
228 } 226
229 if (acpi_check_dsm(dhandle, nouveau_dsm_muid, 0x00000102, 227 if (acpi_check_dsm(dhandle, nouveau_dsm_muid, 0x00000102,
230 1 << NOUVEAU_DSM_POWER)) 228 1 << NOUVEAU_DSM_POWER))
231 retval |= NOUVEAU_DSM_HAS_MUX; 229 retval |= NOUVEAU_DSM_HAS_MUX;
@@ -301,16 +299,6 @@ static bool nouveau_dsm_detect(void)
301 printk(KERN_INFO "VGA switcheroo: detected DSM switching method %s handle\n", 299 printk(KERN_INFO "VGA switcheroo: detected DSM switching method %s handle\n",
302 acpi_method_name); 300 acpi_method_name);
303 nouveau_dsm_priv.dsm_detected = true; 301 nouveau_dsm_priv.dsm_detected = true;
304 /*
305 * On some systems hotplug events are generated for the device
306 * being switched off when _DSM is executed. They cause ACPI
307 * hotplug to trigger and attempt to remove the device from
308 * the system, which causes it to break down. Prevent that from
309 * happening by setting the no_hotplug flag for the involved
310 * ACPI device objects.
311 */
312 acpi_bus_no_hotplug(nouveau_dsm_priv.dhandle);
313 acpi_bus_no_hotplug(nouveau_dsm_priv.other_handle);
314 ret = true; 302 ret = true;
315 } 303 }
316 304