summaryrefslogtreecommitdiff
path: root/src/aticonfig.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2005-03-26 00:53:01 +0000
committerDave Airlie <airlied@linux.ie>2005-03-26 00:53:01 +0000
commit04cbb8d174cc5e3c7ecdd4e171170213ecb3c7ed (patch)
treec10f24d28e53dba3db25540f774f3ae1c98f6ab0 /src/aticonfig.c
parent5be4bf9000bdf58584a10a6b8e285d0f173304fa (diff)
bugzilla #2057 (https://bugs.freedesktop.org/show_bug.cgi?id=2057)
attachment #1516 (https://bugs.freedesktop.org/attachment.cgi?id=1516) Add TVOUT Support for Mach64 (Leif Delgass, fixed up for Xorg by me).
Diffstat (limited to 'src/aticonfig.c')
-rw-r--r--src/aticonfig.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/aticonfig.c b/src/aticonfig.c
index 40ee24f6..1a1e6b46 100644
--- a/src/aticonfig.c
+++ b/src/aticonfig.c
@@ -134,6 +134,13 @@ ATIProcessOptions
#endif /* XF86DRI_DEVEL */
+#ifdef TV_OUT
+
+# define TvOut PublicOption[ATI_OPTION_TV_OUT].value.bool
+# define TvStd PublicOption[ATI_OPTION_TV_STD].value.str
+
+#endif /* TV_OUT */
+
# define CacheMMIO PublicOption[ATI_OPTION_MMIO_CACHE].value.bool
# define TestCacheMMIO PublicOption[ATI_OPTION_TEST_MMIO_CACHE].value.bool
# define PanelDisplay PublicOption[ATI_OPTION_PANEL_DISPLAY].value.bool
@@ -165,6 +172,11 @@ ATIProcessOptions
#endif /* AVOID_CPIO */
+#ifdef TV_OUT
+
+ TvStd = "None"; /* No tv standard change requested */
+
+#endif
}
ReferenceClock = ((double)157500000.0) / ((double)11.0);
@@ -216,6 +228,31 @@ ATIProcessOptions
#endif /* AVOID_CPIO */
+#ifdef TV_OUT
+
+ if (TvOut && pATI->Chip < ATI_CHIP_264GT) {
+ /* Only allow this for 3D Rage (I) or greater chip ID
+ * AFAIK, no chips before this supported TV-Out
+ * mach64VT has support for TV tuner, but no TV-Out
+ */
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
+ "TV Out not supported for this chip.\n");
+ } else {
+ ATITVStandard std;
+ pATI->OptionTvOut = TvOut;
+ pATI->OptionTvStd = ATI_TV_STD_INVALID;
+ for (std = 0; std < ATI_TV_STDS_MAX_VALID; std++) {
+ if (std != ATI_TV_STD_RESERVED1 && std != ATI_TV_STD_RESERVED2) {
+ if (strncasecmp(TvStd, ATITVStandardNames[std], ATI_TV_STDS_NAME_MAXLEN)==0) {
+ pATI->OptionTvStd = std;
+ break;
+ }
+ }
+ }
+ }
+
+#endif /* TV_OUT */
+
pATI->OptionMMIOCache = CacheMMIO;
pATI->OptionTestMMIOCache = TestCacheMMIO;
pATI->OptionProbeClocks = ProbeClocks;