testdisplay: fix possible_crtcs check so LVDS works

When using testdisplay on GM965 and Pineview with LVDS, it will fail to
set a mode because the first unused crtc can't be used for LVDS.  So
check the possible_crtcs to make sure the crtc can be used.

Signed-off-by: Hai Lan <hai.lan@intel.com>
This commit is contained in:
Lan, Hai 2011-06-06 19:16:26 -07:00 committed by Jesse Barnes
parent 1095a825c0
commit 3ddc799fbf

View File

@ -310,7 +310,7 @@ static void connector_find_preferred_mode(struct connector *c)
/* Find first CRTC not in use */ /* Find first CRTC not in use */
for (i = 0; i < resources->count_crtcs; i++) { for (i = 0; i < resources->count_crtcs; i++) {
if (resources->crtcs[i]) if (resources->crtcs[i] && (c->encoder->possible_crtcs & (1<<i)))
break; break;
} }
c->crtc = resources->crtcs[i]; c->crtc = resources->crtcs[i];