[Intel-gfx] [PATCH] Set tv format property if output crtc is NULL

ling.ma at intel.com ling.ma at intel.com
Wed Jul 29 07:00:52 CEST 2009


When TV is not connected and X start, after plugging TV cable again,
system will crash because output crtc is NULL. This patch will return,
do not handle crtc immediately, meanwhile set value will be effective
until user really enable output by xrandr command.

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

diff --git a/src/i830_tv.c b/src/i830_tv.c
index 7082aba..df92a35 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1819,7 +1819,7 @@ i830_tv_set_property(xf86OutputPtr output, Atom property,
 	xfree (dev_priv->tv_format);
 	dev_priv->tv_format = val;
 
-	if (pI830->starting)
+	if (pI830->starting || output->crtc == NULL)
 	    return TRUE;
 
 	/* TV format change will generate new modelines, try
-- 
1.5.4.4




More information about the Intel-gfx mailing list