diff options
author | Alex Deucher <alex@botch2.(none)> | 2007-10-15 21:12:46 -0400 |
---|---|---|
committer | Alex Deucher <alex@botch2.(none)> | 2007-10-15 21:12:46 -0400 |
commit | 08945fc8a14ba57e32350e85daa3354619e9e72e (patch) | |
tree | 16ac7dbacd6541c5114ce2d587c8767c3a26dbf4 | |
parent | 571548b2b95ce289f26a77c11deb6266f0b18516 (diff) |
RADEON: allow the user to set any tv standard
allow the user to set any tv standard rather than
limiting it to what the bios says is supported.
-rw-r--r-- | src/radeon_output.c | 50 |
1 files changed, 13 insertions, 37 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c index 45a605d..e2f26e7 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -1936,7 +1936,7 @@ radeon_create_resources(xf86OutputPtr output) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "RRConfigureOutputProperty error, %d\n", err); } - /* Set the current value of the backlight property */ + /* Set the current value of the property */ switch (radeon_output->default_tvStd) { case TV_STD_PAL: s = "pal"; @@ -2106,47 +2106,23 @@ radeon_set_property(xf86OutputPtr output, Atom property, return FALSE; s = (char*)value->data; if (value->size == strlen("ntsc") && !strncmp("ntsc", s, strlen("ntsc"))) { - if (radeon_output->SupportedTVStds & TV_STD_NTSC) { - radeon_output->tvStd = TV_STD_NTSC; - return TRUE; - } else { - return FALSE; - } + radeon_output->tvStd = TV_STD_NTSC; + return TRUE; } else if (value->size == strlen("pal") && !strncmp("pal", s, strlen("pal"))) { - if (radeon_output->SupportedTVStds & TV_STD_PAL) { - radeon_output->tvStd = TV_STD_PAL; - return TRUE; - } else { - return FALSE; - } + radeon_output->tvStd = TV_STD_PAL; + return TRUE; } else if (value->size == strlen("pal-m") && !strncmp("pal-m", s, strlen("pal-m"))) { - if (radeon_output->SupportedTVStds & TV_STD_PAL_M) { - radeon_output->tvStd = TV_STD_PAL_M; - return TRUE; - } else { - return FALSE; - } + radeon_output->tvStd = TV_STD_PAL_M; + return TRUE; } else if (value->size == strlen("pal-60") && !strncmp("pal-60", s, strlen("pal-60"))) { - if (radeon_output->SupportedTVStds & TV_STD_PAL_60) { - radeon_output->tvStd = TV_STD_PAL_60; - return TRUE; - } else { - return FALSE; - } + radeon_output->tvStd = TV_STD_PAL_60; + return TRUE; } else if (value->size == strlen("ntsc-j") && !strncmp("ntsc-j", s, strlen("ntsc-j"))) { - if (radeon_output->SupportedTVStds & TV_STD_NTSC_J) { - radeon_output->tvStd = TV_STD_NTSC_J; - return TRUE; - } else { - return FALSE; - } + radeon_output->tvStd = TV_STD_NTSC_J; + return TRUE; } else if (value->size == strlen("scart-pal") && !strncmp("scart-pal", s, strlen("scart-pal"))) { - if (radeon_output->SupportedTVStds & TV_STD_SCART_PAL) { - radeon_output->tvStd = TV_STD_SCART_PAL; - return TRUE; - } else { - return FALSE; - } + radeon_output->tvStd = TV_STD_SCART_PAL; + return TRUE; } return FALSE; } |