Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1353857
| From | Dave Airlie <airlied@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] nouveau: use new vga_switcheroo power domain. |
| Date | 2016-03-09 07:20 +0100 |
| Message-ID | <raFDs-3W3-19@gated-at.bofh.it> (permalink) |
| References | <raFDs-3W3-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Dave Airlie <airlied@redhat.com>
This fixes GPU auto powerdown on the Lenovo W541,
since we advertise Windows 2013 to the ACPI layer.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_vga.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
index af89c36..b987427f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_vga.c
+++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
@@ -101,8 +101,12 @@ nouveau_vga_init(struct nouveau_drm *drm)
runtime = true;
vga_switcheroo_register_client(dev->pdev, &nouveau_switcheroo_ops, runtime);
- if (runtime && nouveau_is_v1_dsm() && !nouveau_is_optimus())
- vga_switcheroo_init_domain_pm_ops(drm->dev->dev, &drm->vga_pm_domain);
+ if (runtime) {
+ if (nouveau_is_v1_dsm() && !nouveau_is_optimus())
+ vga_switcheroo_init_domain_pm_ops(drm->dev->dev, &drm->vga_pm_domain);
+ else if (nouveau_is_optimus())
+ vga_switcheroo_init_parent_pr3_ops(drm->dev->dev, &drm->vga_pm_domain);
+ }
}
void
@@ -117,7 +121,7 @@ nouveau_vga_fini(struct nouveau_drm *drm)
runtime = true;
vga_switcheroo_unregister_client(dev->pdev);
- if (runtime && nouveau_is_v1_dsm() && !nouveau_is_optimus())
+ if (runtime && (nouveau_is_v1_dsm() || nouveau_is_optimus()))
vga_switcheroo_fini_domain_pm_ops(drm->dev->dev);
vga_client_register(dev->pdev, NULL, NULL, NULL);
}
--
2.5.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 2/2] nouveau: use new vga_switcheroo power domain. Dave Airlie <airlied@gmail.com> - 2016-03-09 07:20 +0100
Re: [PATCH 2/2] nouveau: use new vga_switcheroo power domain. "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-09 14:30 +0100
Re: [PATCH 2/2] nouveau: use new vga_switcheroo power domain. Lukas Wunner <lukas@wunner.de> - 2016-03-09 15:40 +0100
Re: [PATCH 2/2] nouveau: use new vga_switcheroo power domain. Dave Airlie <airlied@gmail.com> - 2016-03-09 23:10 +0100
Re: [PATCH 2/2] nouveau: use new vga_switcheroo power domain. Lukas Wunner <lukas@wunner.de> - 2016-03-15 21:50 +0100
csiph-web