summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/radeon_bios.c1
-rw-r--r--src/radeon_output.c56
2 files changed, 30 insertions, 27 deletions
diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index 9b28b6f9..335bdfee 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -523,7 +523,6 @@ Bool RADEONGetTVInfoFromBIOS (xf86OutputPtr output) {
if (!info->VBIOS) return FALSE;
if (info->IsAtomBios) {
- /* no idea where TV table is on ATOM bios */
return RADEONGetATOMTVInfo(output);
} else {
offset = RADEON_BIOS16(info->ROMHeaderStart + 0x32);
diff --git a/src/radeon_output.c b/src/radeon_output.c
index d2c6e2b7..b9c81652 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -951,8 +951,9 @@ radeon_create_resources(xf86OutputPtr output)
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"RRConfigureOutputProperty error, %d\n", err);
}
+
/* Set the current value of the property */
- switch (radeon_output->default_tvStd) {
+ switch (radeon_output->tvStd) {
case TV_STD_PAL:
s = "pal";
break;
@@ -974,25 +975,6 @@ radeon_create_resources(xf86OutputPtr output)
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);
@@ -1662,19 +1644,41 @@ RADEONGetTMDSInfo(xf86OutputPtr output)
static void
RADEONGetTVInfo(xf86OutputPtr output)
{
+ ScrnInfoPtr pScrn = output->scrn;
+ RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONOutputPrivatePtr radeon_output = output->driver_private;
+ char *optstr;
radeon_output->hPos = 0;
radeon_output->vPos = 0;
radeon_output->hSize = 0;
- if (RADEONGetTVInfoFromBIOS(output)) return;
+ if (!RADEONGetTVInfoFromBIOS(output)) {
+ /* set some reasonable defaults */
+ radeon_output->default_tvStd = TV_STD_NTSC;
+ radeon_output->tvStd = TV_STD_NTSC;
+ radeon_output->TVRefClk = 27.000000000;
+ radeon_output->SupportedTVStds = TV_STD_NTSC | TV_STD_PAL;
+ }
- /* set some reasonable defaults */
- radeon_output->default_tvStd = TV_STD_NTSC;
- radeon_output->tvStd = TV_STD_NTSC;
- radeon_output->TVRefClk = 27.000000000;
- radeon_output->SupportedTVStds = TV_STD_NTSC | TV_STD_PAL;
+ 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);
+ }
+ }
}