Fix i830_crtc_on to only check outputs associated with the given CRTC

Otherwise we may end up returning a false positive if some other output & crtc
are on, but not the one in question, again leading to hangs.

Reported-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
Jesse Barnes 2009-06-24 14:42:08 -07:00
parent 5d80e24b5f
commit f0270bbb47
1 changed files with 2 additions and 1 deletions

View File

@ -2468,7 +2468,8 @@ Bool i830_crtc_on(xf86CrtcPtr crtc)
/* Kernel manages CRTC status based out output config */
for (i = 0; i < xf86_config->num_output; i++) {
xf86OutputPtr output = xf86_config->output[i];
if (drmmode_output_dpms_status(output) == DPMSModeOn)
if (output->crtc == crtc &&
drmmode_output_dpms_status(output) == DPMSModeOn)
active_outputs++;
}