diff options
author | Keith Packard <keithp@neko.keithp.com> | 2007-07-13 10:58:06 -0700 |
---|---|---|
committer | Kyle McMartin <kyle@freedesktop.org> | 2007-07-26 19:45:49 -0400 |
commit | 760bd1bbeaa8daa3bf05267b34897e175058f4f0 (patch) | |
tree | 19c7a2f931a01e11763ca0547ce5038aec0ae19c /src/i830_tv.c | |
parent | 9d6fca93760b7fba7dfb774171eca94ca52d0115 (diff) |
Ensure pipe/output active before doing load detection.
If the pipe or output have been set to DPMSOff, then load detection will not
work correctly. Also, share the load detection configuration code between
crt and tv outputs.
(cherry picked from commit 00f4587025a3879626623135b0a153fcdb906719)
Diffstat (limited to 'src/i830_tv.c')
-rw-r--r-- | src/i830_tv.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/i830_tv.c b/src/i830_tv.c index 1c818bae..8337d864 100644 --- a/src/i830_tv.c +++ b/src/i830_tv.c @@ -1353,24 +1353,15 @@ i830_tv_detect(xf86OutputPtr output) DisplayModeRec mode; I830OutputPrivatePtr intel_output = output->driver_private; struct i830_tv_priv *dev_priv = intel_output->dev_priv; + int dpms_mode; - crtc = i830GetLoadDetectPipe (output); + mode = reported_modes[0]; + xf86SetModeCrtc (&mode, INTERLACE_HALVE_V); + crtc = i830GetLoadDetectPipe (output, &mode, &dpms_mode); if (crtc) { - if (!crtc->enabled) - { - /* we only need the pixel clock set correctly here */ - mode = reported_modes[0]; - xf86SetModeCrtc (&mode, INTERLACE_HALVE_V); - crtc->funcs->mode_set(crtc, &mode, &mode, 0, 0); - } - else if (intel_output->load_detect_temp) - { - output->funcs->mode_set (output, &crtc->mode, &crtc->mode); - output->funcs->commit (output); - } i830_tv_detect_type (crtc, output); - i830ReleaseLoadDetectPipe (output); + i830ReleaseLoadDetectPipe (output, dpms_mode); } switch (dev_priv->type) { |