summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-12-01 10:08:36 -0800
committerKeith Packard <keithp@neko.keithp.com>2006-12-01 10:08:36 -0800
commite603cd0c73344ef137d3276b5cfcbcf4df340778 (patch)
treec43f04afc85942b3aea93bc5db2eb55ed1044e65 /src
parentec30356d950199903978265076b8a4e3960cf84f (diff)
Leave detected TV status alone when no free CRTC is available.
Yes, this means not detecting TV hotplug when two outputs are already running. An alternative would be to turn off one of the other outputs temporarily, but that would cause flashing. Something to consider.
Diffstat (limited to 'src')
-rw-r--r--src/i830_tv.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/i830_tv.c b/src/i830_tv.c
index f7d92072..f5716f8b 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -473,7 +473,7 @@ static const DisplayModeRec tvModes[] = {
* \return TRUE if TV is connected.
* \return FALSE if TV is disconnected.
*/
-static int
+static void
i830_tv_detect_type (xf86CrtcPtr crtc,
xf86OutputPtr output)
{
@@ -536,7 +536,6 @@ i830_tv_detect_type (xf86CrtcPtr crtc,
}
dev_priv->type = type;
- return type;
}
/**
@@ -548,25 +547,25 @@ i830_tv_detect_type (xf86CrtcPtr crtc,
static enum detect_status
i830_tv_detect(xf86OutputPtr output)
{
- xf86CrtcPtr crtc;
+ xf86CrtcPtr crtc;
DisplayModeRec mode;
I830OutputPrivatePtr intel_output = output->driver_private;
- int type;
+ struct i830_tv_priv *dev_priv = intel_output->dev_priv;
crtc = i830GetLoadDetectPipe (output);
- if (!crtc)
- return OUTPUT_STATUS_UNKNOWN;
-
- if (intel_output->load_detect_temp)
+ if (crtc)
{
- mode = tvModes[0];
- xf86SetModeCrtc (&mode, INTERLACE_HALVE_V);
- i830PipeSetMode (crtc, &mode, FALSE);
+ if (intel_output->load_detect_temp)
+ {
+ mode = tvModes[0];
+ xf86SetModeCrtc (&mode, INTERLACE_HALVE_V);
+ i830PipeSetMode (crtc, &mode, FALSE);
+ }
+ i830_tv_detect_type (crtc, output);
+ i830ReleaseLoadDetectPipe (output);
}
- type = i830_tv_detect_type (crtc, output);
- i830ReleaseLoadDetectPipe (output);
- switch (type) {
+ switch (dev_priv->type) {
case TV_TYPE_NONE:
return OUTPUT_STATUS_DISCONNECTED;
case TV_TYPE_UNKNOWN: