diff options
author | Eric Anholt <eric@anholt.net> | 2008-04-08 13:53:51 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-04-09 15:18:22 -0700 |
commit | 5db73f18d2badec37523850024b9aa824e4e6bd8 (patch) | |
tree | eb75f4b29a824c3d04811945c020b06fcd9a8488 /src | |
parent | e031cc02e65acfbafb48136dad414751e04425c5 (diff) |
SDVO: Use the TV reference clock for SDVO TV outputs.
Based on a patch by Will Wiseman.
Diffstat (limited to 'src')
-rw-r--r-- | src/i830.h | 1 | ||||
-rw-r--r-- | src/i830_display.c | 9 | ||||
-rw-r--r-- | src/i830_sdvo.c | 1 |
3 files changed, 9 insertions, 2 deletions
@@ -288,6 +288,7 @@ typedef struct _I830OutputPrivateRec { I2CBusPtr pDDCBus; struct _I830DVODriver *i2c_drv; Bool load_detect_temp; + Bool needs_tv_clock; uint32_t lvds_bits; int pipe_mask; int clone_mask; diff --git a/src/i830_display.c b/src/i830_display.c index 4091e792..ca5e5dcb 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -1100,6 +1100,8 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, break; case I830_OUTPUT_SDVO: is_sdvo = TRUE; + if (intel_output->needs_tv_clock) + is_tv = TRUE; break; case I830_OUTPUT_DVO_TMDS: case I830_OUTPUT_DVO_LVDS: @@ -1144,7 +1146,8 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, if (is_sdvo) { dpll |= DPLL_DVO_HIGH_SPEED; - if (IS_I945G(pI830) || IS_I945GM(pI830) || IS_G33CLASS(pI830)) + if ((IS_I945G(pI830) || IS_I945GM(pI830) || IS_G33CLASS(pI830)) && + !is_tv) { int sdvo_pixel_multiply = adjusted_mode->Clock / mode->Clock; dpll |= (sdvo_pixel_multiply - 1) << SDVO_MULTIPLIER_SHIFT_HIRES; @@ -1182,7 +1185,9 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, } } - if (is_tv) + if (is_sdvo && is_tv) + dpll |= PLL_REF_INPUT_TVCLKINBC; + else if (is_tv) { /* XXX: just matching BIOS for now */ /* dpll |= PLL_REF_INPUT_TVCLKINBC; */ diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c index 642ba885..e25de3a0 100644 --- a/src/i830_sdvo.c +++ b/src/i830_sdvo.c @@ -1535,6 +1535,7 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device) output->subpixel_order = SubPixelHorizontalRGB; /* XXX */ name_prefix="TV"; dev_priv->is_tv = TRUE; + intel_output->needs_tv_clock = TRUE; } else if (dev_priv->caps.output_flags & SDVO_OUTPUT_RGB0) { |