diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2008-12-17 13:07:19 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2008-12-17 13:07:19 -0500 |
commit | 2ca970c7aa1f3f212f03bf3287d6b60eeafd68ae (patch) | |
tree | ebf05fdb9283749532b1480d0d05de70db857c78 | |
parent | 5da147eec70abb7c9125a8940089fd3ff8bdea95 (diff) |
Allow arbitrary tv-out modes
-rw-r--r-- | src/atombios_crtc.c | 5 | ||||
-rw-r--r-- | src/radeon_modes.c | 25 | ||||
-rw-r--r-- | src/radeon_output.c | 18 |
3 files changed, 5 insertions, 43 deletions
diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c index 9a8594a8..a1270f34 100644 --- a/src/atombios_crtc.c +++ b/src/atombios_crtc.c @@ -406,11 +406,6 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc, ret = RADEONATOMGetTVTimings(pScrn, need_tv_timings - 1, &crtc_timing, &adjusted_mode->Clock); if (ret == FALSE) { need_tv_timings = 0; - } else { - adjusted_mode->CrtcHDisplay = crtc_timing.usH_Disp; - adjusted_mode->CrtcHTotal = crtc_timing.usH_Total; - adjusted_mode->CrtcVDisplay = crtc_timing.usV_Disp; - adjusted_mode->CrtcVTotal = crtc_timing.usV_Total; } } diff --git a/src/radeon_modes.c b/src/radeon_modes.c index 5cd4e296..ed2fee20 100644 --- a/src/radeon_modes.c +++ b/src/radeon_modes.c @@ -95,36 +95,19 @@ RADEONTVModes(xf86OutputPtr output) static DisplayModePtr RADEONATOMTVModes(xf86OutputPtr output) { - RADEONOutputPrivatePtr radeon_output = output->driver_private; DisplayModePtr last = NULL; DisplayModePtr new = NULL; DisplayModePtr first = NULL; - int max_v, i; + int i; /* Add some common sizes */ - int widths[5] = {640, 720, 800, 848, 1024}; - - if (radeon_output->tvStd == TV_STD_NTSC || - radeon_output->tvStd == TV_STD_NTSC_J || - radeon_output->tvStd == TV_STD_PAL_M) - max_v = 480; - else - max_v = 600; + int widths[5] = {640, 720, 800, 848, 1024}; + int heights[5] = {480, 480, 600, 480, 768}; for (i = 0; i < 5; i++) { - new = xf86CVTMode(widths[i], max_v, 60.0, FALSE, FALSE); + new = xf86CVTMode(widths[i], heights[i], 60.0, FALSE, FALSE); new->type = M_T_DRIVER; - if (radeon_output->tvStd == TV_STD_NTSC || - radeon_output->tvStd == TV_STD_NTSC_J || - radeon_output->tvStd == TV_STD_PAL_M) { - if (widths[i] == 640) - new->type |= M_T_PREFERRED; - } else { - if (widths[i] == 800) - new->type |= M_T_PREFERRED; - } - new->next = NULL; new->prev = last; diff --git a/src/radeon_output.c b/src/radeon_output.c index 5924c814..dae4e1b7 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -429,23 +429,7 @@ radeon_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) if (OUTPUT_IS_TV) { /* FIXME: Update when more modes are added */ if (IS_AVIVO_VARIANT) { - int max_v; - - /* tv-scaler can scale horizontal width - * but frame ends must match tv_pll - * for now cap v size - */ - if (radeon_output->tvStd == TV_STD_NTSC || - radeon_output->tvStd == TV_STD_NTSC_J || - radeon_output->tvStd == TV_STD_PAL_M) - max_v = 480; - else - max_v = 600; - - if (pMode->VDisplay == max_v) - return MODE_OK; - else - return MODE_CLOCK_RANGE; + return MODE_OK; } else { if (pMode->HDisplay == 800 && pMode->VDisplay == 600) return MODE_OK; |