diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-02-03 19:46:10 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-02-03 19:46:10 -0500 |
commit | 16e01a5796a8e8b86ad25d3aa45b9e7044dc72d1 (patch) | |
tree | eff2ee17959a2873d03fe300d586e708ada5b3f4 /src/atombios_output.c | |
parent | 9abb09d5f43320bd27b336612d39d264fe93549f (diff) |
Fix encoder accounting
Should fix bug 19924
Diffstat (limited to 'src/atombios_output.c')
-rw-r--r-- | src/atombios_output.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c index 0827d746..653d2074 100644 --- a/src/atombios_output.c +++ b/src/atombios_output.c @@ -1194,6 +1194,7 @@ atombios_output_dpms(xf86OutputPtr output, int mode) switch (mode) { case DPMSModeOn: + radeon_encoder->devices |= radeon_output->active_device; if (is_dig) (void)atombios_dig_dpms(output, mode); else { @@ -1209,12 +1210,12 @@ atombios_output_dpms(xf86OutputPtr output, int mode) ErrorF("Output %s enable failed\n", device_name[radeon_get_device_index(radeon_output->active_device)]); } - radeon_encoder->use_count++; break; case DPMSModeStandby: case DPMSModeSuspend: case DPMSModeOff: - if (radeon_encoder->use_count < 2) { + radeon_encoder->devices &= ~(radeon_output->active_device); + if (!radeon_encoder->devices) { if (is_dig) (void)atombios_dig_dpms(output, mode); else { @@ -1232,8 +1233,6 @@ atombios_output_dpms(xf86OutputPtr output, int mode) device_name[radeon_get_device_index(radeon_output->active_device)]); } } - if (radeon_encoder->use_count > 0) - radeon_encoder->use_count--; break; } } |