diff options
| author | Matthew Garrett <mjg@redhat.com> | 2010-02-10 20:50:34 +1000 | 
|---|---|---|
| committer | Ben Skeggs <bskeggs@redhat.com> | 2010-02-10 11:56:57 +1000 | 
| commit | 931aacf4619b7d7e3140a420967d4eaa466b8574 (patch) | |
| tree | f9e2b75cb5e7cc50047f1f13e7d1aa153fbd8202 | |
| parent | 4898304f48656f2a855c31fd172cd31018527e7d (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)  {  	int result; -	if (nouveau_dsm(dev, NOUVEAU_DSM_ACTIVE, NOUVEAU_DSM_ACTIVE_QUERY, +	if (nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_STATE,  								&result))  		return -ENODEV;  	NV_INFO(dev, "_DSM hardware status gave 0x%x\n", result); -	if (result & 0x1) {	/* Stamina mode - disable the external GPU */ +	if (result) { /* Ensure that the external GPU is enabled */ +		nouveau_dsm(dev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_SPEED, NULL); +		nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_SPEED, +									NULL); +	} else { /* Stamina mode - disable the external GPU */  		nouveau_dsm(dev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_STAMINA,  									NULL);  		nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_STAMINA,  									NULL); -	} else {		/* Ensure that the external GPU is enabled */ -		nouveau_dsm(dev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_SPEED, NULL); -		nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_SPEED, -									NULL);  	}  	return 0; | 
