[Intel-gfx] [RFC][PATCH] Stop setting tv format property if crtc is NULL

ling.ma at intel.com ling.ma at intel.com
Fri Jul 24 05:22:39 CEST 2009


When TV is not connected and X start, after plugging TV cable again,
user must assign output crtc by xrandr command before set TV format
property. This patch will return FALSE to avoid system crash if
output crtc is NULL.

Signed-off-by: Ma Ling <ling.ma at intel.com>
---
 src/i830_tv.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/i830_tv.c b/src/i830_tv.c
index 7082aba..f1fdeea 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1821,6 +1821,10 @@ i830_tv_set_property(xf86OutputPtr output, Atom property,
 
 	if (pI830->starting)
 	    return TRUE;
+	if (output->crtc == NULL)
+	    xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
+			"Set TV Format Property error,"
+			"CRTC is not available\n");
 
 	/* TV format change will generate new modelines, try
 	   to probe them and update outputs. */
-- 
1.5.4.4




More information about the Intel-gfx mailing list