diff options
| author | Matthew Garrett <mjg@redhat.com> | 2010-02-10 05:50:34 -0500 |
|---|---|---|
| committer | Ben Skeggs <bskeggs@redhat.com> | 2010-02-10 18:52:02 -0500 |
| commit | 13876c6e5fec94e9ea51b73ac025583dd7655345 (patch) | |
| tree | 5fb36893ecd68466f59ac7dd2630f29454c87140 | |
| parent | dd19e44b28b12f7ea59ebb54d8ea18054da7f9d1 (diff) | |
nouveau: fix state detection with switchable graphics
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_acpi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 1cf488247a16..48227e744753 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c | |||
| @@ -90,21 +90,21 @@ int nouveau_hybrid_setup(struct drm_device *dev) | |||
| 90 | { | 90 | { |
| 91 | int result; | 91 | int result; |
| 92 | 92 | ||
| 93 | if (nouveau_dsm(dev, NOUVEAU_DSM_ACTIVE, NOUVEAU_DSM_ACTIVE_QUERY, | 93 | if (nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_STATE, |
| 94 | &result)) | 94 | &result)) |
| 95 | return -ENODEV; | 95 | return -ENODEV; |
| 96 | 96 | ||
| 97 | NV_INFO(dev, "_DSM hardware status gave 0x%x\n", result); | 97 | NV_INFO(dev, "_DSM hardware status gave 0x%x\n", result); |
| 98 | 98 | ||
| 99 | if (result & 0x1) { /* Stamina mode - disable the external GPU */ | 99 | if (result) { /* Ensure that the external GPU is enabled */ |
| 100 | nouveau_dsm(dev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_SPEED, NULL); | ||
| 101 | nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_SPEED, | ||
| 102 | NULL); | ||
| 103 | } else { /* Stamina mode - disable the external GPU */ | ||
| 100 | nouveau_dsm(dev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_STAMINA, | 104 | nouveau_dsm(dev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_STAMINA, |
| 101 | NULL); | 105 | NULL); |
| 102 | nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_STAMINA, | 106 | nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_STAMINA, |
| 103 | NULL); | 107 | NULL); |
| 104 | } else { /* Ensure that the external GPU is enabled */ | ||
| 105 | nouveau_dsm(dev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_SPEED, NULL); | ||
| 106 | nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_SPEED, | ||
| 107 | NULL); | ||
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | return 0; | 110 | return 0; |
