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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 3 09:07:35 UTC 2018


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

New commits:
commit e5ff8e1828f97891c819c919d7115c6e18b2eb1f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Dec 3 08:58:39 2018 +0000

    sna: Skip restoring a mode for link-status=bad if the crtc was idle
    
    If we do not have a mode (and bo) enabled on the crtc, then trying to
    restore that bo ends up in a NULL pointer dereference.
    
    Reported-by: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
    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 307d5344..f6a6d99b 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -5470,6 +5470,9 @@ output_retrain_link(struct sna *sna, struct sna_output *output)
 	int crtc_x = crtc->offset & 0xffff;
 	int crtc_y = crtc->offset >> 16;
 
+	if (!crtc->bo)
+		return false;
+
 	return sna_crtc_flip(sna, crtc, crtc->bo, crtc_x, crtc_y);
 }
 


More information about the xorg-commit mailing list