Commit 3ddc799f authored by Lan, Hai's avatar Lan, Hai Committed by Jesse Barnes

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: default avatarHai Lan <hai.lan@intel.com>
parent 1095a825
......@@ -310,7 +310,7 @@ static void connector_find_preferred_mode(struct connector *c)
/* Find first CRTC not in use */
for (i = 0; i < resources->count_crtcs; i++) {
if (resources->crtcs[i])
if (resources->crtcs[i] && (c->encoder->possible_crtcs & (1<<i)))
break;
}
c->crtc = resources->crtcs[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment