aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/neomagic
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-06-28 22:07:26 +0000
committermarha <marha@users.sourceforge.net>2009-06-28 22:07:26 +0000
commit3562e78743202e43aec8727005182a2558117eca (patch)
tree8f9113a77d12470c5c851a2a8e4cb02e89df7d43 /xorg-server/hw/kdrive/neomagic
downloadvcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.gz
vcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.bz2
vcxsrv-3562e78743202e43aec8727005182a2558117eca.zip
Checked in the following released items:
xkeyboard-config-1.4.tar.gz ttf-bitstream-vera-1.10.tar.gz font-alias-1.0.1.tar.gz font-sun-misc-1.0.0.tar.gz font-sun-misc-1.0.0.tar.gz font-sony-misc-1.0.0.tar.gz font-schumacher-misc-1.0.0.tar.gz font-mutt-misc-1.0.0.tar.gz font-misc-misc-1.0.0.tar.gz font-misc-meltho-1.0.0.tar.gz font-micro-misc-1.0.0.tar.gz font-jis-misc-1.0.0.tar.gz font-isas-misc-1.0.0.tar.gz font-dec-misc-1.0.0.tar.gz font-daewoo-misc-1.0.0.tar.gz font-cursor-misc-1.0.0.tar.gz font-arabic-misc-1.0.0.tar.gz font-winitzki-cyrillic-1.0.0.tar.gz font-misc-cyrillic-1.0.0.tar.gz font-cronyx-cyrillic-1.0.0.tar.gz font-screen-cyrillic-1.0.1.tar.gz font-xfree86-type1-1.0.1.tar.gz font-adobe-utopia-type1-1.0.1.tar.gz font-ibm-type1-1.0.0.tar.gz font-bitstream-type1-1.0.0.tar.gz font-bitstream-speedo-1.0.0.tar.gz font-bh-ttf-1.0.0.tar.gz font-bh-type1-1.0.0.tar.gz font-bitstream-100dpi-1.0.0.tar.gz font-bh-lucidatypewriter-100dpi-1.0.0.tar.gz font-bh-100dpi-1.0.0.tar.gz font-adobe-utopia-100dpi-1.0.1.tar.gz font-adobe-100dpi-1.0.0.tar.gz font-util-1.0.1.tar.gz font-bitstream-75dpi-1.0.0.tar.gz font-bh-lucidatypewriter-75dpi-1.0.0.tar.gz font-adobe-utopia-75dpi-1.0.1.tar.gz font-bh-75dpi-1.0.0.tar.gz bdftopcf-1.0.1.tar.gz font-adobe-75dpi-1.0.0.tar.gz mkfontscale-1.0.6.tar.gz openssl-0.9.8k.tar.gz bigreqsproto-1.0.2.tar.gz xtrans-1.2.2.tar.gz resourceproto-1.0.2.tar.gz inputproto-1.4.4.tar.gz compositeproto-0.4.tar.gz damageproto-1.1.0.tar.gz zlib-1.2.3.tar.gz xkbcomp-1.0.5.tar.gz freetype-2.3.9.tar.gz pthreads-w32-2-8-0-release.tar.gz pixman-0.12.0.tar.gz kbproto-1.0.3.tar.gz evieext-1.0.2.tar.gz fixesproto-4.0.tar.gz recordproto-1.13.2.tar.gz randrproto-1.2.2.tar.gz scrnsaverproto-1.1.0.tar.gz renderproto-0.9.3.tar.gz xcmiscproto-1.1.2.tar.gz fontsproto-2.0.2.tar.gz xextproto-7.0.3.tar.gz xproto-7.0.14.tar.gz libXdmcp-1.0.2.tar.gz libxkbfile-1.0.5.tar.gz libfontenc-1.0.4.tar.gz libXfont-1.3.4.tar.gz libX11-1.1.5.tar.gz libXau-1.0.4.tar.gz libxcb-1.1.tar.gz xorg-server-1.5.3.tar.gz
Diffstat (limited to 'xorg-server/hw/kdrive/neomagic')
-rw-r--r--xorg-server/hw/kdrive/neomagic/Makefile.am49
-rw-r--r--xorg-server/hw/kdrive/neomagic/Makefile.in723
-rw-r--r--xorg-server/hw/kdrive/neomagic/README15
-rw-r--r--xorg-server/hw/kdrive/neomagic/neo_draw.c210
-rw-r--r--xorg-server/hw/kdrive/neomagic/neomagic.c335
-rw-r--r--xorg-server/hw/kdrive/neomagic/neomagic.h210
-rw-r--r--xorg-server/hw/kdrive/neomagic/neomagicstub.c73
7 files changed, 1615 insertions, 0 deletions
diff --git a/xorg-server/hw/kdrive/neomagic/Makefile.am b/xorg-server/hw/kdrive/neomagic/Makefile.am
new file mode 100644
index 000000000..b449c37c5
--- /dev/null
+++ b/xorg-server/hw/kdrive/neomagic/Makefile.am
@@ -0,0 +1,49 @@
+if KDRIVEFBDEV
+FBDEV_INCLUDES =-I$(top_srcdir)/hw/kdrive/fbdev
+FBDEV_LIBS = $(top_builddir)/hw/kdrive/fbdev/libfbdev.a
+endif
+
+if KDRIVEVESA
+VESA_INCLUDES = -I$(top_srcdir)/hw/kdrive/vesa
+VESA_LIBS = $(top_builddir)/hw/kdrive/vesa/libvesa.a
+endif
+
+INCLUDES = \
+ @KDRIVE_INCS@ \
+ $(FBDEV_INCLUDES) \
+ $(VESA_INCLUDES) \
+ @KDRIVE_CFLAGS@
+
+bin_PROGRAMS = Xneomagic
+
+noinst_LIBRARIES = libneomagic.a
+
+libneomagic_a_SOURCES = \
+ neomagic.c \
+ neomagic.h \
+ neo_draw.c
+
+Xneomagic_SOURCES = \
+ neomagicstub.c
+
+NEOMAGIC_LIBS = \
+ libneomagic.a \
+ ${FBDEV_LIBS} \
+ ${VESA_LIBS} \
+ @KDRIVE_LIBS@
+
+if GLX
+Xneomagic_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
+Xneomagic_LDADD = \
+ $(NEOMAGIC_LIBS) \
+ @KDRIVE_LIBS@ \
+ @XSERVER_LIBS@
+
+Xneomagic_DEPENDENCIES = \
+ libneomagic.a \
+ @KDRIVE_LOCAL_LIBS@
+
+relink:
+ rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS)
diff --git a/xorg-server/hw/kdrive/neomagic/Makefile.in b/xorg-server/hw/kdrive/neomagic/Makefile.in
new file mode 100644
index 000000000..db610a6dc
--- /dev/null
+++ b/xorg-server/hw/kdrive/neomagic/Makefile.in
@@ -0,0 +1,723 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = Xneomagic$(EXEEXT)
+subdir = hw/kdrive/neomagic
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
+ $(top_builddir)/include/xorg-server.h \
+ $(top_builddir)/include/dix-config.h \
+ $(top_builddir)/include/xgl-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
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+libneomagic_a_AR = $(AR) $(ARFLAGS)
+libneomagic_a_LIBADD =
+am_libneomagic_a_OBJECTS = neomagic.$(OBJEXT) neo_draw.$(OBJEXT)
+libneomagic_a_OBJECTS = $(am_libneomagic_a_OBJECTS)
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_Xneomagic_OBJECTS = neomagicstub.$(OBJEXT)
+Xneomagic_OBJECTS = $(am_Xneomagic_OBJECTS)
+am__DEPENDENCIES_1 = libneomagic.a $(FBDEV_LIBS) $(VESA_LIBS)
+Xneomagic_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(Xneomagic_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libneomagic_a_SOURCES) $(Xneomagic_SOURCES)
+DIST_SOURCES = $(libneomagic_a_SOURCES) $(Xneomagic_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
+ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+APPDEFAULTDIR = @APPDEFAULTDIR@
+APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
+APP_MAN_DIR = @APP_MAN_DIR@
+APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_FONT_PATH = @BASE_FONT_PATH@
+BUILD_DATE = @BUILD_DATE@
+BUILD_TIME = @BUILD_TIME@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DARWIN_LIBS = @DARWIN_LIBS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
+DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
+DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DGA_CFLAGS = @DGA_CFLAGS@
+DGA_LIBS = @DGA_LIBS@
+DIX_CFLAGS = @DIX_CFLAGS@
+DLLTOOL = @DLLTOOL@
+DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
+DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
+DMXMODULES_LIBS = @DMXMODULES_LIBS@
+DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
+DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
+DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
+DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
+DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
+DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
+DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@
+DRIPROTO_LIBS = @DRIPROTO_LIBS@
+DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
+DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
+DSYMUTIL = @DSYMUTIL@
+DTRACE = @DTRACE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILE_MAN_DIR = @FILE_MAN_DIR@
+FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
+GLX_DEFINES = @GLX_DEFINES@
+GL_CFLAGS = @GL_CFLAGS@
+GL_LIBS = @GL_LIBS@
+GREP = @GREP@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
+KDRIVE_INCS = @KDRIVE_INCS@
+KDRIVE_LIBS = @KDRIVE_LIBS@
+KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
+KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
+KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
+LAUNCHD = @LAUNCHD@
+LDFLAGS = @LDFLAGS@
+LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
+LIBDRM_LIBS = @LIBDRM_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_MAN_DIR = @LIB_MAN_DIR@
+LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
+LINUXDOC = @LINUXDOC@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+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@
+MKFONTDIR = @MKFONTDIR@
+MKFONTSCALE = @MKFONTSCALE@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCCLD = @OBJCCLD@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJCFLAGS = @OBJCFLAGS@
+OBJCLINK = @OBJCLINK@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
+PCIACCESS_LIBS = @PCIACCESS_LIBS@
+PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PROJECTROOT = @PROJECTROOT@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+RAWCPP = @RAWCPP@
+RAWCPPFLAGS = @RAWCPPFLAGS@
+SED = @SED@
+SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
+SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
+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@
+VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
+VENDOR_RELEASE = @VENDOR_RELEASE@
+VERSION = @VERSION@
+X11APP_ARCHS = @X11APP_ARCHS@
+X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
+X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
+XDMCP_CFLAGS = @XDMCP_CFLAGS@
+XDMCP_LIBS = @XDMCP_LIBS@
+XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
+XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
+XDMX_CFLAGS = @XDMX_CFLAGS@
+XDMX_LIBS = @XDMX_LIBS@
+XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
+XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@
+XEGL_LIBS = @XEGL_LIBS@
+XEGL_SYS_LIBS = @XEGL_SYS_LIBS@
+XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
+XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@
+XEPHYR_INCS = @XEPHYR_INCS@
+XEPHYR_LIBS = @XEPHYR_LIBS@
+XF86CONFIGFILE = @XF86CONFIGFILE@
+XF86MISC_CFLAGS = @XF86MISC_CFLAGS@
+XF86MISC_LIBS = @XF86MISC_LIBS@
+XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@
+XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@
+XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@
+XGLMODULES_LIBS = @XGLMODULES_LIBS@
+XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@
+XGLXMODULES_LIBS = @XGLXMODULES_LIBS@
+XGLX_LIBS = @XGLX_LIBS@
+XGLX_SYS_LIBS = @XGLX_SYS_LIBS@
+XGL_LIBS = @XGL_LIBS@
+XGL_MODULE_PATH = @XGL_MODULE_PATH@
+XGL_SYS_LIBS = @XGL_SYS_LIBS@
+XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
+XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
+XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
+XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
+XLIB_CFLAGS = @XLIB_CFLAGS@
+XLIB_LIBS = @XLIB_LIBS@
+XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
+XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
+XNEST_LIBS = @XNEST_LIBS@
+XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
+XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@
+XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@
+XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@
+XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@
+XORG_CFLAGS = @XORG_CFLAGS@
+XORG_INCS = @XORG_INCS@
+XORG_LIBS = @XORG_LIBS@
+XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
+XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
+XORG_OS = @XORG_OS@
+XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
+XORG_SYS_LIBS = @XORG_SYS_LIBS@
+XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@
+XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@
+XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@
+XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@
+XPRINT_CFLAGS = @XPRINT_CFLAGS@
+XPRINT_LIBS = @XPRINT_LIBS@
+XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@
+XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
+XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
+XSDL_INCS = @XSDL_INCS@
+XSDL_LIBS = @XSDL_LIBS@
+XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
+XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
+XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
+XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
+XSERVER_LIBS = @XSERVER_LIBS@
+XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
+XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
+XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
+XVFB_LIBS = @XVFB_LIBS@
+XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
+XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
+XWINMODULES_LIBS = @XWINMODULES_LIBS@
+XWIN_LIBS = @XWIN_LIBS@
+XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
+XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
+YACC = @YACC@
+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@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+driverdir = @driverdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+extdir = @extdir@
+ft_config = @ft_config@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+launchagentsdir = @launchagentsdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+logdir = @logdir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+moduledir = @moduledir@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sdkdir = @sdkdir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+xglmoduledir = @xglmoduledir@
+xpconfigdir = @xpconfigdir@
+@KDRIVEFBDEV_TRUE@FBDEV_INCLUDES = -I$(top_srcdir)/hw/kdrive/fbdev
+@KDRIVEFBDEV_TRUE@FBDEV_LIBS = $(top_builddir)/hw/kdrive/fbdev/libfbdev.a
+@KDRIVEVESA_TRUE@VESA_INCLUDES = -I$(top_srcdir)/hw/kdrive/vesa
+@KDRIVEVESA_TRUE@VESA_LIBS = $(top_builddir)/hw/kdrive/vesa/libvesa.a
+INCLUDES = \
+ @KDRIVE_INCS@ \
+ $(FBDEV_INCLUDES) \
+ $(VESA_INCLUDES) \
+ @KDRIVE_CFLAGS@
+
+noinst_LIBRARIES = libneomagic.a
+libneomagic_a_SOURCES = \
+ neomagic.c \
+ neomagic.h \
+ neo_draw.c
+
+Xneomagic_SOURCES = \
+ neomagicstub.c
+
+NEOMAGIC_LIBS = \
+ libneomagic.a \
+ ${FBDEV_LIBS} \
+ ${VESA_LIBS} \
+ @KDRIVE_LIBS@
+
+@GLX_TRUE@Xneomagic_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+Xneomagic_LDADD = \
+ $(NEOMAGIC_LIBS) \
+ @KDRIVE_LIBS@ \
+ @XSERVER_LIBS@
+
+Xneomagic_DEPENDENCIES = \
+ libneomagic.a \
+ @KDRIVE_LOCAL_LIBS@
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/kdrive/neomagic/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign hw/kdrive/neomagic/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libneomagic.a: $(libneomagic_a_OBJECTS) $(libneomagic_a_DEPENDENCIES)
+ -rm -f libneomagic.a
+ $(libneomagic_a_AR) libneomagic.a $(libneomagic_a_OBJECTS) $(libneomagic_a_LIBADD)
+ $(RANLIB) libneomagic.a
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+Xneomagic$(EXEEXT): $(Xneomagic_OBJECTS) $(Xneomagic_DEPENDENCIES)
+ @rm -f Xneomagic$(EXEEXT)
+ $(Xneomagic_LINK) $(Xneomagic_OBJECTS) $(Xneomagic_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neo_draw.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neomagic.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neomagicstub.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES) $(PROGRAMS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool \
+ clean-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool clean-noinstLIBRARIES ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS
+
+
+relink:
+ rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/xorg-server/hw/kdrive/neomagic/README b/xorg-server/hw/kdrive/neomagic/README
new file mode 100644
index 000000000..2b086d75c
--- /dev/null
+++ b/xorg-server/hw/kdrive/neomagic/README
@@ -0,0 +1,15 @@
+Neomagic KDrive driver for xserver
+
+This is a very simple implementation for Neomagic based cards.
+Almost all functions are handled by the VESA driver, and
+only solid drawing and bitblt are done with acceleration,
+
+This driver has been tested in MagicGraph 256AV+(NM2230) card
+but it should work on other cards as well.
+
+The only warning is to choose a working mode. You can ask
+for supported modes using -listmodes. I use -mode 0x117.
+
+--
+Franco Catrin L.
+fcatrin@tuxpan.com
diff --git a/xorg-server/hw/kdrive/neomagic/neo_draw.c b/xorg-server/hw/kdrive/neomagic/neo_draw.c
new file mode 100644
index 000000000..89452b3d8
--- /dev/null
+++ b/xorg-server/hw/kdrive/neomagic/neo_draw.c
@@ -0,0 +1,210 @@
+/*
+ *
+ * Copyright © 2004 Franco Catrin
+ *
+ * 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 Franco Catrin not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Franco Catrin makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * FRANCO CATRIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL FRANCO CATRIN 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <kdrive-config.h>
+#endif
+#include "neomagic.h"
+
+#include <X11/Xmd.h>
+#include "gcstruct.h"
+#include "scrnintstr.h"
+#include "pixmapstr.h"
+#include "regionstr.h"
+#include "mistruct.h"
+#include "dixfontstr.h"
+#include "fb.h"
+#include "migc.h"
+#include "miline.h"
+#include "picturestr.h"
+
+NeoMMIO *mmio;
+NeoScreenInfo *screen;
+NeoCardInfo *card;
+CARD32 fgColor;
+CARD32 rop;
+
+CARD32 neoRop[16] = {
+ 0x000000, /* GXclear */
+ 0x080000, /* GXand */
+ 0x040000, /* GXandReverse */
+ 0x0c0000, /* GXcopy */
+ 0x020000, /* GXandInvert */
+ 0x0a0000, /* GXnoop */
+ 0x060000, /* GXxor */
+ 0x0e0000, /* GXor */
+ 0x010000, /* GXnor */
+ 0x090000, /* GXequiv */
+ 0x050000, /* GXinvert */
+ 0x0d0000, /* GXorReverse */
+ 0x030000, /* GXcopyInvert */
+ 0x0b0000, /* GXorInverted */
+ 0x070000, /* GXnand */
+ 0x0f0000 /* GXset */
+};
+
+static void neoWaitIdle(NeoCardInfo *neoc)
+{
+ // if MMIO is not working it may halt the machine
+ unsigned int i = 0;
+ while ((mmio->bltStat & 1) && ++i<100000);
+}
+
+static void neoWaitMarker (ScreenPtr pScreen, int marker)
+{
+ KdScreenPriv(pScreen);
+ neoCardInfo(pScreenPriv);
+
+ neoWaitIdle(neoc);
+}
+
+
+static Bool neoPrepareSolid(PixmapPtr pPixmap,
+ int alu,
+ Pixel pm,
+ Pixel fg)
+{
+ FbBits depthMask = FbFullMask(pPixmap->drawable.depth);
+ if ((pm & depthMask) != depthMask) {
+ return FALSE;
+ } else {
+ fgColor = fg;
+ if (alu!=3) DBGOUT("used ROP %i\n", alu);
+ rop = neoRop[alu];
+ return TRUE;
+ }
+}
+
+static void neoSolid (int x1, int y1, int x2, int y2)
+{
+ int x, y, w, h;
+ x = x1;
+ y = y1;
+ w = x2-x1;
+ h = y2-y1;
+ neoWaitIdle(card);
+ mmio->fgColor = fgColor;
+ mmio->bltCntl =
+ NEO_BC3_FIFO_EN |
+ NEO_BC0_SRC_IS_FG |
+ NEO_BC3_SKIP_MAPPING | rop;
+ mmio->dstStart = y * screen->pitch + x * screen->depth;
+
+ mmio->xyExt = (unsigned long)(h << 16) | (w & 0xffff);
+
+}
+
+
+static void neoDoneSolid(void)
+{
+}
+
+static Bool neoPrepareCopy (PixmapPtr pSrcPixpam, PixmapPtr pDstPixmap,
+ int dx, int dy, int alu, Pixel pm)
+{
+ rop = neoRop[alu];
+ return TRUE;
+}
+
+static void neoCopy (int srcX, int srcY, int dstX, int dstY, int w, int h)
+{
+ neoWaitIdle(card);
+
+ if ((dstY < srcY) || ((dstY == srcY) && (dstX < srcX))) {
+ mmio->bltCntl =
+ NEO_BC3_FIFO_EN |
+ NEO_BC3_SKIP_MAPPING | rop;
+ mmio->srcStart = srcY * screen->pitch + srcX * screen->depth;
+ mmio->dstStart = dstY * screen->pitch + dstX * screen->depth;
+
+ mmio->xyExt = (unsigned long)(h << 16) | (w & 0xffff);
+ } else {
+ mmio->bltCntl = NEO_BC0_X_DEC |
+ NEO_BC0_DST_Y_DEC |
+ NEO_BC0_SRC_Y_DEC |
+ NEO_BC3_FIFO_EN |
+ NEO_BC3_SKIP_MAPPING | rop;
+ srcX+=w-1;
+ dstX+=w-1;
+ srcY+=h-1;
+ dstY+=h-1;
+ mmio->srcStart = srcY * screen->pitch + srcX * screen->depth;
+ mmio->dstStart = dstY * screen->pitch + dstX * screen->depth;
+ mmio->xyExt = (unsigned long)(h << 16) | (w & 0xffff);
+ }
+
+}
+
+static void neoDoneCopy (void)
+{
+}
+
+
+Bool neoDrawInit (ScreenPtr pScreen)
+{
+ KdScreenPriv(pScreen);
+ neoScreenInfo(pScreenPriv);
+
+ ENTER();
+
+ memset(&neos->kaa, 0, sizeof(KaaScreenInfoRec));
+ neos->kaa.waitMarker = neoWaitMarker;
+ neos->kaa.PrepareSolid = neoPrepareSolid;
+ neos->kaa.Solid = neoSolid;
+ neos->kaa.DoneSolid = neoDoneSolid;
+ neos->kaa.PrepareCopy = neoPrepareCopy;
+ neos->kaa.Copy = neoCopy;
+ neos->kaa.DoneCopy = neoDoneCopy;
+
+ if (!kaaDrawInit (pScreen, &neos->kaa)) {
+ return FALSE;
+ }
+ LEAVE();
+ return TRUE;
+}
+
+void neoDrawEnable (ScreenPtr pScreen)
+{
+ ENTER();
+ SetupNeo(pScreen);
+ screen = neos;
+ card = neoc;
+ mmio = neoc->mmio;
+ screen->depth = (screen->backendScreen.mode.BitsPerPixel+7)/8;
+ screen->pitch = screen->backendScreen.mode.BytesPerScanLine;
+ DBGOUT("NEO depth=%x, pitch=%x\n", screen->depth, screen->pitch);
+ LEAVE();
+}
+
+void neoDrawDisable (ScreenPtr pScreen)
+{
+ ENTER();
+ LEAVE();
+}
+
+void neoDrawFini (ScreenPtr pScreen)
+{
+ ENTER();
+ LEAVE();
+}
+
diff --git a/xorg-server/hw/kdrive/neomagic/neomagic.c b/xorg-server/hw/kdrive/neomagic/neomagic.c
new file mode 100644
index 000000000..ac0c7569a
--- /dev/null
+++ b/xorg-server/hw/kdrive/neomagic/neomagic.c
@@ -0,0 +1,335 @@
+/*
+ *
+ * Copyright © 2004 Franco Catrin
+ *
+ * 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 Franco Catrin not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Franco Catrin makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * FRANCO CATRIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL FRANCO CATRIN 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <kdrive-config.h>
+#endif
+#include "neomagic.h"
+#include <sys/io.h>
+
+struct NeoChipInfo neoChips[] = {
+ {NEO_VENDOR, 0x0001, CAP_NM2070, "MagicGraph 128(NM2070)",
+ 896, 65000, 2048, 0x100, 1024, 1024, 1024},
+ {NEO_VENDOR, 0x0002, CAP_NM2090, "MagicGraph 128V(NM2090)",
+ 1152, 80000, 2048, 0x100, 2048, 1024, 1024},
+ {NEO_VENDOR, 0x0003, CAP_NM2090, "MagicGraph 128ZV(NM2093)",
+ 1152, 80000, 2048, 0x100, 2048, 1024, 1024},
+ {NEO_VENDOR, 0x0083, CAP_NM2097, "MagicGraph 128ZV+(NM2097)",
+ 1152, 80000, 1024, 0x100, 2048, 1024, 1024},
+ {NEO_VENDOR, 0x0004, CAP_NM2097, "MagicGraph 128XD(NM2160)",
+ 2048, 90000, 1024, 0x100, 2048, 1024, 1024},
+ {NEO_VENDOR, 0x0005, CAP_NM2200, "MagicGraph 256AV(NM2200)",
+ 2560, 110000, 1024, 0x1000, 4096, 1280, 1024},
+ {NEO_VENDOR, 0x0025, CAP_NM2200, "MagicGraph 256AV+(NM2230)",
+ 3008, 110000, 1024, 0x1000, 4096, 1280, 1024},
+ {NEO_VENDOR, 0x0006, CAP_NM2200, "MagicGraph 256ZX(NM2360)",
+ 4096, 110000, 1024, 0x1000, 4096, 1280, 1024},
+ {NEO_VENDOR, 0x0016, CAP_NM2200, "MagicGraph 256XL+(NM2380)",
+ 6144, 110000, 1024, 0x1000, 8192, 1280, 1024},
+ {0, 0, 0, NULL},
+};
+
+static Bool
+neoCardInit(KdCardInfo *card)
+{
+ NeoCardInfo *neoc;
+ struct NeoChipInfo *chip;
+
+ neoc =(NeoCardInfo *) xalloc(sizeof(NeoCardInfo));
+ if(!neoc) {
+ return FALSE;
+ }
+
+ if(!vesaInitialize(card, &neoc->backendCard)) {
+ xfree(neoc);
+ return FALSE;
+ }
+
+ for(chip = neoChips; chip->name != NULL; ++chip) {
+ if(chip->device == card->attr.deviceID) {
+ neoc->chip = chip;
+ break;
+ }
+ }
+
+ ErrorF("Using Neomagic card: %s\n", neoc->chip->name);
+
+ neoMapReg(card, neoc);
+
+ card->driver = neoc;
+
+ return TRUE;
+}
+
+static Bool
+neoScreenInit(KdScreenInfo *screen)
+{
+ NeoScreenInfo *neos;
+ int screen_size, memory;
+
+ neos = xcalloc(sizeof(NeoScreenInfo), 1);
+ if(neos == NULL) {
+ return FALSE;
+ }
+
+ memset (neos, '\0', sizeof (NeoScreenInfo));
+
+
+ if(!vesaScreenInitialize(screen, &neos->backendScreen)) {
+ xfree(neos);
+ return FALSE;
+ }
+
+ screen->softCursor = TRUE; // no hardware color cursor available
+
+ neos->screen = neos->backendScreen.fb;
+
+ memory = neos->backendScreen.fb_size;
+ screen_size = screen->fb[0].byteStride * screen->height;
+ memory -= screen_size;
+
+ if(memory > screen->fb[0].byteStride) {
+ neos->off_screen = neos->screen + screen_size;
+ neos->off_screen_size = memory;
+ } else {
+ neos->off_screen = 0;
+ neos->off_screen_size = 0;
+ }
+
+ screen->driver = neos;
+
+ return TRUE;
+}
+
+static Bool
+neoInitScreen(ScreenPtr pScreen)
+{
+ return vesaInitScreen(pScreen);
+}
+
+static Bool
+neoFinishInitScreen(ScreenPtr pScreen)
+{
+ return vesaFinishInitScreen(pScreen);
+}
+
+static Bool
+neoCreateResources(ScreenPtr pScreen)
+{
+ return vesaCreateResources(pScreen);
+}
+
+void
+neoPreserve(KdCardInfo *card)
+{
+ vesaPreserve(card);
+}
+
+CARD8
+neoGetIndex(NeoCardInfo *nvidiac, CARD16 addr, CARD8 index)
+{
+ outb(index, addr);
+
+ return inb(addr+1);
+}
+
+void
+neoSetIndex(NeoCardInfo *nvidiac, CARD16 addr, CARD8 index, CARD8 val)
+{
+ outb(index, addr);
+ outb(val, addr+1);
+}
+
+static void neoLock(NeoCardInfo *neoc){
+ CARD8 cr11;
+ neoSetIndex(neoc, 0x3ce, 0x09, 0x00);
+ neoSetIndex(neoc, 0x3ce, 0x11, 0x0); // disable MMIO and linear mode
+ cr11 = neoGetIndex(neoc, 0x3d4, 0x11);
+ neoSetIndex(neoc, 0x3d4, 0x11, cr11 | 0x80);
+}
+
+static void neoUnlock(NeoCardInfo *neoc){
+ CARD8 cr11;
+ cr11 = neoGetIndex(neoc, 0x3d4, 0x11);
+ neoSetIndex(neoc, 0x3d4, 0x11, cr11 & 0x7F);
+ neoSetIndex(neoc, 0x3ce, 0x09, 0x26);
+ neoSetIndex(neoc, 0x3ce, 0x11, 0xc0); // enable MMIO and linear mode
+}
+
+
+Bool
+neoMapReg(KdCardInfo *card, NeoCardInfo *neoc)
+{
+ neoc->reg_base = card->attr.address[1] & 0xFFF80000;
+ if(!neoc->reg_base) {
+ return FALSE;
+ }
+
+ neoc->mmio = KdMapDevice(neoc->reg_base, NEO_REG_SIZE(card));
+ if(!neoc->mmio) {
+ return FALSE;
+ }
+
+ KdSetMappedMode(neoc->reg_base, NEO_REG_SIZE(card), KD_MAPPED_MODE_REGISTERS);
+
+ return TRUE;
+}
+
+void
+neoUnmapReg(KdCardInfo *card, NeoCardInfo *neoc)
+{
+ if(neoc->reg_base)
+ {
+ neoSetIndex(neoc, 0x3ce, 0x82,0);
+ KdResetMappedMode(neoc->reg_base, NEO_REG_SIZE(card), KD_MAPPED_MODE_REGISTERS);
+ KdUnmapDevice((void *)neoc->mmio, NEO_REG_SIZE(card));
+ neoc->reg_base = 0;
+ }
+}
+
+static void
+neoSetMMIO(KdCardInfo *card, NeoCardInfo *neoc)
+{
+ if(!neoc->reg_base)
+ neoMapReg(card, neoc);
+ neoUnlock(neoc);
+}
+
+static void
+neoResetMMIO(KdCardInfo *card, NeoCardInfo *neoc)
+{
+ neoUnmapReg(card, neoc);
+ neoLock(neoc);
+}
+
+
+Bool
+neoEnable(ScreenPtr pScreen)
+{
+ KdScreenPriv(pScreen);
+ neoCardInfo(pScreenPriv);
+
+ if(!vesaEnable(pScreen)) {
+ return FALSE;
+ }
+
+ neoSetMMIO(pScreenPriv->card, neoc);
+ return TRUE;
+}
+
+void
+neoDisable(ScreenPtr pScreen)
+{
+ KdScreenPriv(pScreen);
+ neoCardInfo(pScreenPriv);
+
+ neoResetMMIO(pScreenPriv->card, neoc);
+
+ vesaDisable(pScreen);
+}
+
+static void
+neoGetColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
+{
+ vesaGetColors(pScreen, fb, n, pdefs);
+}
+
+static void
+neoPutColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
+{
+ vesaPutColors(pScreen, fb, n, pdefs);
+}
+
+static Bool
+neoDPMS(ScreenPtr pScreen, int mode)
+{
+ return vesaDPMS(pScreen, mode);
+}
+
+static void
+neoRestore(KdCardInfo *card)
+{
+ NeoCardInfo *neoc = card->driver;
+
+ neoResetMMIO(card, neoc);
+ vesaRestore(card);
+}
+
+static void
+neoScreenFini(KdScreenInfo *screen)
+{
+ NeoScreenInfo *neos =(NeoScreenInfo *) screen->driver;
+
+ vesaScreenFini(screen);
+ xfree(neos);
+ screen->driver = 0;
+}
+
+static void
+neoCardFini(KdCardInfo *card)
+{
+ NeoCardInfo *neoc = card->driver;
+
+ neoUnmapReg(card, neoc);
+ vesaCardFini(card);
+}
+
+#define neoCursorInit 0 // initCursor
+#define neoCursorEnable 0 // enableCursor
+#define neoCursorDisable 0 // disableCursor
+#define neoCursorFini 0 // finiCursor */
+#define neoRecolorCursor 0 // recolorCursor */
+//#define neoDrawInit 0 // initAccel
+//#define neoDrawEnable 0 // enableAccel
+//#define neoDrawSync 0 // syncAccel
+//#define neoDrawDisable 0 // disableAccel
+//#define neoDrawFini 0 // finiAccel
+
+KdCardFuncs neoFuncs = {
+ neoCardInit, // cardinit
+ neoScreenInit, // scrinit
+ neoInitScreen, // initScreen
+ neoFinishInitScreen, // finishInitScreen
+ neoCreateResources, // createRes
+ neoPreserve, // preserve
+ neoEnable, // enable
+ neoDPMS, // dpms
+ neoDisable, // disable
+ neoRestore, // restore
+ neoScreenFini, // scrfini
+ neoCardFini, // cardfini
+
+ neoCursorInit, // initCursor
+ neoCursorEnable, // enableCursor
+ neoCursorDisable, // disableCursor
+ neoCursorFini, // finiCursor
+ neoRecolorCursor, // recolorCursor
+
+ neoDrawInit, // initAccel
+ neoDrawEnable, // enableAccel
+ neoDrawDisable, // disableAccel
+ neoDrawFini, // finiAccel
+
+ neoGetColors, // getColors
+ neoPutColors, // putColors
+};
diff --git a/xorg-server/hw/kdrive/neomagic/neomagic.h b/xorg-server/hw/kdrive/neomagic/neomagic.h
new file mode 100644
index 000000000..9b100051b
--- /dev/null
+++ b/xorg-server/hw/kdrive/neomagic/neomagic.h
@@ -0,0 +1,210 @@
+/*
+ *
+ * Copyright © 2004 Franco Catrin
+ *
+ * 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 Franco Catrin not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Franco Catrin makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * FRANCO CATRIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL FRANCO CATRIN 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.
+ */
+
+#ifndef _NEOMAGIC_H_
+#define _NEOMAGIC_H_
+#include <backend.h>
+#include "kxv.h"
+#include "klinux.h"
+#include "vesa.h"
+
+
+#define DBGOUT DebugF
+
+#define ENTER() DBGOUT("Enter %s\n", __FUNCTION__)
+#define LEAVE() DBGOUT("Leave %s\n", __FUNCTION__)
+
+#define NEO_VENDOR 0x10c8
+#define CAP_NM2070 0x01 /* If it's a NM2070 series */
+#define CAP_NM2090 0x02 /* If it's a NM2090 series */
+#define CAP_NM2097 0x03 /* If it's a NM2097 series */
+#define CAP_NM2200 0x04 /* If it's a NM2200 series */
+
+#define NEO_BS0_BLT_BUSY 0x00000001
+#define NEO_BS0_FIFO_AVAIL 0x00000002
+#define NEO_BS0_FIFO_PEND 0x00000004
+
+#define NEO_BC0_DST_Y_DEC 0x00000001
+#define NEO_BC0_X_DEC 0x00000002
+#define NEO_BC0_SRC_TRANS 0x00000004
+#define NEO_BC0_SRC_IS_FG 0x00000008
+#define NEO_BC0_SRC_Y_DEC 0x00000010
+#define NEO_BC0_FILL_PAT 0x00000020
+#define NEO_BC0_SRC_MONO 0x00000040
+#define NEO_BC0_SYS_TO_VID 0x00000080
+
+#define NEO_BC1_DEPTH8 0x00000100
+#define NEO_BC1_DEPTH16 0x00000200
+#define NEO_BC1_X_320 0x00000400
+#define NEO_BC1_X_640 0x00000800
+#define NEO_BC1_X_800 0x00000c00
+#define NEO_BC1_X_1024 0x00001000
+#define NEO_BC1_X_1152 0x00001400
+#define NEO_BC1_X_1280 0x00001800
+#define NEO_BC1_X_1600 0x00001c00
+#define NEO_BC1_DST_TRANS 0x00002000
+#define NEO_BC1_MSTR_BLT 0x00004000
+#define NEO_BC1_FILTER_Z 0x00008000
+
+#define NEO_BC2_WR_TR_DST 0x00800000
+
+#define NEO_BC3_SRC_XY_ADDR 0x01000000
+#define NEO_BC3_DST_XY_ADDR 0x02000000
+#define NEO_BC3_CLIP_ON 0x04000000
+#define NEO_BC3_FIFO_EN 0x08000000
+#define NEO_BC3_BLT_ON_ADDR 0x10000000
+#define NEO_BC3_SKIP_MAPPING 0x80000000
+
+#define NEO_MODE1_DEPTH8 0x0100
+#define NEO_MODE1_DEPTH16 0x0200
+#define NEO_MODE1_DEPTH24 0x0300
+#define NEO_MODE1_X_320 0x0400
+#define NEO_MODE1_X_640 0x0800
+#define NEO_MODE1_X_800 0x0c00
+#define NEO_MODE1_X_1024 0x1000
+#define NEO_MODE1_X_1152 0x1400
+#define NEO_MODE1_X_1280 0x1800
+#define NEO_MODE1_X_1600 0x1c00
+#define NEO_MODE1_BLT_ON_ADDR 0x2000
+
+typedef volatile CARD8 VOL8;
+typedef volatile CARD16 VOL16;
+typedef volatile CARD32 VOL32;
+
+#define NEO_REG_SIZE(c) (0x200000L)
+
+typedef volatile struct {
+ CARD32 bltStat;
+ CARD32 bltCntl;
+ CARD32 xpColor;
+ CARD32 fgColor;
+ CARD32 bgColor;
+ CARD32 pitch;
+ CARD32 clipLT;
+ CARD32 clipRB;
+ CARD32 srcBitOffset;
+ CARD32 srcStart;
+ CARD32 reserved0;
+ CARD32 dstStart;
+ CARD32 xyExt;
+
+ CARD32 reserved1[19];
+
+ CARD32 pageCntl;
+ CARD32 pageBase;
+ CARD32 postBase;
+ CARD32 postPtr;
+ CARD32 dataPtr;
+} NeoMMIO;
+
+typedef struct _neoCardInfo {
+ VesaCardPrivRec backendCard;
+
+ CARD32 reg_base;
+ NeoMMIO *mmio;
+ int dstOrg;
+ int dstPitch;
+ int dstPixelWidth;
+
+ int srcOrg;
+ int srcPitch;
+ int srcPixelWidth;
+
+ struct NeoChipInfo *chip;
+
+ CARD32 bltCntl;
+
+} NeoCardInfo;
+
+struct NeoChipInfo {
+ CARD16 vendor;
+ CARD16 device;
+ CARD8 caps;
+ char *name;
+ int videoRam;
+ int maxClock;
+ int cursorMem;
+ int cursorOff;
+ int linearSize;
+ int maxWidth;
+ int maxHeight;
+};
+
+#define getNeoCardInfo(kd) ((NeoCardInfo *) ((kd)->card->driver))
+#define neoCardInfo(kd) NeoCardInfo *neoc = getNeoCardInfo(kd)
+
+typedef struct _neoScreenInfo {
+ VesaScreenPrivRec backendScreen;
+
+ CARD8 *screen;
+ CARD8 *off_screen;
+ int off_screen_size;
+ int pitch;
+ int depth;
+ KdVideoAdaptorPtr pAdaptor;
+ KaaScreenInfoRec kaa;
+} NeoScreenInfo;
+
+#define getNeoScreenInfo(kd) ((NeoScreenInfo *) ((kd)->screen->driver))
+#define neoScreenInfo(kd) NeoScreenInfo *neos = getNeoScreenInfo(kd)
+
+#define SetupNeo(s) KdScreenPriv(s); \
+ neoCardInfo(pScreenPriv); \
+ neoScreenInfo(pScreenPriv);
+
+void
+neoPreserve (KdCardInfo *card);
+
+Bool
+neoEnable (ScreenPtr pScreen);
+
+void
+neoDisable (ScreenPtr pScreen);
+
+Bool
+neoMapReg (KdCardInfo *card, NeoCardInfo *nvidiac);
+
+void
+neoUnmapReg (KdCardInfo *card, NeoCardInfo *nvidiac);
+
+CARD8
+neoGetIndex (NeoCardInfo *nvidiac, CARD16 addr, CARD8 id);
+
+void
+neoSetIndex (NeoCardInfo *nvidiac, CARD16 addr, CARD8 id, CARD8 val);
+
+Bool
+neoDrawInit (ScreenPtr pScreen);
+
+void
+neoDrawEnable (ScreenPtr pScreen);
+
+void
+neoDrawDisable (ScreenPtr pScreen);
+
+void
+neoDrawFini (ScreenPtr pScreen);
+
+extern KdCardFuncs neoFuncs;
+
+#endif /* _NEOMAGIC_H_ */
diff --git a/xorg-server/hw/kdrive/neomagic/neomagicstub.c b/xorg-server/hw/kdrive/neomagic/neomagicstub.c
new file mode 100644
index 000000000..c7ec83b44
--- /dev/null
+++ b/xorg-server/hw/kdrive/neomagic/neomagicstub.c
@@ -0,0 +1,73 @@
+/*
+ *
+ * Copyright © 2004 Franco Catrin
+ *
+ * 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 Franco Catrin not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Franco Catrin makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * FRANCO CATRIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL FRANCO CATRIN 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <kdrive-config.h>
+#endif
+#include "neomagic.h"
+
+extern struct NeoChipInfo neoChips[];
+
+void
+InitCard (char *name)
+{
+ KdCardAttr attr;
+ struct NeoChipInfo *chip;
+
+ for (chip = neoChips; chip->name != NULL; ++chip) {
+ int j = 0;
+ while (LinuxFindPci(chip->vendor, chip->device, j++, &attr)) {
+ KdCardInfoAdd(&neoFuncs, &attr, 0);
+ }
+ }
+}
+
+void
+InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv)
+{
+ KdInitOutput (pScreenInfo, argc, argv);
+}
+
+void
+InitInput (int argc, char **argv)
+{
+ KdOsAddInputDrivers ();
+ KdInitInput ();
+}
+
+void
+ddxUseMsg (void)
+{
+ KdUseMsg();
+ vesaUseMsg();
+}
+
+int
+ddxProcessArgument (int argc, char **argv, int i)
+{
+ int ret;
+
+ if (!(ret = vesaProcessArgument (argc, argv, i)))
+ ret = KdProcessArgument(argc, argv, i);
+ return ret;
+}