summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2006-04-21 06:16:32 +0200
committerLuc Verhaegen <libv@skynet.be>2006-04-21 06:16:32 +0200
commit4d6dfcc3707d0f8a2056c4e19842a4e0cdf686fc (patch)
tree61e05a37f7326bec9bcc12488c846635ea341223
parent6001f32ae12bd84789957681febc680813fd83ac (diff)
Remove atioption.c/h: Consolidate option handling in aticonfig.h/c.
-rw-r--r--src/Makefile.am3
-rw-r--r--src/ati.c2
-rw-r--r--src/aticonfig.c167
-rw-r--r--src/aticonfig.h29
-rw-r--r--src/aticonsole.c2
-rw-r--r--src/atioption.c249
-rw-r--r--src/atioption.h105
7 files changed, 154 insertions, 403 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 9c8304a..512d889 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,7 +48,7 @@ mach64_drv_la_LTLIBRARIES = mach64_drv.la
mach64_drv_la_LDFLAGS = -module -avoid-version
mach64_drv_ladir = @moduledir@/drivers
mach64_drv_la_SOURCES = \
- atioption.c atividmem.c atiadjust.c \
+ atividmem.c atiadjust.c \
atiaudio.c aticlock.c aticonfig.c aticonsole.c atidac.c \
atidecoder.c atidsp.c atii2c.c atilock.c atimach64.c atimach64accel.c \
atimach64cursor.c atimach64i2c.c atimach64io.c atimach64xv.c \
@@ -85,7 +85,6 @@ EXTRA_DIST = \
atimach64xv.h \
atimode.h \
atimono.h \
- atioption.h \
atipreinit.h \
atiprint.h \
atipriv.h \
diff --git a/src/ati.c b/src/ati.c
index 8013926..c637f37 100644
--- a/src/ati.c
+++ b/src/ati.c
@@ -60,10 +60,10 @@
#include "xf86Resources.h"
-#include "atioption.h"
#include "ativersion.h"
#include "atichip.h"
#include "atistruct.h"
+#include "aticonfig.h"
/* All the different functions in their different headers *rolls eyes* */
#include "atiadjust.h"
diff --git a/src/aticonfig.c b/src/aticonfig.c
index 1f92bdd..9fa59aa 100644
--- a/src/aticonfig.c
+++ b/src/aticonfig.c
@@ -33,12 +33,121 @@
#include "atichip.h"
#include "aticonfig.h"
-#include "atioption.h"
#include "atistruct.h"
#include "atimach64cursor.h"
#include "mach64_common.h"
+#ifdef TV_OUT
+/*
+ * List of supported TV standard names
+ */
+const char *ATITVStandardNames[ATI_TV_STDS_MAX_VALID+1] = {
+ "NTSC",
+ "PAL",
+ "PAL-M",
+ "PAL-60",
+ "NTSC-J",
+ "PAL-CN",
+ "PAL-N",
+ "Reserved1",
+ "Reserved2",
+ "SCART-PAL",
+ "None",
+ "Invalid"
+};
+#endif /* TV_OUT */
+
+/*
+ * Recognised XF86Config options.
+ */
+typedef enum
+{
+ ATI_OPTION_ACCEL,
+ ATI_OPTION_CRT_DISPLAY,
+ ATI_OPTION_CSYNC,
+ ATI_OPTION_HWCURSOR,
+
+#ifndef AVOID_CPIO
+
+ ATI_OPTION_LINEAR,
+
+#endif /* AVOID_CPIO */
+
+#ifdef XF86DRI_DEVEL
+
+ ATI_OPTION_IS_PCI,
+ ATI_OPTION_DMA_MODE,
+ ATI_OPTION_AGP_MODE,
+ ATI_OPTION_AGP_SIZE,
+ ATI_OPTION_LOCAL_TEXTURES,
+ ATI_OPTION_BUFFER_SIZE,
+
+#endif /* XF86DRI_DEVEL */
+
+#ifdef TV_OUT
+
+ ATI_OPTION_TV_OUT,
+ ATI_OPTION_TV_STD,
+
+#endif /* TV_OUT */
+
+ ATI_OPTION_MMIO_CACHE,
+ ATI_OPTION_TEST_MMIO_CACHE,
+ ATI_OPTION_PANEL_DISPLAY,
+ ATI_OPTION_PROBE_CLOCKS,
+ ATI_OPTION_REFERENCE_CLOCK,
+ ATI_OPTION_SHADOW_FB,
+ ATI_OPTION_SWCURSOR,
+ ATI_OPTION_ACCELMETHOD
+} ATIPublicOptionType;
+
+
+static const OptionInfoRec ATIPublicOptions[] =
+{
+ { ATI_OPTION_ACCEL, "accel", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_CRT_DISPLAY, "crt_display", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_CSYNC, "composite_sync", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_HWCURSOR, "hw_cursor", OPTV_BOOLEAN, {0, }, FALSE },
+#ifndef AVOID_CPIO
+ { ATI_OPTION_LINEAR, "linear", OPTV_BOOLEAN, {0, }, FALSE },
+#endif /* AVOID_CPIO */
+#ifdef XF86DRI_DEVEL
+ { ATI_OPTION_IS_PCI, "force_pci_mode", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_DMA_MODE, "dma_mode", OPTV_STRING, {0, }, FALSE },
+ { ATI_OPTION_AGP_MODE, "agp_mode", OPTV_INTEGER, {0, }, FALSE },
+ { ATI_OPTION_AGP_SIZE, "agp_size", OPTV_INTEGER, {0, }, FALSE },
+ { ATI_OPTION_LOCAL_TEXTURES, "local_textures", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_BUFFER_SIZE, "buffer_size", OPTV_INTEGER, {0, }, FALSE },
+#endif /* XF86DRI_DEVEL */
+#ifdef TV_OUT
+ { ATI_OPTION_TV_OUT, "tv_out", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_TV_STD, "tv_standard", OPTV_STRING, {0, }, FALSE },
+#endif /* TV_OUT */
+ { ATI_OPTION_MMIO_CACHE, "mmio_cache", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_TEST_MMIO_CACHE, "test_mmio_cache", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_PANEL_DISPLAY, "panel_display", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_PROBE_CLOCKS, "probe_clocks", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_REFERENCE_CLOCK, "reference_clock", OPTV_FREQ, {0, }, FALSE },
+ { ATI_OPTION_SHADOW_FB, "shadow_fb", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_SWCURSOR, "sw_cursor", OPTV_BOOLEAN, {0, }, FALSE },
+ { ATI_OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0, }, FALSE },
+ { -1, NULL, OPTV_NONE, {0, }, FALSE }
+};
+
+static const unsigned long ATIPublicOptionSize = SizeOf(ATIPublicOptions);
+
+/*
+ * ATIAvailableOptions --
+ *
+ * Return recognised options that are intended for public consumption.
+ */
+const OptionInfoRec *
+ATIAvailableOptions(int ChipId, int BusId)
+{
+ return ATIPublicOptions;
+}
+
/*
* Non-publicised XF86Config options.
*/
@@ -65,50 +174,18 @@ ATIProcessOptions
)
{
OptionInfoPtr PublicOption = xnfalloc(ATIPublicOptionSize);
- OptionInfoRec PrivateOption[] =
- {
- { /* ON: Let BIOS change display(s) */
- ATI_OPTION_BIOS_DISPLAY, /* OFF: Don't */
- "biosdisplay",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- { /* Negation of "PanelDisplay" public option */
- ATI_OPTION_CRT_SCREEN,
- "crtscreen",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- { /* ON: Ease exploration of loose ends */
- ATI_OPTION_DEVEL, /* OFF: Fit for public consumption */
- "tsi",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- { /* ON: Horizontally blend most modes */
- ATI_OPTION_BLEND, /* OFF: Use pixel replication more often */
- "lcdblend",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- { /* ON: Use XF86Config porch timings */
- ATI_OPTION_LCDSYNC, /* OFF: Use porches from mode on entry */
- "lcdsync",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- {
- -1,
- NULL,
- OPTV_NONE,
- {0, },
- FALSE
- }
+ OptionInfoRec PrivateOption[] = {
+ /* TRUE: Let BIOS change display(s) */
+ { ATI_OPTION_BIOS_DISPLAY, "biosdisplay", OPTV_BOOLEAN, {0, }, FALSE },
+ /* Negation of "PanelDisplay" public option */
+ { ATI_OPTION_CRT_SCREEN, "crtscreen", OPTV_BOOLEAN, {0, }, FALSE },
+ /* TRUE: Ease exploration of loose ends; FALSE: Fit for public consumption */
+ { ATI_OPTION_DEVEL, "devel", OPTV_BOOLEAN, {0, }, FALSE },
+ /* TRUE: Horizontally blend most modes; FALSE: Use pixel replication more often */
+ { ATI_OPTION_BLEND, "lcdblend", OPTV_BOOLEAN, {0, }, FALSE },
+ /* TRUE: Use XF86Config porch timings; FALSE: Use porches from mode on entry */
+ { ATI_OPTION_LCDSYNC, "lcdsync", OPTV_BOOLEAN, {0, }, FALSE },
+ { -1, NULL, OPTV_NONE, {0, }, FALSE }
};
(void)memcpy(PublicOption, ATIPublicOptions, ATIPublicOptionSize);
diff --git a/src/aticonfig.h b/src/aticonfig.h
index f0b44bc..ac77512 100644
--- a/src/aticonfig.h
+++ b/src/aticonfig.h
@@ -28,6 +28,35 @@
#include "xf86str.h"
+/*
+ * Documented XF86Config options.
+ */
+#ifdef TV_OUT
+
+#define ATI_TV_STDS_MAX_VALID 11
+#define ATI_TV_STDS_NAME_MAXLEN 9
+
+typedef enum {
+ ATI_TV_STD_NTSC = 0,
+ ATI_TV_STD_PAL,
+ ATI_TV_STD_PALM,
+ ATI_TV_STD_PAL60,
+ ATI_TV_STD_NTSCJ,
+ ATI_TV_STD_PALCN,
+ ATI_TV_STD_PALN,
+ ATI_TV_STD_RESERVED1, /* NOT usable */
+ ATI_TV_STD_RESERVED2, /* NOT usable */
+ ATI_TV_STD_SCARTPAL,
+ ATI_TV_STD_NONE, /* OK, means no tv standard change requested */
+ ATI_TV_STD_INVALID /* Invalid tv standard requested */
+} ATITVStandard;
+
+extern const char * ATITVStandardNames[];
+
+#endif /* TV_OUT */
+
+extern const OptionInfoRec * ATIAvailableOptions(int, int);
+
extern void ATIProcessOptions(ScrnInfoPtr, ATIPtr);
#endif /* ___ATICONFIG_H___ */
diff --git a/src/aticonsole.c b/src/aticonsole.c
index 38275a9..57d5a94 100644
--- a/src/aticonsole.c
+++ b/src/aticonsole.c
@@ -56,7 +56,7 @@
#include "atichip.h"
#include "atiprint.h"
-#include "atioption.h"
+#include "aticonfig.h"
#include "vbe.h"
static const char *vbeSymbols[] = {
diff --git a/src/atioption.c b/src/atioption.c
deleted file mode 100644
index 43e0b7a..0000000
--- a/src/atioption.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.c,v 1.22 2003/04/23 21:51:29 tsi Exp $ */
-/*
- * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of Marc Aurele La France not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. Marc Aurele La France makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as-is" without express or implied warranty.
- *
- * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
- * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- * DRI support by:
- * Leif Delgass <ldelgass@retinalburn.net>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "atioption.h"
-#include "atiutil.h"
-
-#ifdef TV_OUT
-
-/*
- * List of supported TV standard names
- */
-const char *ATITVStandardNames[ATI_TV_STDS_MAX_VALID+1] = {
- "NTSC",
- "PAL",
- "PAL-M",
- "PAL-60",
- "NTSC-J",
- "PAL-CN",
- "PAL-N",
- "Reserved1",
- "Reserved2",
- "SCART-PAL",
- "None",
- "Invalid"
-};
-
-#endif /* TV_OUT */
-
-/*
- * Recognised XF86Config options.
- */
-const OptionInfoRec ATIPublicOptions[] =
-{
- {
- ATI_OPTION_ACCEL,
- "accel",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- {
- ATI_OPTION_CRT_DISPLAY,
- "crt_display",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- {
- ATI_OPTION_CSYNC,
- "composite_sync",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- {
- ATI_OPTION_HWCURSOR,
- "hw_cursor",
- OPTV_BOOLEAN,
- {0, },
- FALSE,
- },
-
-#ifndef AVOID_CPIO
-
- {
- ATI_OPTION_LINEAR,
- "linear",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
-
-#endif /* AVOID_CPIO */
-
-#ifdef XF86DRI_DEVEL
-
- {
- ATI_OPTION_IS_PCI,
- "force_pci_mode",
- OPTV_BOOLEAN,
- {0, },
- FALSE,
- },
- {
- ATI_OPTION_DMA_MODE,
- "dma_mode",
- OPTV_STRING,
- {0, },
- FALSE,
- },
- {
- ATI_OPTION_AGP_MODE,
- "agp_mode",
- OPTV_INTEGER,
- {0, },
- FALSE,
- },
- {
- ATI_OPTION_AGP_SIZE,
- "agp_size",
- OPTV_INTEGER,
- {0, },
- FALSE,
- },
- {
- ATI_OPTION_LOCAL_TEXTURES,
- "local_textures",
- OPTV_BOOLEAN,
- {0, },
- FALSE,
- },
- {
- ATI_OPTION_BUFFER_SIZE,
- "buffer_size",
- OPTV_INTEGER,
- {0, },
- FALSE,
- },
-
-#endif /* XF86DRI_DEVEL */
-
-#ifdef TV_OUT
- {
- ATI_OPTION_TV_OUT,
- "tv_out",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- {
- ATI_OPTION_TV_STD,
- "tv_standard",
- OPTV_STRING,
- {0, },
- FALSE
- },
-
-#endif /* TV_OUT */
-
- {
- ATI_OPTION_MMIO_CACHE,
- "mmio_cache",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
-
-
- {
- ATI_OPTION_TEST_MMIO_CACHE,
- "test_mmio_cache",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- {
- ATI_OPTION_PANEL_DISPLAY,
- "panel_display",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- {
- ATI_OPTION_PROBE_CLOCKS,
- "probe_clocks",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- {
- ATI_OPTION_REFERENCE_CLOCK,
- "reference_clock",
- OPTV_FREQ,
- {0, },
- FALSE
- },
- {
- ATI_OPTION_SHADOW_FB,
- "shadow_fb",
- OPTV_BOOLEAN,
- {0, },
- FALSE
- },
- {
- ATI_OPTION_SWCURSOR,
- "sw_cursor",
- OPTV_BOOLEAN,
- {0, },
- FALSE,
- },
- {
- ATI_OPTION_ACCELMETHOD,
- "AccelMethod",
- OPTV_STRING,
- {0},
- FALSE
- },
- {
- -1,
- NULL,
- OPTV_NONE,
- {0, },
- FALSE
- }
-};
-
-const unsigned long ATIPublicOptionSize = SizeOf(ATIPublicOptions);
-
-/*
- * ATIAvailableOptions --
- *
- * Return recognised options that are intended for public consumption.
- */
-const OptionInfoRec *
-ATIAvailableOptions
-(
- int ChipId,
- int BusId
-)
-{
- return ATIPublicOptions;
-}
diff --git a/src/atioption.h b/src/atioption.h
deleted file mode 100644
index 836e911..0000000
--- a/src/atioption.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.h,v 1.12 2003/04/23 21:51:29 tsi Exp $ */
-/*
- * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of Marc Aurele La France not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. Marc Aurele La France makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as-is" without express or implied warranty.
- *
- * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
- * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- * DRI support by:
- * Leif Delgass <ldelgass@retinalburn.net>
- */
-
-#ifndef ___ATIOPTION_H___
-#define ___ATIOPTION_H___ 1
-
-#include "xf86str.h"
-
-/*
- * Documented XF86Config options.
- */
-typedef enum
-{
- ATI_OPTION_ACCEL,
- ATI_OPTION_CRT_DISPLAY,
- ATI_OPTION_CSYNC,
- ATI_OPTION_HWCURSOR,
-
-#ifndef AVOID_CPIO
-
- ATI_OPTION_LINEAR,
-
-#endif /* AVOID_CPIO */
-
-#ifdef XF86DRI_DEVEL
-
- ATI_OPTION_IS_PCI,
- ATI_OPTION_DMA_MODE,
- ATI_OPTION_AGP_MODE,
- ATI_OPTION_AGP_SIZE,
- ATI_OPTION_LOCAL_TEXTURES,
- ATI_OPTION_BUFFER_SIZE,
-
-#endif /* XF86DRI_DEVEL */
-
-#ifdef TV_OUT
-
- ATI_OPTION_TV_OUT,
- ATI_OPTION_TV_STD,
-
-#endif /* TV_OUT */
-
- ATI_OPTION_MMIO_CACHE,
- ATI_OPTION_TEST_MMIO_CACHE,
- ATI_OPTION_PANEL_DISPLAY,
- ATI_OPTION_PROBE_CLOCKS,
- ATI_OPTION_REFERENCE_CLOCK,
- ATI_OPTION_SHADOW_FB,
- ATI_OPTION_SWCURSOR,
- ATI_OPTION_ACCELMETHOD
-} ATIPublicOptionType;
-
-#ifdef TV_OUT
-
-#define ATI_TV_STDS_MAX_VALID 11
-#define ATI_TV_STDS_NAME_MAXLEN 9
-
-typedef enum {
- ATI_TV_STD_NTSC = 0,
- ATI_TV_STD_PAL,
- ATI_TV_STD_PALM,
- ATI_TV_STD_PAL60,
- ATI_TV_STD_NTSCJ,
- ATI_TV_STD_PALCN,
- ATI_TV_STD_PALN,
- ATI_TV_STD_RESERVED1, /* NOT usable */
- ATI_TV_STD_RESERVED2, /* NOT usable */
- ATI_TV_STD_SCARTPAL,
- ATI_TV_STD_NONE, /* OK, means no tv standard change requested */
- ATI_TV_STD_INVALID /* Invalid tv standard requested */
-} ATITVStandard;
-
-extern const char * ATITVStandardNames[];
-
-#endif /* TV_OUT */
-
-extern const OptionInfoRec ATIPublicOptions[];
-extern const unsigned long ATIPublicOptionSize;
-
-extern const OptionInfoRec * ATIAvailableOptions(int, int);
-
-#endif /* ___ATIOPTION_H___ */