From f0270bbb47baed78a0ff6189ae20d3ac322ec02b Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Wed, 24 Jun 2009 14:42:08 -0700 Subject: [PATCH] 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 Signed-off-by: Jesse Barnes --- src/i830_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i830_driver.c b/src/i830_driver.c index b9b9d0bd..23690cf6 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -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++; }