From d16f6403153596b62c555fb511881289f59f9e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Tue, 3 Sep 2019 16:44:56 +0300 Subject: [PATCH] modesetting: Fix possible_crtcs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ä (cherry picked from commit 0e4bd71d02d09c320e76280ae8f14df169387507) --- hw/xfree86/drivers/modesetting/drmmode_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 360434ebd..6f5f8caf6 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -2997,9 +2997,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;