xf86-video-intel: src/sna/sna_display.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Jul 22 11:39:01 PDT 2013


 src/sna/sna_display.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 3e2a1be13914e9ba13aaca06576a4f0e0f6e8fb0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jul 22 19:34:32 2013 +0100

    sna: Bail if we fail to find the attached CRTC during probing
    
    In a Zaphod configuration, the set of CRTCs available for an output is
    limited, and if that set does not match with the already established
    linkage, our quick probe function will select no mode. However, since
    the output is already on, the user definitely would like to continue
    using it, so fallback to InitialConfiguratio to select an appropriate
    mode.
    
    Reported-by: Nick Bowler <nbowler at draconx.ca>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67176
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index e036e94..bc6e196 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -3022,6 +3022,8 @@ static bool sna_probe_initial_configuration(struct sna *sna)
 		if (drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_GETCRTC, &mode))
 			continue;
 
+		DBG(("%s: CRTC:%d, pipe=%d: has mode?=%d\n", __FUNCTION__,
+		     sna_crtc->id, sna_crtc->pipe, mode.mode_valid));
 		if (!mode.mode_valid)
 			continue;
 
@@ -3052,6 +3054,9 @@ static bool sna_probe_initial_configuration(struct sna *sna)
 		crtc_id = (uintptr_t)output->crtc;
 		output->crtc = NULL;
 
+		if (crtc_id == 0)
+			continue;
+
 		if (xf86ReturnOptValBool(output->options, OPTION_DISABLE, 0))
 			continue;
 
@@ -3089,6 +3094,11 @@ static bool sna_probe_initial_configuration(struct sna *sna)
 				break;
 			}
 		}
+
+		if (output->crtc == NULL) {
+			/* Can not find the earlier associated CRTC, bail */
+			return false;
+		}
 	}
 
 	width = height = 0;


More information about the xorg-commit mailing list