aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_state.c
diff options
context:
space:
mode:
authorPeter Lekensteyn <lekensteyn@gmail.com>2011-12-17 06:54:04 -0500
committerDave Airlie <airlied@redhat.com>2012-01-13 04:09:15 -0500
commitd099230cc355c485e556121c034b1fca5a5fd18b (patch)
treeb7bba1a92527e4cee4c95db21b2cb9f01ed40aa0 /drivers/gpu/drm/nouveau/nouveau_state.c
parent9075e85f46c598e4dfc852b16b256a32e2fb396f (diff)
nouveau: Support Optimus models for vga_switcheroo
Newer nVidia cards with Optimus do not support/use the DSM switching functions. Instead, it require a DSM function to be called prior to bringing a device into D3 state. No other _DSM calls are necessary before/after enabling/disabling a device. Switching between discrete and integrated GPU is not supported by this Optimus _DSM call, therefore return on the switching method. Signed-off-by: Peter Lekensteyn <lekensteyn@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_state.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_state.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index f5e98910d17f..f80c5e0762ff 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -525,6 +525,7 @@ static void nouveau_switcheroo_set_state(struct pci_dev *pdev,
525 printk(KERN_ERR "VGA switcheroo: switched nouveau off\n"); 525 printk(KERN_ERR "VGA switcheroo: switched nouveau off\n");
526 dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; 526 dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
527 drm_kms_helper_poll_disable(dev); 527 drm_kms_helper_poll_disable(dev);
528 nouveau_switcheroo_optimus_dsm();
528 nouveau_pci_suspend(pdev, pmm); 529 nouveau_pci_suspend(pdev, pmm);
529 dev->switch_power_state = DRM_SWITCH_POWER_OFF; 530 dev->switch_power_state = DRM_SWITCH_POWER_OFF;
530 } 531 }