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

Chris Wilson ickle at kemper.freedesktop.org
Tue Apr 8 00:47:34 PDT 2014


 src/sna/sna_display.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 617e96f3af861dd797f98d5a74978f9ba595a981
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Apr 8 08:47:05 2014 +0100

    sna: Add more assertions before dereferencing sna_crtc
    
    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 b942d4a..e1814f7 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -194,16 +194,19 @@ static inline uint32_t fb_id(struct kgem_bo *bo)
 
 uint32_t sna_crtc_id(xf86CrtcPtr crtc)
 {
+	assert(to_sna_crtc(crtc));
 	return to_sna_crtc(crtc)->id;
 }
 
 int sna_crtc_to_pipe(xf86CrtcPtr crtc)
 {
+	assert(to_sna_crtc(crtc));
 	return to_sna_crtc(crtc)->pipe;
 }
 
 uint32_t sna_crtc_to_sprite(xf86CrtcPtr crtc)
 {
+	assert(to_sna_crtc(crtc));
 	return to_sna_crtc(crtc)->sprite;
 }
 
@@ -505,6 +508,7 @@ sna_crtc_force_outputs_on(xf86CrtcPtr crtc)
 	xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
 	int i;
 
+	assert(to_sna_crtc(crtc));
 	DBG(("%s(pipe=%d), currently? %d\n", __FUNCTION__,
 	     to_sna_crtc(crtc)->pipe, to_sna_crtc(crtc)->dpms_mode));
 
@@ -536,6 +540,7 @@ sna_crtc_force_outputs_off(xf86CrtcPtr crtc)
 	xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
 	int i;
 
+	assert(to_sna_crtc(crtc));
 	DBG(("%s(pipe=%d), currently? %d\n", __FUNCTION__,
 	     to_sna_crtc(crtc)->pipe, to_sna_crtc(crtc)->dpms_mode));
 
@@ -697,6 +702,7 @@ rotation_reset(struct rotation *r)
 
 bool sna_crtc_set_sprite_rotation(xf86CrtcPtr crtc, uint32_t rotation)
 {
+	assert(to_sna_crtc(crtc));
 	DBG(("%s: CRTC:%d [pipe=%d], sprite=%u set-rotation=%x\n",
 	     __FUNCTION__,
 	     to_sna_crtc(crtc)->id, to_sna_crtc(crtc)->pipe, to_sna_crtc(crtc)->sprite,
commit e6b03269d01e61527641639c6fb7b796205e6ed8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Apr 8 08:44:56 2014 +0100

    sna: Continue to reprobe for ZaphodHeads with a mixed up configuration
    
    Fixes regresion from
    commit 35b03b3fe6213eb3e08f05efe3428bd6bc5421d2
    Author: Chris Wilson <chris at chris-wilson.co.uk>
    Date:   Fri Mar 28 09:14:59 2014 +0000
    
        sna: Virtual CRTCs are last, so break loops early
    
    as the conflicting Zaphod detection requires on searching all potential
    CRTCs without finding the match. By breaking early on the virtual CRTC,
    we concluded that the setup was actually valid, but disabled.
    
    Reported-by: Nick Bowler <nbowler at draconx.ca>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77156
    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 f64b084..b942d4a 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -3903,7 +3903,7 @@ static bool sna_probe_initial_configuration(struct sna *sna)
 			xf86CrtcPtr crtc = config->crtc[j];
 
 			if (to_sna_crtc(crtc) == NULL)
-				break;
+				continue;
 
 			if (to_sna_crtc(crtc)->id != crtc_id)
 				continue;


More information about the xorg-commit mailing list