From 4e95327323e3d081b565147f7738eb49c28542bc Mon Sep 17 00:00:00 2001 From: Zhenyu Wang Date: Mon, 16 Mar 2009 09:30:22 +0800 Subject: [PATCH] TV: force TV as connected with TV_Connector option In order to bypass failure in TV load detect, TV_Connector option will always force TV as connected with user specified connector type. --- man/intel.man | 2 +- src/i830_tv.c | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/man/intel.man b/man/intel.man index b6f89b66..ffe69a12 100644 --- a/man/intel.man +++ b/man/intel.man @@ -313,7 +313,7 @@ This property allows you to control the output standard used on your TV output p .B TV_Connector - connector type .TP 2 -This config option should be added to xorg.conf TV monitor's section, it allows you to control the TV output connector type, which bypass load detect. You can select between S-Video, Composite and Component. +This config option should be added to xorg.conf TV monitor's section, it allows you to force the TV output connector type, which bypass load detect and TV will always be taken as connected. You can select between S-Video, Composite and Component. .SS "TMDS-1" First DVI SDVO output diff --git a/src/i830_tv.c b/src/i830_tv.c index 1e3cf7b6..42d9e907 100644 --- a/src/i830_tv.c +++ b/src/i830_tv.c @@ -1458,6 +1458,10 @@ i830_tv_detect(xf86OutputPtr output) int dpms_mode; int type = dev_priv->type; + /* If TV connector type set by user, always return connected */ + if (dev_priv->force_type) + return XF86OutputStatusConnected; + mode = reported_modes[0]; xf86SetModeCrtc (&mode, INTERLACE_HALVE_V); crtc = i830GetLoadDetectPipe (output, &mode, &dpms_mode); @@ -1467,13 +1471,6 @@ i830_tv_detect(xf86OutputPtr output) i830ReleaseLoadDetectPipe (output, dpms_mode); } - if (dev_priv->force_type) { - if (type == TV_TYPE_NONE) - return XF86OutputStatusDisconnected; - else - return XF86OutputStatusConnected; - } - if (type != dev_priv->type) { dev_priv->type = type;