diff options
author | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-12-01 14:18:40 -0500 |
---|---|---|
committer | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-12-01 14:18:40 -0500 |
commit | 00b4480aa2c5d7f751e34fc964f431b90b14c8d2 (patch) | |
tree | b6d3531240bfedf996db7c6efb7719e5ef2e19f9 /src | |
parent | 0175b79987ef4d7b0ce8238c3bdde989e504516a (diff) |
RADEON: add options for force TV out as detected and to set TV standard
Also fix a typo in internal tv-out parsing
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon.h | 4 | ||||
-rw-r--r-- | src/radeon_driver.c | 4 | ||||
-rw-r--r-- | src/radeon_output.c | 36 |
3 files changed, 38 insertions, 6 deletions
diff --git a/src/radeon.h b/src/radeon.h index f9bf343..78f756e 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -158,7 +158,9 @@ typedef enum { OPTION_MAC_MODEL, #endif OPTION_DEFAULT_TMDS_PLL, - OPTION_TVDAC_LOAD_DETECT + OPTION_TVDAC_LOAD_DETECT, + OPTION_FORCE_TVOUT, + OPTION_TVSTD } RADEONOpts; diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 0465497..3422b66 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -192,6 +192,8 @@ static const OptionInfoRec RADEONOptions[] = { { OPTION_MAC_MODEL, "MacModel", OPTV_STRING, {0}, FALSE }, #endif { OPTION_TVDAC_LOAD_DETECT, "TVDACLoadDetect", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_FORCE_TVOUT, "ForceTVOut", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_TVSTD, "TVStandard", OPTV_STRING, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -1522,7 +1524,7 @@ static Bool RADEONPreInitChipType(ScrnInfoPtr pScrn) info->IsIGP = card->igp; pRADEONEnt->HasCRTC2 = !card->nocrtc2; info->HasSingleDAC = card->singledac; - info->InternalTVOut = card->nointtvout; + info->InternalTVOut = !card->nointtvout; break; } } diff --git a/src/radeon_output.c b/src/radeon_output.c index efe093f..4e5aded 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -634,11 +634,18 @@ void RADEONConnectorFindMonitor(ScrnInfoPtr pScrn, xf86OutputPtr output) if (radeon_output->MonType == MT_UNKNOWN) { if (radeon_output->type == OUTPUT_STV || radeon_output->type == OUTPUT_CTV) { - if (info->InternalTVOut) { - if (radeon_output->load_detection) - radeon_output->MonType = radeon_detect_tv(pScrn); + if (xf86ReturnOptValBool(info->Options, OPTION_FORCE_TVOUT, FALSE)) { + if (radeon_output->type == OUTPUT_STV) + radeon_output->MonType = MT_STV; else - radeon_output->MonType = MT_NONE; + radeon_output->MonType = MT_CTV; + } else { + if (info->InternalTVOut) { + if (radeon_output->load_detection) + radeon_output->MonType = radeon_detect_tv(pScrn); + else + radeon_output->MonType = MT_NONE; + } } } else { radeon_output->MonType = RADEONDisplayDDCConnected(pScrn, output); @@ -1759,6 +1766,7 @@ radeon_create_resources(xf86OutputPtr output) INT32 range[2]; int data, err; const char *s; + char *optstr; /* backlight control */ if (radeon_output->type == OUTPUT_LVDS) { @@ -1994,6 +2002,26 @@ radeon_create_resources(xf86OutputPtr output) s = "ntsc"; break; } + + optstr = (char *)xf86GetOptValString(info->Options, OPTION_TVSTD); + if (optstr) { + if (!strncmp("ntsc", optstr, strlen("ntsc"))) + radeon_output->tvStd = TV_STD_NTSC; + else if (!strncmp("pal", optstr, strlen("pal"))) + radeon_output->tvStd = TV_STD_PAL; + else if (!strncmp("pal-m", optstr, strlen("pal-m"))) + radeon_output->tvStd = TV_STD_PAL_M; + else if (!strncmp("pal-60", optstr, strlen("pal-60"))) + radeon_output->tvStd = TV_STD_PAL_60; + else if (!strncmp("ntsc-j", optstr, strlen("ntsc-j"))) + radeon_output->tvStd = TV_STD_NTSC_J; + else if (!strncmp("scart-pal", optstr, strlen("scart-pal"))) + radeon_output->tvStd = TV_STD_SCART_PAL; + else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid TV Standard: %s\n", optstr); + } + } + err = RRChangeOutputProperty(output->randr_output, tv_std_atom, XA_STRING, 8, PropModeReplace, strlen(s), (pointer)s, FALSE, FALSE); |