xf86-video-intel: src/sna/sna_display.c
Chris Wilson
ickle at kemper.freedesktop.org
Thu Nov 27 23:36:33 PST 2014
src/sna/sna_display.c | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 6059b51b59537682b3d9c64c69ea72616462c41c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Nov 28 07:33:42 2014 +0000
sna: Reject attempts to set an invalid mode
Let's be sure the mode has been established before we attempt to apply
it to a CRTC - just in case the kernel tries to use the invalid mode and
blows up.
References: https://bugs.freedesktop.org/show_bug.cgi?id=86679
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 0b7e838..ee0ac91 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -989,6 +989,11 @@ sna_crtc_apply(xf86CrtcPtr crtc)
int i;
DBG(("%s CRTC:%d [pipe=%d], handle=%d\n", __FUNCTION__, sna_crtc->id, sna_crtc->pipe, sna_crtc->bo->handle));
+ if (!sna_crtc->kmode.clock) {
+ ERR(("%s(CRTC:%d [pipe=%d]): attempted to set an invalid mode\n",
+ __FUNCTION__, sna_crtc->id, sna_crtc->pipe));
+ return false;
+ }
assert(sna->mode.num_real_output < ARRAY_SIZE(output_ids));
sna_crtc_disable_cursor(sna, sna_crtc);
More information about the xorg-commit
mailing list