modesetting: Fix possible_crtcs

Populate outout possible_crtcs as the union of possible_crtcs from
the encoders rather than the intersection. Otherwise we're easily left
with possible_crtcs==0 when all the possible encoders have
non-overlapping possible_crtcs.

No idea what the magic 0x7f is about, but keep it around in case
it matters.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
This commit is contained in:
Ville Syrjälä 2019-09-03 16:44:56 +03:00 committed by Adam Jackson
parent 334f110714
commit 0e4bd71d02

View File

@ -2979,9 +2979,9 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
output->driver_private = drmmode_output;
output->non_desktop = nonDesktop;
output->possible_crtcs = 0x7f;
output->possible_crtcs = 0;
for (i = 0; i < koutput->count_encoders; i++) {
output->possible_crtcs &= kencoders[i]->possible_crtcs >> crtcshift;
output->possible_crtcs |= (kencoders[i]->possible_crtcs >> crtcshift) & 0x7f;
}
/* work out the possible clones later */
output->possible_clones = 0;