aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/fbdevhw
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/fbdevhw')
-rw-r--r--xorg-server/hw/xfree86/fbdevhw/Makefile.in35
-rw-r--r--xorg-server/hw/xfree86/fbdevhw/fbdevhw.c43
-rw-r--r--xorg-server/hw/xfree86/fbdevhw/fbdevhw.h88
3 files changed, 86 insertions, 80 deletions
diff --git a/xorg-server/hw/xfree86/fbdevhw/Makefile.in b/xorg-server/hw/xfree86/fbdevhw/Makefile.in
index e4676b679..0c615d0a5 100644
--- a/xorg-server/hw/xfree86/fbdevhw/Makefile.in
+++ b/xorg-server/hw/xfree86/fbdevhw/Makefile.in
@@ -44,8 +44,11 @@ DIST_COMMON = README $(sdk_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/cpprules.in
subdir = hw/xfree86/fbdevhw
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
+ $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -55,7 +58,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
$(top_builddir)/include/xorg-config.h \
$(top_builddir)/include/xkb-config.h \
$(top_builddir)/include/xwin-config.h \
- $(top_builddir)/include/kdrive-config.h
+ $(top_builddir)/include/kdrive-config.h \
+ $(top_builddir)/include/version-config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -112,6 +116,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_MAKEFLAGS = @AM_MAKEFLAGS@
APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@
APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
@@ -132,9 +137,12 @@ CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CXX = @CXX@
CYGPATH_W = @CYGPATH_W@
DARWIN_LIBS = @DARWIN_LIBS@
DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -163,7 +171,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@
DRIPROTO_LIBS = @DRIPROTO_LIBS@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+DRI_CFLAGS = @DRI_CFLAGS@
DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
+DRI_LIBS = @DRI_LIBS@
DSYMUTIL = @DSYMUTIL@
DTRACE = @DTRACE@
DUMPBIN = @DUMPBIN@
@@ -172,9 +182,13 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GL_CFLAGS = @GL_CFLAGS@
@@ -213,12 +227,13 @@ LTCOMPILE = @LTCOMPILE@
LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAIN_LIB = @MAIN_LIB@
+MAKEFLAGS = @MAKEFLAGS@
MAKEINFO = @MAKEINFO@
MAKE_HTML = @MAKE_HTML@
MAKE_PDF = @MAKE_PDF@
MAKE_PS = @MAKE_PS@
MAKE_TEXT = @MAKE_TEXT@
-MESA_SOURCE = @MESA_SOURCE@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
@@ -238,7 +253,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
@@ -248,6 +262,7 @@ PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PROJECTROOT = @PROJECTROOT@
PS2PDF = @PS2PDF@
+Q = @Q@
RANLIB = @RANLIB@
RAWCPP = @RAWCPP@
RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -261,11 +276,10 @@ STRIP = @STRIP@
TSLIB_CFLAGS = @TSLIB_CFLAGS@
TSLIB_LIBS = @TSLIB_LIBS@
UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@
-VENDOR_NAME = @VENDOR_NAME@
+V = @V@
VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VENDOR_RELEASE = @VENDOR_RELEASE@
VERSION = @VERSION@
+WINDRES = @WINDRES@
X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
XDMCP_CFLAGS = @XDMCP_CFLAGS@
@@ -301,6 +315,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
XORG_SYS_LIBS = @XORG_SYS_LIBS@
XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
XPBPROXY_LIBS = @XPBPROXY_LIBS@
+XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
XSDL_INCS = @XSDL_INCS@
@@ -325,7 +340,6 @@ YFLAGS = @YFLAGS@
__XCONFIGFILE__ = @__XCONFIGFILE__@
abi_ansic = @abi_ansic@
abi_extension = @abi_extension@
-abi_font = @abi_font@
abi_videodrv = @abi_videodrv@
abi_xinput = @abi_xinput@
abs_builddir = @abs_builddir@
@@ -348,6 +362,7 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
+distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
@@ -379,7 +394,9 @@ psdir = @psdir@
sbindir = @sbindir@
sdkdir = @sdkdir@
sharedstatedir = @sharedstatedir@
+shavedir = @shavedir@
srcdir = @srcdir@
+symbol_visibility = @symbol_visibility@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
diff --git a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c
index 5269277ef..00ebd6b39 100644
--- a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c
@@ -17,16 +17,10 @@
#include "fbdevhw.h"
#include "fbpriv.h"
-#if 0
-/* kernel header doesn't work with -ansi */
-# include "asm/page.h" /* #define for PAGE_* */
-#else
-# define PAGE_MASK (~(getpagesize() - 1))
-#endif
+#define PAGE_MASK (~(getpagesize() - 1))
#include "globals.h"
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
#define DEBUG 0
@@ -65,20 +59,7 @@ _X_EXPORT XF86ModuleData fbdevhwModuleData = {
static pointer
fbdevhwSetup(pointer module, pointer opts, int *errmaj, int *errmin)
{
- const char *osname;
-
- /* Check that we're being loaded on a Linux system */
- LoaderGetOS(&osname, NULL, NULL, NULL);
- if (!osname || strcmp(osname, "linux") != 0) {
- if (errmaj)
- *errmaj = LDR_BADOS;
- if (errmin)
- *errmin = 0;
- return NULL;
- } else {
- /* OK */
- return (pointer)1;
- }
+ return (pointer)1;
}
#include <fcntl.h>
@@ -152,6 +133,17 @@ fbdevHWFreeRec(ScrnInfoPtr pScrn)
FBDEVHWPTRLVAL(pScrn) = NULL;
}
+int
+fbdevHWGetFD(ScrnInfoPtr pScrn)
+{
+ fbdevHWPtr fPtr;
+
+ fbdevHWGetRec(pScrn);
+ fPtr = FBDEVHWPTR(pScrn);
+
+ return fPtr->fd;
+}
+
/* -------------------------------------------------------------------- */
/* some helpers for printing debug informations */
@@ -223,10 +215,8 @@ xfree2fbdev_timing(DisplayModePtr mode, struct fb_var_screeninfo *var)
var->sync |= FB_SYNC_VERT_HIGH_ACT;
if (mode->Flags & V_PCSYNC)
var->sync |= FB_SYNC_COMP_HIGH_ACT;
-#if 1 /* Badly needed for PAL/NTSC on Amiga (amifb)!! [geert] */
if (mode->Flags & V_BCAST)
var->sync |= FB_SYNC_BROADCAST;
-#endif
if (mode->Flags & V_INTERLACE)
var->vmode = FB_VMODE_INTERLACED;
else if (mode->Flags & V_DBLSCAN)
@@ -270,10 +260,8 @@ fbdev2xfree_timing(struct fb_var_screeninfo *var, DisplayModePtr mode)
mode->Flags |= var->sync & FB_SYNC_HOR_HIGH_ACT ? V_PHSYNC : V_NHSYNC;
mode->Flags |= var->sync & FB_SYNC_VERT_HIGH_ACT ? V_PVSYNC : V_NVSYNC;
mode->Flags |= var->sync & FB_SYNC_COMP_HIGH_ACT ? V_PCSYNC : V_NCSYNC;
-#if 1 /* Badly needed for PAL/NTSC on Amiga (amifb)!! [geert] */
if (var->sync & FB_SYNC_BROADCAST)
mode->Flags |= V_BCAST;
-#endif
if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED)
mode->Flags |= V_INTERLACE;
else if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE)
@@ -332,10 +320,9 @@ fbdev_open_pci(struct pci_device * pPci, char **namep)
return fd;
}
+ close(fd);
}
}
-
- close(fd);
}
diff --git a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h
index 614dc6fed..bc46b9c4f 100644
--- a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h
+++ b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h
@@ -13,50 +13,52 @@
#define FBDEVHW_TEXT 3 /* Text/attributes */
#define FBDEVHW_VGA_PLANES 4 /* EGA/VGA planes */
-Bool fbdevHWGetRec(ScrnInfoPtr pScrn);
-void fbdevHWFreeRec(ScrnInfoPtr pScrn);
-
-Bool fbdevHWProbe(struct pci_device * pPci, char *device, char **namep);
-Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device * pPci, char *device);
-
-char* fbdevHWGetName(ScrnInfoPtr pScrn);
-int fbdevHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp);
-int fbdevHWGetLineLength(ScrnInfoPtr pScrn);
-int fbdevHWGetType(ScrnInfoPtr pScrn);
-int fbdevHWGetVidmem(ScrnInfoPtr pScrn);
-
-void* fbdevHWMapVidmem(ScrnInfoPtr pScrn);
-int fbdevHWLinearOffset(ScrnInfoPtr pScrn);
-Bool fbdevHWUnmapVidmem(ScrnInfoPtr pScrn);
-void* fbdevHWMapMMIO(ScrnInfoPtr pScrn);
-Bool fbdevHWUnmapMMIO(ScrnInfoPtr pScrn);
-
-void fbdevHWSetVideoModes(ScrnInfoPtr pScrn);
-DisplayModePtr fbdevHWGetBuildinMode(ScrnInfoPtr pScrn);
-void fbdevHWUseBuildinMode(ScrnInfoPtr pScrn);
-Bool fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
-void fbdevHWSave(ScrnInfoPtr pScrn);
-void fbdevHWRestore(ScrnInfoPtr pScrn);
-
-void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
+extern _X_EXPORT Bool fbdevHWGetRec(ScrnInfoPtr pScrn);
+extern _X_EXPORT void fbdevHWFreeRec(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT int fbdevHWGetFD(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT Bool fbdevHWProbe(struct pci_device * pPci, char *device, char **namep);
+extern _X_EXPORT Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device * pPci, char *device);
+
+extern _X_EXPORT char* fbdevHWGetName(ScrnInfoPtr pScrn);
+extern _X_EXPORT int fbdevHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp);
+extern _X_EXPORT int fbdevHWGetLineLength(ScrnInfoPtr pScrn);
+extern _X_EXPORT int fbdevHWGetType(ScrnInfoPtr pScrn);
+extern _X_EXPORT int fbdevHWGetVidmem(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT void* fbdevHWMapVidmem(ScrnInfoPtr pScrn);
+extern _X_EXPORT int fbdevHWLinearOffset(ScrnInfoPtr pScrn);
+extern _X_EXPORT Bool fbdevHWUnmapVidmem(ScrnInfoPtr pScrn);
+extern _X_EXPORT void* fbdevHWMapMMIO(ScrnInfoPtr pScrn);
+extern _X_EXPORT Bool fbdevHWUnmapMMIO(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT void fbdevHWSetVideoModes(ScrnInfoPtr pScrn);
+extern _X_EXPORT DisplayModePtr fbdevHWGetBuildinMode(ScrnInfoPtr pScrn);
+extern _X_EXPORT void fbdevHWUseBuildinMode(ScrnInfoPtr pScrn);
+extern _X_EXPORT Bool fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
+extern _X_EXPORT void fbdevHWSave(ScrnInfoPtr pScrn);
+extern _X_EXPORT void fbdevHWRestore(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
LOCO *colors, VisualPtr pVisual);
-ModeStatus fbdevHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags);
-Bool fbdevHWSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
-void fbdevHWAdjustFrame(int scrnIndex, int x, int y, int flags);
-Bool fbdevHWEnterVT(int scrnIndex, int flags);
-void fbdevHWLeaveVT(int scrnIndex, int flags);
-void fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags);
-
-Bool fbdevHWSaveScreen(ScreenPtr pScreen, int mode);
-
-xf86SwitchModeProc *fbdevHWSwitchModeWeak(void);
-xf86AdjustFrameProc *fbdevHWAdjustFrameWeak(void);
-xf86EnterVTProc *fbdevHWEnterVTWeak(void);
-xf86LeaveVTProc *fbdevHWLeaveVTWeak(void);
-xf86ValidModeProc *fbdevHWValidModeWeak(void);
-xf86DPMSSetProc *fbdevHWDPMSSetWeak(void);
-xf86LoadPaletteProc *fbdevHWLoadPaletteWeak(void);
-SaveScreenProcPtr fbdevHWSaveScreenWeak(void);
+extern _X_EXPORT ModeStatus fbdevHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags);
+extern _X_EXPORT Bool fbdevHWSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
+extern _X_EXPORT void fbdevHWAdjustFrame(int scrnIndex, int x, int y, int flags);
+extern _X_EXPORT Bool fbdevHWEnterVT(int scrnIndex, int flags);
+extern _X_EXPORT void fbdevHWLeaveVT(int scrnIndex, int flags);
+extern _X_EXPORT void fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags);
+
+extern _X_EXPORT Bool fbdevHWSaveScreen(ScreenPtr pScreen, int mode);
+
+extern _X_EXPORT xf86SwitchModeProc *fbdevHWSwitchModeWeak(void);
+extern _X_EXPORT xf86AdjustFrameProc *fbdevHWAdjustFrameWeak(void);
+extern _X_EXPORT xf86EnterVTProc *fbdevHWEnterVTWeak(void);
+extern _X_EXPORT xf86LeaveVTProc *fbdevHWLeaveVTWeak(void);
+extern _X_EXPORT xf86ValidModeProc *fbdevHWValidModeWeak(void);
+extern _X_EXPORT xf86DPMSSetProc *fbdevHWDPMSSetWeak(void);
+extern _X_EXPORT xf86LoadPaletteProc *fbdevHWLoadPaletteWeak(void);
+extern _X_EXPORT SaveScreenProcPtr fbdevHWSaveScreenWeak(void);
#endif