aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-12-01 06:54:34 +0000
committermarha <marha@users.sourceforge.net>2010-12-01 06:54:34 +0000
commit30eaf03aef5847adb6da7efd4bbf4a4abaf5d738 (patch)
tree9096dda170059f36806901aee59b8cf2a839a9e9 /xorg-server/hw/xfree86
parent57818d0fe4f7cf94279909f03ec11b326b284f1e (diff)
downloadvcxsrv-30eaf03aef5847adb6da7efd4bbf4a4abaf5d738.tar.gz
vcxsrv-30eaf03aef5847adb6da7efd4bbf4a4abaf5d738.tar.bz2
vcxsrv-30eaf03aef5847adb6da7efd4bbf4a4abaf5d738.zip
xserver libX11 libxcb update 1/12/2010
Diffstat (limited to 'xorg-server/hw/xfree86')
-rw-r--r--xorg-server/hw/xfree86/Makefile.am240
-rw-r--r--xorg-server/hw/xfree86/common/xf86.h3
-rw-r--r--xorg-server/hw/xfree86/common/xf86Globals.c1
-rw-r--r--xorg-server/hw/xfree86/common/xf86Init.c3
-rw-r--r--xorg-server/hw/xfree86/common/xf86Mode.c21
-rw-r--r--xorg-server/hw/xfree86/doc/sgml/DESIGN.xml8
-rw-r--r--xorg-server/hw/xfree86/loader/sdksyms.sh8
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Cursors.c62
-rw-r--r--xorg-server/hw/xfree86/os-support/Makefile.am52
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_init.c108
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c15
-rw-r--r--xorg-server/hw/xfree86/os-support/sysv/Makefile.am1
-rw-r--r--xorg-server/hw/xfree86/os-support/sysv/sysv_init.c252
-rw-r--r--xorg-server/hw/xfree86/os-support/sysv/sysv_video.c315
-rw-r--r--xorg-server/hw/xfree86/vbe/vbe.c5
-rw-r--r--xorg-server/hw/xfree86/xaa/xaa.h2790
-rw-r--r--xorg-server/hw/xfree86/xf8_16bpp/Makefile.am11
-rw-r--r--xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h37
-rw-r--r--xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c78
19 files changed, 1622 insertions, 2388 deletions
diff --git a/xorg-server/hw/xfree86/Makefile.am b/xorg-server/hw/xfree86/Makefile.am
index 116113b1a..c948afdcf 100644
--- a/xorg-server/hw/xfree86/Makefile.am
+++ b/xorg-server/hw/xfree86/Makefile.am
@@ -1,120 +1,120 @@
-include $(top_srcdir)/cpprules.in
-
-if DRI
-DRI_SUBDIR = dri
-endif
-
-if DRI2
-DRI2_SUBDIR = dri2
-endif
-
-if XF86UTILS
-XF86UTILS_SUBDIR = utils
-endif
-
-if XAA
-XAA_SUBDIR = xaa
-endif
-
-if VGAHW
-VGAHW_SUBDIR = vgahw
-endif
-
-if VBE
-VBE_SUBDIR = vbe
-endif
-
-if INT10MODULE
-INT10_SUBDIR = int10
-endif
-
-DOC_SUBDIR = doc
-
-SUBDIRS = common ddc i2c x86emu $(INT10_SUBDIR) fbdevhw os-support parser \
- ramdac shadowfb $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \
- xf8_16bpp loader dixmods exa modes \
- $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
-
-DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
- parser ramdac shadowfb vbe vgahw xaa \
- xf8_16bpp loader dixmods dri dri2 exa modes \
- utils doc
-
-bin_PROGRAMS = Xorg
-Xorg_SOURCES = xorg.c
-
-AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
-INCLUDES = @XORG_INCS@
-
-noinst_LTLIBRARIES = libxorg.la
-libxorg_la_SOURCES = libxorg.c
-libxorg_la_LIBADD = \
- $(XSERVER_LIBS) \
- loader/libloader.la \
- os-support/libxorgos.la \
- common/libcommon.la \
- parser/libxf86config_internal.la \
- dixmods/libdixmods.la \
- modes/libxf86modes.la \
- ramdac/libramdac.la \
- ddc/libddc.la \
- i2c/libi2c.la \
- dixmods/libxorgxkb.la \
- $(top_builddir)/mi/libmi.la \
- $(top_builddir)/os/libos.la \
- @XORG_LIBS@
-
-libxorg_la_DEPENDENCIES = $(libxorg_la_LIBADD)
-
-libxorg.c xorg.c:
- touch $@
-
-DISTCLEANFILES = libxorg.c xorg.c
-
-Xorg_DEPENDENCIES = libxorg.la
-Xorg_LDADD = $(MAIN_LIB) libxorg.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
-
-Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
-
-BUILT_SOURCES = xorg.conf.example
-DISTCLEANFILES += xorg.conf.example xorg.conf.example.pre
-EXTRA_DIST = xorgconf.cpp
-
-if SPECIAL_DTRACE_OBJECTS
-# Re-add dtrace object code that gets lost when building static libraries
-Xorg_LDADD += $(XSERVER_LIBS)
-endif
-
-if SOLARIS_ASM_INLINE
-# Needs to be built before any files are compiled when using Sun compilers
-# so in*/out* inline definitions are properly processed.
-
-BUILT_SOURCES += os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il
-
-os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il:
- cd os-support/solaris ; \
- $(MAKE) $(AM_MAKEFLAGS) solaris-@SOLARIS_INOUT_ARCH@.il
-endif
-
-# do not use $(mkdir_p) if you want automake 1.7 to work
-install-data-local:
- mkdir -p $(DESTDIR)$(logdir)
-
-
-install-exec-local: install-binPROGRAMS
- (cd $(DESTDIR)$(bindir) && rm -f X && ln -s Xorg X)
-if INSTALL_SETUID
- chown root $(DESTDIR)$(bindir)/Xorg
- chmod u+s $(DESTDIR)$(bindir)/Xorg
-endif
-
-CPP_FILES_FLAGS = \
- $(MANDEFS) \
- -DDEFAULTFONTPATH="\"$(COMPILEDDEFAULTFONTPATH)\"" \
- -DMODULEPATH=\"$(DEFAULT_MODULE_PATH)\"
-
-relink:
- $(AM_V_at)rm -f Xorg && $(MAKE) Xorg
-
-xorg.conf.example.pre: xorgconf.cpp
- cp $(srcdir)/xorgconf.cpp $@
+include $(top_srcdir)/cpprules.in
+
+if DRI
+DRI_SUBDIR = dri
+endif
+
+if DRI2
+DRI2_SUBDIR = dri2
+endif
+
+if XF86UTILS
+XF86UTILS_SUBDIR = utils
+endif
+
+if XAA
+XAA_SUBDIR = xaa
+endif
+
+if VGAHW
+VGAHW_SUBDIR = vgahw
+endif
+
+if VBE
+VBE_SUBDIR = vbe
+endif
+
+if INT10MODULE
+INT10_SUBDIR = int10
+endif
+
+DOC_SUBDIR = doc
+
+SUBDIRS = common ddc i2c x86emu $(INT10_SUBDIR) fbdevhw os-support parser \
+ ramdac shadowfb $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \
+ loader dixmods exa modes \
+ $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
+
+DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
+ parser ramdac shadowfb vbe vgahw xaa \
+ loader dixmods dri dri2 exa modes \
+ utils doc
+
+bin_PROGRAMS = Xorg
+Xorg_SOURCES = xorg.c
+
+AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
+INCLUDES = @XORG_INCS@
+
+noinst_LTLIBRARIES = libxorg.la
+libxorg_la_SOURCES = libxorg.c
+libxorg_la_LIBADD = \
+ $(XSERVER_LIBS) \
+ loader/libloader.la \
+ os-support/libxorgos.la \
+ common/libcommon.la \
+ parser/libxf86config_internal.la \
+ dixmods/libdixmods.la \
+ modes/libxf86modes.la \
+ ramdac/libramdac.la \
+ ddc/libddc.la \
+ i2c/libi2c.la \
+ dixmods/libxorgxkb.la \
+ $(top_builddir)/mi/libmi.la \
+ $(top_builddir)/os/libos.la \
+ @XORG_LIBS@
+
+libxorg_la_DEPENDENCIES = $(libxorg_la_LIBADD)
+
+libxorg.c xorg.c:
+ touch $@
+
+DISTCLEANFILES = libxorg.c xorg.c
+
+Xorg_DEPENDENCIES = libxorg.la
+Xorg_LDADD = $(MAIN_LIB) libxorg.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
+
+Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+
+BUILT_SOURCES = xorg.conf.example
+DISTCLEANFILES += xorg.conf.example xorg.conf.example.pre
+EXTRA_DIST = xorgconf.cpp
+
+if SPECIAL_DTRACE_OBJECTS
+# Re-add dtrace object code that gets lost when building static libraries
+Xorg_LDADD += $(XSERVER_LIBS)
+endif
+
+if SOLARIS_ASM_INLINE
+# Needs to be built before any files are compiled when using Sun compilers
+# so in*/out* inline definitions are properly processed.
+
+BUILT_SOURCES += os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il
+
+os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il:
+ cd os-support/solaris ; \
+ $(MAKE) $(AM_MAKEFLAGS) solaris-@SOLARIS_INOUT_ARCH@.il
+endif
+
+# do not use $(mkdir_p) if you want automake 1.7 to work
+install-data-local:
+ mkdir -p $(DESTDIR)$(logdir)
+
+
+install-exec-local: install-binPROGRAMS
+ (cd $(DESTDIR)$(bindir) && rm -f X && ln -s Xorg X)
+if INSTALL_SETUID
+ chown root $(DESTDIR)$(bindir)/Xorg
+ chmod u+s $(DESTDIR)$(bindir)/Xorg
+endif
+
+CPP_FILES_FLAGS = \
+ $(MANDEFS) \
+ -DDEFAULTFONTPATH="\"$(COMPILEDDEFAULTFONTPATH)\"" \
+ -DMODULEPATH=\"$(DEFAULT_MODULE_PATH)\"
+
+relink:
+ $(AM_V_at)rm -f Xorg && $(MAKE) Xorg
+
+xorg.conf.example.pre: xorgconf.cpp
+ cp $(srcdir)/xorgconf.cpp $@
diff --git a/xorg-server/hw/xfree86/common/xf86.h b/xorg-server/hw/xfree86/common/xf86.h
index 68653395b..c91020132 100644
--- a/xorg-server/hw/xfree86/common/xf86.h
+++ b/xorg-server/hw/xfree86/common/xf86.h
@@ -62,9 +62,6 @@ extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec;
extern _X_EXPORT DevPrivateKeyRec xf86CreateRootWindowKeyRec;
#define xf86CreateRootWindowKey (&xf86CreateRootWindowKeyRec)
-extern _X_EXPORT DevPrivateKeyRec xf86PixmapKeyRec;
-#define xf86PixmapKey (&xf86PixmapKeyRec)
-
extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */
extern _X_EXPORT const unsigned char byte_reversed[256];
extern _X_EXPORT Bool fbSlotClaimed;
diff --git a/xorg-server/hw/xfree86/common/xf86Globals.c b/xorg-server/hw/xfree86/common/xf86Globals.c
index 0b0931408..02f20f690 100644
--- a/xorg-server/hw/xfree86/common/xf86Globals.c
+++ b/xorg-server/hw/xfree86/common/xf86Globals.c
@@ -49,7 +49,6 @@
DevPrivateKeyRec xf86CreateRootWindowKeyRec;
DevPrivateKeyRec xf86ScreenKeyRec;
-DevPrivateKeyRec xf86PixmapKeyRec;
ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */
const unsigned char byte_reversed[256] =
diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c
index aee1e8e33..a6740e69f 100644
--- a/xorg-server/hw/xfree86/common/xf86Init.c
+++ b/xorg-server/hw/xfree86/common/xf86Init.c
@@ -732,8 +732,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
FatalError("Cannot register DDX private keys");
if (!dixRegisterPrivateKey(&xf86ScreenKeyRec, PRIVATE_SCREEN, 0) ||
- !dixRegisterPrivateKey(&xf86CreateRootWindowKeyRec, PRIVATE_SCREEN, 0) ||
- !dixRegisterPrivateKey(&xf86PixmapKeyRec, PRIVATE_PIXMAP, 0))
+ !dixRegisterPrivateKey(&xf86CreateRootWindowKeyRec, PRIVATE_SCREEN, 0))
FatalError("Cannot register DDX private keys");
for (i = 0; i < xf86NumScreens; i++) {
diff --git a/xorg-server/hw/xfree86/common/xf86Mode.c b/xorg-server/hw/xfree86/common/xf86Mode.c
index c3a190777..2ba5ea990 100644
--- a/xorg-server/hw/xfree86/common/xf86Mode.c
+++ b/xorg-server/hw/xfree86/common/xf86Mode.c
@@ -1402,6 +1402,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
strategy &= ~LOOKUP_OPTIONAL_TOLERANCES;
} else {
const char *type = "";
+ Bool specified = FALSE;
if (scrp->monitor->nHsync <= 0) {
if (numTimings > 0) {
@@ -1412,11 +1413,13 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
}
} else {
scrp->monitor->hsync[0].lo = 31.5;
- scrp->monitor->hsync[0].hi = 37.9;
+ scrp->monitor->hsync[0].hi = 48.0;
scrp->monitor->nHsync = 1;
}
type = "default ";
- }
+ } else {
+ specified = TRUE;
+ }
for (i = 0; i < scrp->monitor->nHsync; i++) {
if (scrp->monitor->hsync[i].lo == scrp->monitor->hsync[i].hi)
xf86DrvMsg(scrp->scrnIndex, X_INFO,
@@ -1445,7 +1448,9 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
scrp->monitor->nVrefresh = 1;
}
type = "default ";
- }
+ } else {
+ specified = TRUE;
+ }
for (i = 0; i < scrp->monitor->nVrefresh; i++) {
if (scrp->monitor->vrefresh[i].lo == scrp->monitor->vrefresh[i].hi)
xf86DrvMsg(scrp->scrnIndex, X_INFO,
@@ -1459,10 +1464,16 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
scrp->monitor->vrefresh[i].lo,
scrp->monitor->vrefresh[i].hi);
}
+
+ type = "";
+ if (!scrp->monitor->maxPixClock && !specified) {
+ type = "default ";
+ scrp->monitor->maxPixClock = 65000.0;
+ }
if (scrp->monitor->maxPixClock) {
xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "%s: Using maximum pixel clock of %.2f MHz\n",
- scrp->monitor->id,
+ "%s: Using %smaximum pixel clock of %.2f MHz\n",
+ scrp->monitor->id, type,
(float)scrp->monitor->maxPixClock / 1000.0);
}
}
diff --git a/xorg-server/hw/xfree86/doc/sgml/DESIGN.xml b/xorg-server/hw/xfree86/doc/sgml/DESIGN.xml
index 52a104cbc..13e582877 100644
--- a/xorg-server/hw/xfree86/doc/sgml/DESIGN.xml
+++ b/xorg-server/hw/xfree86/doc/sgml/DESIGN.xml
@@ -1629,14 +1629,6 @@ Here is what <function>InitOutput()</function> does:
</blockquote></para></blockquote>
<para>
- Currently, aperture remapping, as described here, should not be
- attempted if the driver uses the <literal remap="tt">xf8_16bpp</literal> or
- <literal remap="tt">xf8_32bpp</literal> framebuffer layers. A pending
- restructuring of VT switching will address this restriction in
- the near future.
- </para>
-
- <para>
Other layers may wrap the <function>ChipEnterVT()</function> and
<function>ChipLeaveVT()</function> functions if they need to take some
action when these events are received.
diff --git a/xorg-server/hw/xfree86/loader/sdksyms.sh b/xorg-server/hw/xfree86/loader/sdksyms.sh
index 6c45ec45e..e9f8eda78 100644
--- a/xorg-server/hw/xfree86/loader/sdksyms.sh
+++ b/xorg-server/hw/xfree86/loader/sdksyms.sh
@@ -208,12 +208,6 @@ cat > sdksyms.c << EOF
*/
-/* hw/xfree86/xf8_16bpp/Makefile.am -- module */
-/*
-#include "cfb8_16.h"
- */
-
-
/* mi/Makefile.am */
#include "micmap.h"
#include "miline.h"
@@ -255,8 +249,6 @@ cat > sdksyms.c << EOF
/* include/Makefile.am */
#include "XIstubs.h"
-#include "bstore.h"
-#include "bstorestr.h"
#include "closestr.h"
#include "closure.h"
#include "colormap.h"
diff --git a/xorg-server/hw/xfree86/modes/xf86Cursors.c b/xorg-server/hw/xfree86/modes/xf86Cursors.c
index 6886ad7b2..5562f29cc 100644
--- a/xorg-server/hw/xfree86/modes/xf86Cursors.c
+++ b/xorg-server/hw/xfree86/modes/xf86Cursors.c
@@ -1,5 +1,6 @@
/*
* Copyright © 2007 Keith Packard
+ * Copyright © 2010 Aaron Plattner
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -126,12 +127,33 @@ xf86_crtc_rotate_coord_back (Rotation rotation,
*y_src = y_dst;
}
+struct cursor_bit {
+ CARD8 *byte;
+ char bitpos;
+};
+
/*
* Convert an x coordinate to a position within the cursor bitmap
*/
-static int
-cursor_bitpos (int flags, int x, Bool mask)
+static struct cursor_bit
+cursor_bitpos (CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y,
+ Bool mask)
{
+ const int flags = cursor_info->Flags;
+ const Bool interleaved =
+ !!(flags & (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 |
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8 |
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16 |
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 |
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64));
+ const int width = cursor_info->MaxWidth;
+ const int height = cursor_info->MaxHeight;
+ const int stride = interleaved ? width / 4 : width / 8;
+
+ struct cursor_bit ret;
+
+ image += y * stride;
+
if (flags & HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK)
mask = !mask;
if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED)
@@ -149,29 +171,33 @@ cursor_bitpos (int flags, int x, Bool mask)
x = ((x & ~31) << 1) | (mask << 5) | (x & 31);
else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64)
x = ((x & ~63) << 1) | (mask << 6) | (x & 63);
- return x;
+ else if (mask)
+ image += stride * height;
+
+ ret.byte = image + (x / 8);
+ ret.bitpos = x & 7;
+
+ return ret;
}
/*
* Fetch one bit from a cursor bitmap
*/
static CARD8
-get_bit (CARD8 *image, int stride, int flags, int x, int y, Bool mask)
+get_bit (CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y, Bool mask)
{
- x = cursor_bitpos (flags, x, mask);
- image += y * stride;
- return (image[(x >> 3)] >> (x & 7)) & 1;
+ struct cursor_bit bit = cursor_bitpos(image, cursor_info, x, y, mask);
+ return (*bit.byte >> bit.bitpos) & 1;
}
/*
* Set one bit in a cursor bitmap
*/
static void
-set_bit (CARD8 *image, int stride, int flags, int x, int y, Bool mask)
+set_bit (CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y, Bool mask)
{
- x = cursor_bitpos (flags, x, mask);
- image += y * stride;
- image[(x >> 3)] |= 1 << (x & 7);
+ struct cursor_bit bit = cursor_bitpos(image, cursor_info, x, y, mask);
+ *bit.byte |= 1 << bit.bitpos;
}
/*
@@ -186,7 +212,6 @@ xf86_crtc_convert_cursor_to_argb (xf86CrtcPtr crtc, unsigned char *src)
CARD32 *cursor_image = (CARD32 *) xf86_config->cursor_image;
int x, y;
int xin, yin;
- int stride = cursor_info->MaxWidth >> 2;
int flags = cursor_info->Flags;
CARD32 bits;
@@ -201,10 +226,10 @@ xf86_crtc_convert_cursor_to_argb (xf86CrtcPtr crtc, unsigned char *src)
cursor_info->MaxWidth,
cursor_info->MaxHeight,
x, y, &xin, &yin);
- if (get_bit (src, stride, flags, xin, yin, TRUE) ==
+ if (get_bit (src, cursor_info, xin, yin, TRUE) ==
((flags & HARDWARE_CURSOR_INVERT_MASK) == 0))
{
- if (get_bit (src, stride, flags, xin, yin, FALSE))
+ if (get_bit (src, cursor_info, xin, yin, FALSE))
bits = xf86_config->cursor_fg;
else
bits = xf86_config->cursor_bg;
@@ -407,7 +432,6 @@ xf86_crtc_load_cursor_image (xf86CrtcPtr crtc, CARD8 *src)
int x, y;
int xin, yin;
int stride = cursor_info->MaxWidth >> 2;
- int flags = cursor_info->Flags;
cursor_image = xf86_config->cursor_image;
memset(cursor_image, 0, cursor_info->MaxHeight * stride);
@@ -419,10 +443,10 @@ xf86_crtc_load_cursor_image (xf86CrtcPtr crtc, CARD8 *src)
cursor_info->MaxWidth,
cursor_info->MaxHeight,
x, y, &xin, &yin);
- if (get_bit(src, stride, flags, xin, yin, FALSE))
- set_bit(cursor_image, stride, flags, x, y, FALSE);
- if (get_bit(src, stride, flags, xin, yin, TRUE))
- set_bit(cursor_image, stride, flags, x, y, TRUE);
+ if (get_bit(src, cursor_info, xin, yin, FALSE))
+ set_bit(cursor_image, cursor_info, x, y, FALSE);
+ if (get_bit(src, cursor_info, xin, yin, TRUE))
+ set_bit(cursor_image, cursor_info, x, y, TRUE);
}
}
crtc->funcs->load_cursor_image (crtc, cursor_image);
diff --git a/xorg-server/hw/xfree86/os-support/Makefile.am b/xorg-server/hw/xfree86/os-support/Makefile.am
index 04997a6cb..c0504d5eb 100644
--- a/xorg-server/hw/xfree86/os-support/Makefile.am
+++ b/xorg-server/hw/xfree86/os-support/Makefile.am
@@ -1,26 +1,26 @@
-SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS)
-DIST_SUBDIRS = bsd bus misc linux solaris sysv sco hurd
-
-sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h
-
-EXTRA_DIST = int10Defines.h xf86OSpriv.h
-
-# to get the grouping semantics right, you have to glom these three together
-# as one library, otherwise libtool will actively defeat your attempts to
-# list them multiple times on the link line.
-noinst_LTLIBRARIES = libxorgos.la
-libxorgos_la_SOURCES = xorgos.c
-libxorgos_la_LIBADD = @XORG_OS_SUBDIR@/lib@XORG_OS_SUBDIR@.la \
- bus/libbus.la \
- misc/libmisc.la
-
-AM_CFLAGS = $(DIX_CFLAGS)
-
-xorgos.c:
- touch $@
-
-DISTCLEANFILES = xorgos.c
-
-# FIXME: These don't seem to be used anywhere
-EXTRA_DIST += \
- shared/bios_devmem.c
+SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS)
+DIST_SUBDIRS = bsd bus misc linux solaris sco hurd
+
+sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h
+
+EXTRA_DIST = int10Defines.h xf86OSpriv.h
+
+# to get the grouping semantics right, you have to glom these three together
+# as one library, otherwise libtool will actively defeat your attempts to
+# list them multiple times on the link line.
+noinst_LTLIBRARIES = libxorgos.la
+libxorgos_la_SOURCES = xorgos.c
+libxorgos_la_LIBADD = @XORG_OS_SUBDIR@/lib@XORG_OS_SUBDIR@.la \
+ bus/libbus.la \
+ misc/libmisc.la
+
+AM_CFLAGS = $(DIX_CFLAGS)
+
+xorgos.c:
+ touch $@
+
+DISTCLEANFILES = xorgos.c
+
+# FIXME: These don't seem to be used anywhere
+EXTRA_DIST += \
+ shared/bios_devmem.c
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
index 7adf0ff73..d1f29d909 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
@@ -39,47 +39,14 @@
#include <sys/stat.h>
static Bool KeepTty = FALSE;
-static int VTnum = -1;
static Bool VTSwitch = TRUE;
static Bool ShareVTs = FALSE;
static int activeVT = -1;
-static int vtPermSave[4];
static char vtname[11];
static struct termios tty_attr; /* tty state to restore */
static int tty_mode; /* kbd mode to restore */
-static int
-saveVtPerms(void)
-{
- /* We need to use stat to get permissions. */
- struct stat svtp;
-
- /* Do them numerically ordered, hard coded tty0 first. */
- if (stat("/dev/tty0", &svtp) != 0)
- return 0;
- vtPermSave[0] = (int)svtp.st_uid;
- vtPermSave[1] = (int)svtp.st_gid;
-
- /* Now check the console we are dealing with. */
- if (stat(vtname, &svtp) != 0)
- return 0;
- vtPermSave[2] = (int)svtp.st_uid;
- vtPermSave[3] = (int)svtp.st_gid;
-
- return 1;
-}
-
-static void
-restoreVtPerms(void)
-{
- if (geteuid() == 0) {
- /* Set the terminal permissions back to before we started. */
- (void)chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
- (void)chown(vtname, vtPermSave[2], vtPermSave[3]);
- }
-}
-
static void *console_handler;
static void
@@ -92,6 +59,16 @@ drain_console(int fd, void *closure)
}
}
+static void
+switch_to(int vt, const char *from)
+{
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt) < 0)
+ FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
+
+ if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt) < 0)
+ FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
+}
+
void
xf86OpenConsole(void)
{
@@ -112,8 +89,7 @@ xf86OpenConsole(void)
/*
* setup the virtual terminal manager
*/
- if (VTnum != -1) {
- xf86Info.vtno = VTnum;
+ if (xf86Info.vtno != -1) {
from = X_CMDLINE;
} else {
@@ -179,34 +155,6 @@ xf86OpenConsole(void)
FatalError("xf86OpenConsole: Cannot open virtual console"
" %d (%s)\n", xf86Info.vtno, strerror(errno));
- if (!ShareVTs)
- {
- /*
- * Grab the vt ownership before we overwrite it.
- * Hard coded /dev/tty0 into this function as well for below.
- */
- if (!saveVtPerms())
- xf86Msg(X_WARNING,
- "xf86OpenConsole: Could not save ownership of VT\n");
-
- if (geteuid() == 0) {
- /* change ownership of the vt */
- if (chown(vtname, getuid(), getgid()) < 0)
- xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
- vtname, strerror(errno));
-
- /*
- * the current VT device we're running on is not
- * "console", we want to grab all consoles too
- *
- * Why is this needed??
- */
- if (chown("/dev/tty0", getuid(), getgid()) < 0)
- xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
- strerror(errno));
- }
- }
-
/*
* Linux doesn't switch to an active vt after the last close of a vt,
* so we do this ourselves by remembering which is active now.
@@ -236,13 +184,7 @@ xf86OpenConsole(void)
/*
* now get the VT. This _must_ succeed, or else fail completely.
*/
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
- FatalError("xf86OpenConsole: VT_ACTIVATE failed: %s\n",
- strerror(errno));
-
- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) < 0)
- FatalError("xf86OpenConsole: VT_WAITACTIVE failed: %s\n",
- strerror(errno));
+ switch_to(xf86Info.vtno, "xf86OpenConsole");
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
FatalError("xf86OpenConsole: VT_GETMODE failed %s\n",
@@ -289,16 +231,8 @@ xf86OpenConsole(void)
} else { /* serverGeneration != 1 */
if (!ShareVTs && VTSwitch)
{
- /*
- * now get the VT
- */
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed %s\n",
- strerror(errno));
-
- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) < 0)
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed %s\n",
- strerror(errno));
+ /* now get the VT */
+ switch_to(xf86Info.vtno, "xf86OpenConsole");
}
}
}
@@ -343,19 +277,11 @@ xf86CloseConsole(void)
* Perform a switch back to the active VT when we were started
*/
if (activeVT >= 0) {
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, activeVT) < 0)
- xf86Msg(X_WARNING, "xf86CloseConsole: VT_ACTIVATE failed: %s\n",
- strerror(errno));
- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, activeVT) < 0)
- xf86Msg(X_WARNING,
- "xf86CloseConsole: VT_WAITACTIVE failed: %s\n",
- strerror(errno));
+ switch_to(activeVT, "xf86CloseConsole");
activeVT = -1;
}
}
close(xf86Info.consoleFd); /* make the vt-manager happy */
-
- restoreVtPerms(); /* restore the permissions */
}
int
@@ -382,10 +308,10 @@ xf86ProcessArgument(int argc, char *argv[], int i)
}
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
{
- if (sscanf(argv[i], "vt%2d", &VTnum) == 0)
+ if (sscanf(argv[i], "vt%2d", &xf86Info.vtno) == 0)
{
UseMsg();
- VTnum = -1;
+ xf86Info.vtno = -1;
return 0;
}
return 1;
diff --git a/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c b/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c
index 00bfb7151..769fa009c 100644
--- a/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c
+++ b/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c
@@ -31,10 +31,6 @@
#include "xf86Priv.h"
#include "xf86_OSlib.h"
-#ifdef OSHEADER
-# include OSHEADER
-#endif
-
/*
* Handle the VT-switching interface for OSs that use USL-style ioctl()s
* (the sysv, sco, and linux subdirs).
@@ -63,16 +59,9 @@ xf86VTSwitchAway(void)
{
xf86Info.vtRequestsPending = FALSE;
if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
- {
return FALSE;
- }
else
- {
-#ifdef OSSWITCHAWAY
- OSSWITCHAWAY;
-#endif
return TRUE;
- }
}
Bool
@@ -80,13 +69,9 @@ xf86VTSwitchTo(void)
{
xf86Info.vtRequestsPending = FALSE;
if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
- {
return FALSE;
- }
else
- {
return TRUE;
- }
}
Bool
diff --git a/xorg-server/hw/xfree86/os-support/sysv/Makefile.am b/xorg-server/hw/xfree86/os-support/sysv/Makefile.am
deleted file mode 100644
index e86e70ad1..000000000
--- a/xorg-server/hw/xfree86/os-support/sysv/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = sysv_init.c sysv_video.c
diff --git a/xorg-server/hw/xfree86/os-support/sysv/sysv_init.c b/xorg-server/hw/xfree86/os-support/sysv/sysv_init.c
deleted file mode 100644
index 3b94ac135..000000000
--- a/xorg-server/hw/xfree86/os-support/sysv/sysv_init.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
- * Copyright 1993 by David Wexelblat <dwex@goblin.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 names of Thomas Roell and David Wexelblat
- * not be used in advertising or publicity pertaining to distribution of
- * the software without specific, written prior permission. Thomas Roell and
- * David Wexelblat makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * THOMAS ROELL AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THOMAS ROELL OR DAVID WEXELBLAT 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_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xmd.h>
-
-#include "compiler.h"
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-static Bool KeepTty = FALSE;
-#ifdef SVR4
-static Bool Protect0 = FALSE;
-#endif
-static int VTnum = -1;
-
-
-void
-xf86OpenConsole()
-{
- int fd;
- struct vt_mode VT;
- char vtname1[10],vtname2[10];
- MessageType from = X_PROBED;
-
- if (serverGeneration == 1)
- {
- /* check if we're run with euid==0 */
- if (geteuid() != 0)
- {
- FatalError("xf86OpenConsole: Server must be suid root\n");
- }
-
-#ifdef SVR4
- /* Protect page 0 to help find NULL dereferencing */
- /* mprotect() doesn't seem to work */
- if (Protect0)
- {
- int fd = -1;
-
- if ((fd = open("/dev/zero", O_RDONLY, 0)) < 0)
- {
- xf86Msg(X_WARNING,
- "xf86OpenConsole: cannot open /dev/zero (%s)\n",
- strerror(errno));
- }
- else
- {
- if ((int)mmap(0, 0x1000, PROT_NONE,
- MAP_FIXED | MAP_SHARED, fd, 0) == -1)
- {
- xf86Msg(X_WARNING,
- "xf86OpenConsole: failed to protect page 0 (%s)\n",
- strerror(errno));
- }
- close(fd);
- }
- }
-#endif
- /*
- * setup the virtual terminal manager
- */
- if (VTnum != -1)
- {
- xf86Info.vtno = VTnum;
- from = X_CMDLINE;
- }
- else
- {
- if ((fd = open("/dev/console",O_WRONLY,0)) < 0)
- {
- FatalError(
- "xf86OpenConsole: Cannot open /dev/console (%s)\n",
- strerror(errno));
- }
- if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) ||
- (xf86Info.vtno == -1))
- {
- FatalError("xf86OpenConsole: Cannot find a free VT\n");
- }
- close(fd);
- }
- xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
-
- sprintf(vtname1,"/dev/vc%02d",xf86Info.vtno); /* ESIX */
- sprintf(vtname2,"/dev/vt%02d",xf86Info.vtno); /* rest of the world */
-
- if (!KeepTty)
- {
- setpgrp();
- }
-
- if (((xf86Info.consoleFd = open(vtname1, O_RDWR|O_NDELAY, 0)) < 0) &&
- ((xf86Info.consoleFd = open(vtname2, O_RDWR|O_NDELAY, 0)) < 0))
- {
- FatalError("xf86OpenConsole: Cannot open %s (%s) (%s)\n",
- vtname2, vtname1, strerror(errno));
- }
-
- /* change ownership of the vt */
- if (chown(vtname1, getuid(), getgid()) < 0)
- {
- chown(vtname2, getuid(), getgid());
- }
-
- /*
- * now get the VT
- */
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
- {
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
- }
- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
- {
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
- }
- if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
- {
- FatalError("xf86OpenConsole: VT_GETMODE failed\n");
- }
-
- signal(SIGUSR1, xf86VTRequest);
-
- VT.mode = VT_PROCESS;
- VT.relsig = SIGUSR1;
- VT.acqsig = SIGUSR1;
- if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
- {
- FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
- }
- if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
- {
- FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n");
- }
- }
- else
- {
- /* serverGeneration != 1 */
- /*
- * now get the VT
- */
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
- {
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
- }
- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
- {
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
- }
- /*
- * If the server doesn't have the VT when the reset occurs,
- * this is to make sure we don't continue until the activate
- * signal is received.
- */
- if (!xf86Screens[0]->vtSema)
- sleep(5);
- }
- return;
-}
-
-void
-xf86CloseConsole()
-{
- struct vt_mode VT;
-
-#if 0
- ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno);
- ioctl(xf86Info.consoleFd, VT_WAITACTIVE, 0);
-#endif
- ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT); /* Back to text mode ... */
- if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1)
- {
- VT.mode = VT_AUTO;
- ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* set dflt vt handling */
- }
- close(xf86Info.consoleFd); /* make the vt-manager happy */
- return;
-}
-
-int
-xf86ProcessArgument(int argc, char *argv[], int i)
-{
- /*
- * Keep server from detaching from controlling tty. This is useful
- * when debugging (so the server can receive keyboard signals.
- */
- if (!strcmp(argv[i], "-keeptty"))
- {
- KeepTty = TRUE;
- return 1;
- }
-#ifdef SVR4
- /*
- * Undocumented flag to protect page 0 from read/write to help
- * catch NULL pointer dereferences. This is purely a debugging
- * flag.
- */
- if (!strcmp(argv[i], "-protect0"))
- {
- Protect0 = TRUE;
- return 1;
- }
-#endif
- if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
- {
- if (sscanf(argv[i], "vt%2d", &VTnum) == 0)
- {
- UseMsg();
- VTnum = -1;
- return 0;
- }
- return 1;
- }
- return 0;
-}
-
-void
-xf86UseMsg()
-{
- ErrorF("vtXX use the specified VT number\n");
- ErrorF("-keeptty ");
- ErrorF("don't detach controlling tty (for debugging only)\n");
- return;
-}
diff --git a/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c b/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c
deleted file mode 100644
index 6d5948796..000000000
--- a/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
- * Copyright 1993 by David Wexelblat <dwex@goblin.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 names of Thomas Roell and David Wexelblat
- * not be used in advertising or publicity pertaining to distribution of
- * the software without specific, written prior permission. Thomas Roell and
- * David Wexelblat makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * THOMAS ROELL AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THOMAS ROELL OR DAVID WEXELBLAT 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_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#define _NEED_SYSI86
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
-
-#ifndef MAP_FAILED
-#define MAP_FAILED ((void *)-1)
-#endif
-
-#ifndef SI86IOPL
-#define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL)
-#define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0)
-#else
-#define SET_IOPL() sysi86(SI86IOPL,3)
-#define RESET_IOPL() sysi86(SI86IOPL,0)
-#endif
-
-/***************************************************************************/
-/* Video Memory Mapping section */
-/***************************************************************************/
-
-/*
- * XXX Support for SVR3 will need to be reworked if needed. In particular
- * the Region parameter is no longer passed, and will need to be dealt
- * with internally if required.
- * OK, i'll rework that thing ... (clean it up a lot)
- * SVR3 Support only with SVR3_MMAPDRV (mr)
- *
- */
-
-#ifdef HAS_SVR3_MMAPDRV
-#ifndef MMAP_DEBUG
-#define MMAP_DEBUG 3
-#endif
-
-struct kd_memloc MapDSC;
-int mmapFd = -2;
-
-static int
-mmapStat(pointer Base, unsigned long Size) {
-
- int nmmreg,i=0,region=-1;
- mmapinfo_t *ibuf;
-
- nmmreg = ioctl(mmapFd, GETNMMREG);
-
- if(nmmreg <= 0)
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "\nNo physical memory mapped currently.\n\n");
- else {
- if((ibuf = (mmapinfo_t *)malloc(nmmreg*sizeof(mmapinfo_t))) == NULL)
- xf86Msg(X_WARNING,
- "Couldn't allocate memory 4 mmapinfo_t\n");
- else {
- if(ioctl(mmapFd, GETMMREG, ibuf) != -1)
- {
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "# mmapStat: [Size=%x,Base=%x]\n", Size, Base);
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "# Physical Address Size Reference Count\n");
- for(i = 0; i < nmmreg; i++) {
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "%-4d 0x%08X %5dk %5d ",
- i, ibuf[i].physaddr, ibuf[i].length/1024, ibuf[i].refcnt);
- if (ibuf[i].physaddr == Base || ibuf[i].length == Size ) {
- xf86MsgVerb(X_INFO, MMAP_DEBUG,"MATCH !!!");
- if (region==-1) region=i;
- }
- xf86ErrorFVerb(MMAP_DEBUG, "\n");
- }
- xf86ErrorFVerb(MMAP_DEBUG, "\n");
- }
- free(ibuf);
- }
- }
- if (region == -1 && nmmreg > 0) region=region * i;
- return region;
-}
-#endif
-
-
-static Bool
-linearVidMem()
-{
-#ifdef SVR4
- return TRUE;
-#elif defined(HAS_SVR3_MMAPDRV)
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "# xf86LinearVidMem: MMAP 2.2.2 called\n");
-
- if(mmapFd >= 0) return TRUE;
-
- if ((mmapFd = open("/dev/mmap", O_RDWR)) != -1)
- {
- if(ioctl(mmapFd, GETVERSION) < 0x0222) {
- xf86Msg(X_WARNING,
- "xf86LinearVidMem: MMAP 2.2.2 or above required\n");
- xf86ErrorF("\tlinear memory access disabled\n");
- return FALSE;
- }
- return TRUE;
- }
- xf86Msg(X_WARNING, "xf86LinearVidMem: failed to open /dev/mmap (%s)\n",
- strerror(errno));
- xf86ErrorF("\tlinear memory access disabled\n");
- return FALSE;
-#endif
-}
-
-static pointer
-mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
-{
- pointer base;
- int fd;
-
-#if defined(SVR4)
- fd = open(DEV_MEM, (flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR);
- if (fd < 0)
- {
- FatalError("xf86MapVidMem: failed to open %s (%s)\n",
- DEV_MEM, strerror(errno));
- }
- base = mmap((caddr_t)0, Size,
- (flags & VIDMEM_READONLY) ?
- PROT_READ : (PROT_READ | PROT_WRITE),
- MAP_SHARED, fd, (off_t)Base);
- close(fd);
- if (base == MAP_FAILED)
- {
- FatalError("%s: Could not mmap framebuffer [s=%x,a=%x] (%s)\n",
- "xf86MapVidMem", Size, Base, strerror(errno));
- }
-#else /* SVR4 */
-#ifdef HAS_SVR3_MMAPDRV
-
- xf86MsgVerb(X_INFO, MMAP_DEBUG, "# xf86MapVidMem: MMAP 2.2.2 called\n");
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "MMAP_VERSION: 0x%x\n",ioctl(mmapFd, GETVERSION));
- if (ioctl(mmapFd, GETVERSION) == -1)
- {
- xf86LinearVidMem();
- }
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "MMAP_VERSION: 0x%x\n",ioctl(mmapFd, GETVERSION));
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "xf86MapVidMem: Screen: %d\n", ScreenNum);
- mmapStat(Base,Size);
- /* To force the MMAP driver to provide the address */
- base = (pointer)0;
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "xf86MapVidMem: [s=%x,a=%x]\n", Size, Base);
- MapDSC.vaddr = (char *)base;
- MapDSC.physaddr = (char *)Base;
- MapDSC.length = Size;
- MapDSC.ioflg = 1;
- if(mmapFd >= 0)
- {
- if((base = (pointer)ioctl(mmapFd, MAP, &MapDSC)) == (pointer)-1)
- {
- FatalError("%s: Could not mmap framebuffer [s=%x,a=%x] (%s)\n",
- "xf86MapVidMem", Size, Base, strerror(errno));
- /* NOTREACHED */
- }
-
- /* Next time we want the same address! */
- MapDSC.vaddr = (char *)base;
- }
-
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "MapDSC.vaddr : 0x%x\n", MapDSC.vaddr);
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "MapDSC.physaddr: 0x%x\n", MapDSC.physaddr);
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "MapDSC.length : %d\n", MapDSC.length);
- mmapStat(Base,Size);
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "xf86MapVidMem: [s=%x,a=%x,b=%x]\n", Size, Base, base);
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "xf86MapVidMem: SUCCEED Mapping FrameBuffer \n");
-#endif /* HAS_SVR3_MMAPDRV */
-#endif /* SVR4 */
- return base;
-}
-
-/* ARGSUSED */
-static void
-unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
-{
-#if defined (SVR4)
- munmap(Base, Size);
-#else /* SVR4 */
-#ifdef HAS_SVR3_MMAPDRV
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "# xf86UnMapVidMem: UNMapping FrameBuffer\n");
- mmapStat(Base,Size);
- ioctl(mmapFd, UNMAPRM , Base);
- mmapStat(Base,Size);
- xf86MsgVerb(X_INFO, MMAP_DEBUG,
- "# xf86UnMapVidMem: Screen: %d [v=%x]\n", ScreenNum, Base);
-#endif /* HAS_SVR3_MMAPDRV */
-#endif /* SVR4 */
- return;
-}
-
-#if defined(SVR4) && defined(__i386__) && !defined(sun)
-/*
- * For some SVR4 versions, a 32-bit read is done for the first location
- * in each page when the page is first mapped. If this is done while
- * memory access is enabled for regions that have read side-effects,
- * this can cause unexpected results, including lockups on some hardware.
- * This function is called to make sure each page is mapped while it is
- * safe to do so.
- */
-
-/*
- * XXX Should get this the correct way (see os/xalloc.c), but since this is
- * for one platform I'll be lazy.
- */
-#define X_PAGE_SIZE 4096
-
-static void
-readSideEffects(int ScreenNum, pointer Base, unsigned long Size)
-{
- unsigned long base, end, addr;
- CARD32 val;
-
- base = (unsigned long)Base;
- end = base + Size;
-
- for (addr = base; addr < end; addr += X_PAGE_SIZE)
- val = *(volatile CARD32 *)addr;
-}
-#endif
-
-void
-xf86OSInitVidMem(VidMemInfoPtr pVidMem)
-{
- pVidMem->linearSupported = linearVidMem();
- pVidMem->mapMem = mapVidMem;
- pVidMem->unmapMem = unmapVidMem;
-#if defined(SVR4) && defined(__i386__) && !defined(sun)
- pVidMem->readSideEffects = readSideEffects;
-#endif
- pVidMem->initialised = TRUE;
-}
-
-/***************************************************************************/
-/* I/O Permissions section */
-/***************************************************************************/
-
-static Bool ExtendedEnabled = FALSE;
-static Bool InitDone = FALSE;
-
-Bool
-xf86EnableIO()
-{
- int i;
-
- if (ExtendedEnabled)
- return TRUE;
-
- if (SET_IOPL() < 0)
- {
- xf86Msg(X_WARNING,
- "xf86EnableIO: Failed to set IOPL for extended I/O\n");
- return FALSE;
- }
- ExtendedEnabled = TRUE;
-
- return TRUE;
-}
-
-void
-xf86DisableIO()
-{
- if (!ExtendedEnabled)
- return;
-
- RESET_IOPL();
- ExtendedEnabled = FALSE;
-
- return;
-}
diff --git a/xorg-server/hw/xfree86/vbe/vbe.c b/xorg-server/hw/xfree86/vbe/vbe.c
index 56ac5f6b7..5120b3199 100644
--- a/xorg-server/hw/xfree86/vbe/vbe.c
+++ b/xorg-server/hw/xfree86/vbe/vbe.c
@@ -1028,6 +1028,11 @@ VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data)
if (pScrn->monitor->nHsync || pScrn->monitor->nVrefresh)
return;
+ if (data->hsize < 320 || data->vsize < 240) {
+ xf86DrvMsg(scrnIndex, X_INFO, "...which I refuse to believe\n");
+ return;
+ }
+
mode = xf86CVTMode(data->hsize, data->vsize, PANEL_HZ, 1, 0);
pScrn->monitor->nHsync = 1;
diff --git a/xorg-server/hw/xfree86/xaa/xaa.h b/xorg-server/hw/xfree86/xaa/xaa.h
index 2af954fee..6e5a2389a 100644
--- a/xorg-server/hw/xfree86/xaa/xaa.h
+++ b/xorg-server/hw/xfree86/xaa/xaa.h
@@ -1,1396 +1,1394 @@
-
-#ifndef _XAA_H
-#define _XAA_H
-
-#define XAA_VERSION_MAJOR 1
-#define XAA_VERSION_MINOR 2
-#define XAA_VERSION_RELEASE 1
-
-/*
-
- ******** OPERATION SPECIFIC FLAGS *********
-
- **** solid/dashed line flags ****
-
---------- --------
-23 LINE_PATTERN_LSBFIRST_MSBJUSTIFIED
-22 LINE_PATTERN_LSBFIRST_LSBJUSTIFIED
-21 LINE_PATTERN_MSBFIRST_MSBJUSTIFIED
-20 LINE_PATTERN_MSBFIRST_LSBJUSTIFIED
-19 LINE_PATTERN_POWER_OF_2_ONLY
-18 LINE_LIMIT_COORDS
-17 .
-16 .
---------- -------
-
- **** screen to screen copy flags ****
-
---------- --------
-23 ONLY_LEFT_TO_RIGHT_BITBLT
-22 ONLY_TWO_BITBLT_DIRECTIONS
-21 .
-20 .
-19 .
-18 .
-17 .
-16 .
---------- -------
-
- **** clipping flags ****
-
---------- --------
-23 .
-22 HARDWARE_CLIP_SCREEN_TO_SCREEN_COLOR_EXPAND
-21 HARDWARE_CLIP_SCREEN_TO_SCREEN_COPY
-20 HARDWARE_CLIP_MONO_8x8_FILL
-19 HARDWARE_CLIP_COLOR_8x8_FILL
-18 HARDWARE_CLIP_SOLID_FILL
-17 HARDWARE_CLIP_DASHED_LINE
-16 HARDWARE_CLIP_SOLID_LINE
---------- -------
-
-
- **** hardware pattern flags ****
-
---------- --------
-23 .
-22 .
-21 HARDWARE_PATTERN_SCREEN_ORIGIN
-20 .
-19 .
-18 .
-17 HARDWARE_PATTERN_PROGRAMMED_ORIGIN
-16 HARDWARE_PATTERN_PROGRAMMED_BITS
---------- -------
-
- **** write pixmap flags ****
-
---------- --------
-23 .
-22 .
-21 .
-20 .
-19 .
-18 .
-17 .
-16 CONVERT_32BPP_TO_24BPP
---------- -------
-
-
- ******** GENERIC FLAGS *********
-
---------- -------
-15 SYNC_AFTER_COLOR_EXPAND
-14 CPU_TRANSFER_PAD_QWORD
-13 .
-12 LEFT_EDGE_CLIPPING_NEGATIVE_X
-11 LEFT_EDGE_CLIPPING
-10 CPU_TRANSFER_BASE_FIXED
- 9 BIT_ORDER_IN_BYTE_MSBFIRST
- 8 TRANSPARENCY_GXCOPY_ONLY
---------- -------
- 7 NO_TRANSPARENCY
- 6 TRANSPARENCY_ONLY
- 5 ROP_NEEDS_SOURCE
- 4 TRIPLE_BITS_24BPP
- 3 RGB_EQUAL
- 2 NO_PLANEMASK
- 1 NO_GXCOPY
- 0 GXCOPY_ONLY
---------- -------
-
-
-*/
-
-#include "gcstruct.h"
-#include "pixmapstr.h"
-#include "xf86str.h"
-#include "regionstr.h"
-#include "xf86fbman.h"
-
-#include "picturestr.h"
-
-/* Flags */
-#define PIXMAP_CACHE 0x00000001
-#define MICROSOFT_ZERO_LINE_BIAS 0x00000002
-#define OFFSCREEN_PIXMAPS 0x00000004
-#define LINEAR_FRAMEBUFFER 0x00000008
-
-
-/* GC fg, bg, and planemask restrictions */
-#define GXCOPY_ONLY 0x00000001
-#define NO_GXCOPY 0x00000002
-#define NO_PLANEMASK 0x00000004
-#define RGB_EQUAL 0x00000008
-#define TRIPLE_BITS_24BPP 0x00000010
-#define ROP_NEEDS_SOURCE 0x00000020
-
-/* transparency restrictions */
-#define TRANSPARENCY_ONLY 0x00000040
-#define NO_TRANSPARENCY 0x00000080
-#define TRANSPARENCY_GXCOPY_ONLY 0x00000100
-
-/* bit order restrictions */
-#define BIT_ORDER_IN_BYTE_MSBFIRST 0x00000200
-#define BIT_ORDER_IN_BYTE_LSBFIRST 0x00000000
-
-/* transfer base restriction */
-#define CPU_TRANSFER_BASE_FIXED 0x00000400
-
-/* skipleft restrictions */
-#define LEFT_EDGE_CLIPPING 0x00000800
-#define LEFT_EDGE_CLIPPING_NEGATIVE_X 0x00001000
-
-/* data padding */
-#define CPU_TRANSFER_PAD_DWORD 0x00000000
-#define CPU_TRANSFER_PAD_QWORD 0x00004000
-#define SCANLINE_PAD_DWORD 0x00000000
-
-#define SYNC_AFTER_COLOR_EXPAND 0x00008000
-#define SYNC_AFTER_IMAGE_WRITE SYNC_AFTER_COLOR_EXPAND
-
-/* hardware pattern */
-#define HARDWARE_PATTERN_PROGRAMMED_BITS 0x00010000
-#define HARDWARE_PATTERN_PROGRAMMED_ORIGIN 0x00020000
-#define HARDWARE_PATTERN_SCREEN_ORIGIN 0x00200000
-
-/* copyarea flags */
-#define ONLY_TWO_BITBLT_DIRECTIONS 0x00400000
-#define ONLY_LEFT_TO_RIGHT_BITBLT 0x00800000
-
-/* line flags */
-#define LINE_PATTERN_LSBFIRST_MSBJUSTIFIED 0x00800000
-#define LINE_PATTERN_LSBFIRST_LSBJUSTIFIED 0x00400000
-#define LINE_PATTERN_MSBFIRST_MSBJUSTIFIED 0x00200000
-#define LINE_PATTERN_MSBFIRST_LSBJUSTIFIED 0x00100000
-#define LINE_PATTERN_POWER_OF_2_ONLY 0x00080000
-#define LINE_LIMIT_COORDS 0x00040000
-
-/* clipping flags */
-#define HARDWARE_CLIP_SCREEN_TO_SCREEN_COLOR_EXPAND 0x00400000
-#define HARDWARE_CLIP_SCREEN_TO_SCREEN_COPY 0x00200000
-#define HARDWARE_CLIP_MONO_8x8_FILL 0x00100000
-#define HARDWARE_CLIP_COLOR_8x8_FILL 0x00080000
-#define HARDWARE_CLIP_SOLID_FILL 0x00040000
-#define HARDWARE_CLIP_DASHED_LINE 0x00020000
-#define HARDWARE_CLIP_SOLID_LINE 0x00010000
-
-#define HARDWARE_CLIP_LINE 0x00000000
-
-
-/* image write flags */
-#define CONVERT_32BPP_TO_24BPP 0x00010000
-
-/* pixmap cache flags */
-#define CACHE_MONO_8x8 0x00000001
-#define CACHE_COLOR_8x8 0x00000002
-#define DO_NOT_BLIT_STIPPLES 0x00000004
-#define DO_NOT_TILE_MONO_DATA 0x00000008
-#define DO_NOT_TILE_COLOR_DATA 0x00000010
-
-
-#define DEGREES_0 0
-#define DEGREES_90 1
-#define DEGREES_180 2
-#define DEGREES_270 3
-
-#define OMIT_LAST 1
-
-/* render flags */
-
-#define XAA_RENDER_POWER_OF_2_TILE_ONLY 0x00000008
-#define XAA_RENDER_NO_SRC_ALPHA 0x00000004
-#define XAA_RENDER_IMPRECISE_ONLY 0x00000002
-#define XAA_RENDER_NO_TILE 0x00000001
-
-#define XAA_RENDER_REPEAT 0x00000001
-
-typedef void (* ValidateGCProcPtr)(
- GCPtr pGC,
- unsigned long changes,
- DrawablePtr pDraw
-);
-
-typedef struct {
- unsigned char *bits;
- int width;
- int height;
- int yoff;
- int srcwidth;
- int start;
- int end;
-} NonTEGlyphInfo, *NonTEGlyphPtr;
-
-
-typedef struct {
- int x;
- int y;
- int w;
- int h;
- int orig_w;
- int orig_h;
- unsigned long serialNumber;
- int pat0;
- int pat1;
- int fg;
- int bg;
- int trans_color;
- DDXPointPtr offsets;
- DevUnion devPrivate;
-} XAACacheInfoRec, *XAACacheInfoPtr;
-
-
-typedef struct _PixmapLink {
- PixmapPtr pPix;
- struct _PixmapLink *next;
- FBAreaPtr area;
-} PixmapLink, *PixmapLinkPtr;
-
-typedef struct _XAAInfoRec {
- ScrnInfoPtr pScrn;
- int Flags;
-
- void (*Sync)(
- ScrnInfoPtr pScrn
- );
-
- /* Restore Accel State is a driver callback that is used
- * when another screen on the same device has been active.
- * This allows multihead on a single device to work.
- * If The entityProp has IS_SHARED_ACCEL defined then this
- * function is required.
- */
-
- void (*RestoreAccelState)(
- ScrnInfoPtr pScrn
- );
-
- /***************** Low Level *****************/
-
-/* Blits */
- void (*SetupForScreenToScreenCopy)(
- ScrnInfoPtr pScrn,
- int xdir, int ydir,
- int rop,
- unsigned int planemask,
- int trans_color
- );
- int ScreenToScreenCopyFlags;
-
- void (*SubsequentScreenToScreenCopy)(
- ScrnInfoPtr pScrn,
- int xsrc, int ysrc,
- int xdst, int ydst,
- int w, int h
- );
-
-
-/* Solid fills */
- void (*SetupForSolidFill)(
- ScrnInfoPtr pScrn,
- int color,
- int rop,
- unsigned int planemask
- );
- int SolidFillFlags;
-
- void (*SubsequentSolidFillRect)(
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h
- );
-
- void (*SubsequentSolidFillTrap)(
- ScrnInfoPtr pScrn,
- int y, int h,
- int left, int dxL, int dyL, int eL,
- int right, int dxR, int dyR, int eR
- );
-
-
-/* Solid lines */
-
- void (*SetupForSolidLine)(
- ScrnInfoPtr pScrn,
- int color,
- int rop,
- unsigned int planemask
- );
- int SolidLineFlags;
-
- void (*SubsequentSolidTwoPointLine)(
- ScrnInfoPtr pScrn,
- int xa, int ya, int xb, int yb, int flags
- );
-
- void (*SubsequentSolidBresenhamLine)(
- ScrnInfoPtr pScrn,
- int x, int y, int absmaj, int absmin, int err, int len, int octant
- );
- int SolidBresenhamLineErrorTermBits;
-
- void (*SubsequentSolidHorVertLine)(
- ScrnInfoPtr pScrn,
- int x, int y, int len, int dir
- );
-
-/* Dashed lines */
-
- void (*SetupForDashedLine)(
- ScrnInfoPtr pScrn,
- int fg, int bg,
- int rop,
- unsigned int planemask,
- int length,
- unsigned char *pattern
- );
- int DashedLineFlags;
- int DashPatternMaxLength;
-
- void (*SubsequentDashedTwoPointLine)(
- ScrnInfoPtr pScrn,
- int xa, int ya, int xb, int yb, int flags, int phase
- );
-
- void (*SubsequentDashedBresenhamLine)(
- ScrnInfoPtr pScrn,
- int x, int y, int absmaj, int absmin, int err, int len, int flags,
- int phase
- );
- int DashedBresenhamLineErrorTermBits;
-
-/* Clipper */
-
- void (*SetClippingRectangle) (
- ScrnInfoPtr pScrn,
- int left, int top, int right, int bottom
- );
- int ClippingFlags;
-
- void (*DisableClipping)(ScrnInfoPtr pScrn);
-
-/* 8x8 mono pattern fills */
- void (*SetupForMono8x8PatternFill)(
- ScrnInfoPtr pScrn,
- int patx, int paty,
- int fg, int bg,
- int rop,
- unsigned int planemask
- );
- int Mono8x8PatternFillFlags;
-
- void (*SubsequentMono8x8PatternFillRect)(
- ScrnInfoPtr pScrn,
- int patx, int paty,
- int x, int y, int w, int h
- );
-
- void (*SubsequentMono8x8PatternFillTrap)(
- ScrnInfoPtr pScrn,
- int patx, int paty,
- int y, int h,
- int left, int dxL, int dyL, int eL,
- int right, int dxR, int dyR, int eR
- );
-
-/* 8x8 color pattern fills */
-
- void (*SetupForColor8x8PatternFill)(
- ScrnInfoPtr pScrn,
- int patx, int paty,
- int rop,
- unsigned int planemask,
- int transparency_color
- );
- int Color8x8PatternFillFlags;
-
- void (*SubsequentColor8x8PatternFillRect)(
- ScrnInfoPtr pScrn,
- int patx, int paty,
- int x, int y, int w, int h
- );
-
- void (*SubsequentColor8x8PatternFillTrap)(
- ScrnInfoPtr pScrn,
- int patx, int paty,
- int y, int h,
- int left, int dxL, int dyL, int eL,
- int right, int dxR, int dyR, int eR
- );
-
-
-/* Color expansion */
-
- void (*SetupForCPUToScreenColorExpandFill)(
- ScrnInfoPtr pScrn,
- int fg, int bg,
- int rop,
- unsigned int planemask
- );
- int CPUToScreenColorExpandFillFlags;
-
- void (*SubsequentCPUToScreenColorExpandFill)(
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h,
- int skipleft
- );
-
- unsigned char *ColorExpandBase;
- int ColorExpandRange;
-
-
-/* Scanline color expansion */
-
- void (*SetupForScanlineCPUToScreenColorExpandFill)(
- ScrnInfoPtr pScrn,
- int fg, int bg,
- int rop,
- unsigned int planemask
- );
- int ScanlineCPUToScreenColorExpandFillFlags;
-
- void (*SubsequentScanlineCPUToScreenColorExpandFill)(
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h,
- int skipleft
- );
-
- void (*SubsequentColorExpandScanline)(
- ScrnInfoPtr pScrn,
- int bufno
- );
-
- int NumScanlineColorExpandBuffers;
- unsigned char **ScanlineColorExpandBuffers;
-
-/* Screen to screen color expansion */
-
- void (*SetupForScreenToScreenColorExpandFill) (
- ScrnInfoPtr pScrn,
- int fg, int bg,
- int rop,
- unsigned int planemask
- );
- int ScreenToScreenColorExpandFillFlags;
-
- void (*SubsequentScreenToScreenColorExpandFill)(
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h,
- int srcx, int srcy, int skipleft
- );
-
-
-/* Image transfers */
-
- void (*SetupForImageWrite)(
- ScrnInfoPtr pScrn,
- int rop,
- unsigned int planemask,
- int transparency_color,
- int bpp, int depth
- );
- int ImageWriteFlags;
-
- void (*SubsequentImageWriteRect)(
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h,
- int skipleft
- );
- unsigned char *ImageWriteBase;
- int ImageWriteRange;
-
-/* Scanline Image transfers */
-
- void (*SetupForScanlineImageWrite)(
- ScrnInfoPtr pScrn,
- int rop,
- unsigned int planemask,
- int transparency_color,
- int bpp, int depth
- );
- int ScanlineImageWriteFlags;
-
- void (*SubsequentScanlineImageWriteRect)(
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h,
- int skipleft
- );
-
- void (*SubsequentImageWriteScanline) (
- ScrnInfoPtr pScrn,
- int bufno
- );
-
- int NumScanlineImageWriteBuffers;
- unsigned char **ScanlineImageWriteBuffers;
-
- /* Image Reads - OBSOLETE AND NOT USED */
-
- void (*SetupForImageRead) (
- ScrnInfoPtr pScrn,
- int bpp, int depth
- );
- int ImageReadFlags;
-
- unsigned char *ImageReadBase;
- int ImageReadRange;
-
- void (*SubsequentImageReadRect)(
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h
- );
-
-
- /***************** Mid Level *****************/
- void (*ScreenToScreenBitBlt)(
- ScrnInfoPtr pScrn,
- int nbox,
- DDXPointPtr pptSrc,
- BoxPtr pbox,
- int xdir, int ydir,
- int alu,
- unsigned int planmask
- );
- int ScreenToScreenBitBltFlags;
-
- void (*WriteBitmap) (
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h,
- unsigned char *src,
- int srcwidth,
- int skipleft,
- int fg, int bg,
- int rop,
- unsigned int planemask
- );
- int WriteBitmapFlags;
-
- void (*FillSolidRects)(
- ScrnInfoPtr pScrn,
- int fg, int rop,
- unsigned int planemask,
- int nBox,
- BoxPtr pBox
- );
- int FillSolidRectsFlags;
-
- void (*FillMono8x8PatternRects)(
- ScrnInfoPtr pScrn,
- int fg, int bg, int rop,
- unsigned int planemask,
- int nBox,
- BoxPtr pBox,
- int pat0, int pat1,
- int xorg, int yorg
- );
- int FillMono8x8PatternRectsFlags;
-
- void (*FillColor8x8PatternRects)(
- ScrnInfoPtr pScrn,
- int rop,
- unsigned int planemask,
- int nBox,
- BoxPtr pBox,
- int xorg, int yorg,
- XAACacheInfoPtr pCache
- );
- int FillColor8x8PatternRectsFlags;
-
- void (*FillCacheBltRects)(
- ScrnInfoPtr pScrn,
- int rop,
- unsigned int planemask,
- int nBox,
- BoxPtr pBox,
- int xorg, int yorg,
- XAACacheInfoPtr pCache
- );
- int FillCacheBltRectsFlags;
-
- void (*FillColorExpandRects)(
- ScrnInfoPtr pScrn,
- int fg, int bg, int rop,
- unsigned int planemask,
- int nBox,
- BoxPtr pBox,
- int xorg, int yorg,
- PixmapPtr pPix
- );
- int FillColorExpandRectsFlags;
-
- void (*FillCacheExpandRects)(
- ScrnInfoPtr pScrn,
- int fg, int bg, int rop,
- unsigned int planemask,
- int nBox,
- BoxPtr pBox,
- int xorg, int yorg,
- PixmapPtr pPix
- );
- int FillCacheExpandRectsFlags;
-
- void (*FillImageWriteRects)(
- ScrnInfoPtr pScrn,
- int rop,
- unsigned int planemask,
- int nBox,
- BoxPtr pBox,
- int xorg, int yorg,
- PixmapPtr pPix
- );
- int FillImageWriteRectsFlags;
-
-
- void (*FillSolidSpans)(
- ScrnInfoPtr pScrn,
- int fg, int rop,
- unsigned int planemask,
- int n,
- DDXPointPtr points,
- int *widths,
- int fSorted
- );
- int FillSolidSpansFlags;
-
- void (*FillMono8x8PatternSpans)(
- ScrnInfoPtr pScrn,
- int fg, int bg, int rop,
- unsigned int planemask,
- int n,
- DDXPointPtr points,
- int *widths,
- int fSorted,
- int pat0, int pat1,
- int xorg, int yorg
- );
- int FillMono8x8PatternSpansFlags;
-
- void (*FillColor8x8PatternSpans)(
- ScrnInfoPtr pScrn,
- int rop,
- unsigned int planemask,
- int n,
- DDXPointPtr points,
- int *widths,
- int fSorted,
- XAACacheInfoPtr pCache,
- int xorg, int yorg
- );
- int FillColor8x8PatternSpansFlags;
-
- void (*FillCacheBltSpans)(
- ScrnInfoPtr pScrn,
- int rop,
- unsigned int planemask,
- int n,
- DDXPointPtr points,
- int *widths,
- int fSorted,
- XAACacheInfoPtr pCache,
- int xorg, int yorg
- );
- int FillCacheBltSpansFlags;
-
- void (*FillColorExpandSpans)(
- ScrnInfoPtr pScrn,
- int fg, int bg, int rop,
- unsigned int planemask,
- int n,
- DDXPointPtr points,
- int *widths,
- int fSorted,
- int xorg, int yorg,
- PixmapPtr pPix
- );
- int FillColorExpandSpansFlags;
-
- void (*FillCacheExpandSpans)(
- ScrnInfoPtr pScrn,
- int fg, int bg, int rop,
- unsigned int planemask,
- int n,
- DDXPointPtr ppt,
- int *pwidth,
- int fSorted,
- int xorg, int yorg,
- PixmapPtr pPix
- );
- int FillCacheExpandSpansFlags;
-
- void (*TEGlyphRenderer)(
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h, int skipleft, int startline,
- unsigned int **glyphs, int glyphWidth,
- int fg, int bg, int rop, unsigned planemask
- );
- int TEGlyphRendererFlags;
-
- void (*NonTEGlyphRenderer)(
- ScrnInfoPtr pScrn,
- int x, int y, int n,
- NonTEGlyphPtr glyphs,
- BoxPtr pbox,
- int fg, int rop,
- unsigned int planemask
- );
- int NonTEGlyphRendererFlags;
-
- void (*WritePixmap) (
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h,
- unsigned char *src,
- int srcwidth,
- int rop,
- unsigned int planemask,
- int transparency_color,
- int bpp, int depth
- );
- int WritePixmapFlags;
-
- void (*ReadPixmap) (
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h,
- unsigned char *dst,
- int dstwidth,
- int bpp, int depth
- );
- int ReadPixmapFlags;
-
- /***************** GC Level *****************/
- RegionPtr (*CopyArea)(
- DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GC *pGC,
- int srcx, int srcy,
- int width, int height,
- int dstx, int dsty
- );
- int CopyAreaFlags;
-
- RegionPtr (*CopyPlane)(
- DrawablePtr pSrc,
- DrawablePtr pDst,
- GCPtr pGC,
- int srcx, int srcy,
- int width, int height,
- int dstx, int dsty,
- unsigned long bitPlane
- );
- int CopyPlaneFlags;
-
- void (*PushPixelsSolid) (
- GCPtr pGC,
- PixmapPtr pBitMap,
- DrawablePtr pDrawable,
- int dx, int dy,
- int xOrg, int yOrg
- );
- int PushPixelsFlags;
-
- /** PolyFillRect **/
-
- void (*PolyFillRectSolid)(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nrectFill,
- xRectangle *prectInit
- );
- int PolyFillRectSolidFlags;
-
- void (*PolyFillRectStippled)(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nrectFill,
- xRectangle *prectInit
- );
- int PolyFillRectStippledFlags;
-
- void (*PolyFillRectOpaqueStippled)(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nrectFill,
- xRectangle *prectInit
- );
- int PolyFillRectOpaqueStippledFlags;
-
- void (*PolyFillRectTiled)(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nrectFill,
- xRectangle *prectInit
- );
- int PolyFillRectTiledFlags;
-
- /** FillSpans **/
-
- void (*FillSpansSolid)(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nInit,
- DDXPointPtr ppt,
- int *pwidth,
- int fSorted
- );
- int FillSpansSolidFlags;
-
- void (*FillSpansStippled)(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nInit,
- DDXPointPtr ppt,
- int *pwidth,
- int fSorted
- );
- int FillSpansStippledFlags;
-
- void (*FillSpansOpaqueStippled)(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nInit,
- DDXPointPtr ppt,
- int *pwidth,
- int fSorted
- );
- int FillSpansOpaqueStippledFlags;
-
- void (*FillSpansTiled)(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nInit,
- DDXPointPtr ppt,
- int *pwidth,
- int fSorted
- );
- int FillSpansTiledFlags;
-
- int (*PolyText8TE) (
- DrawablePtr pDraw,
- GCPtr pGC,
- int x, int y,
- int count,
- char *chars
- );
- int PolyText8TEFlags;
-
- int (*PolyText16TE) (
- DrawablePtr pDraw,
- GCPtr pGC,
- int x, int y,
- int count,
- unsigned short *chars
- );
- int PolyText16TEFlags;
-
- void (*ImageText8TE) (
- DrawablePtr pDraw,
- GCPtr pGC,
- int x, int y,
- int count,
- char *chars
- );
- int ImageText8TEFlags;
-
- void (*ImageText16TE) (
- DrawablePtr pDraw,
- GCPtr pGC,
- int x, int y,
- int count,
- unsigned short *chars
- );
- int ImageText16TEFlags;
-
- void (*ImageGlyphBltTE) (
- DrawablePtr pDrawable,
- GCPtr pGC,
- int xInit, int yInit,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- pointer pglyphBase
- );
- int ImageGlyphBltTEFlags;
-
- void (*PolyGlyphBltTE) (
- DrawablePtr pDrawable,
- GCPtr pGC,
- int xInit, int yInit,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- pointer pglyphBase
- );
- int PolyGlyphBltTEFlags;
-
- int (*PolyText8NonTE) (
- DrawablePtr pDraw,
- GCPtr pGC,
- int x, int y,
- int count,
- char *chars
- );
- int PolyText8NonTEFlags;
-
- int (*PolyText16NonTE) (
- DrawablePtr pDraw,
- GCPtr pGC,
- int x, int y,
- int count,
- unsigned short *chars
- );
- int PolyText16NonTEFlags;
-
- void (*ImageText8NonTE) (
- DrawablePtr pDraw,
- GCPtr pGC,
- int x, int y,
- int count,
- char *chars
- );
- int ImageText8NonTEFlags;
-
- void (*ImageText16NonTE) (
- DrawablePtr pDraw,
- GCPtr pGC,
- int x, int y,
- int count,
- unsigned short *chars
- );
- int ImageText16NonTEFlags;
-
- void (*ImageGlyphBltNonTE) (
- DrawablePtr pDrawable,
- GCPtr pGC,
- int xInit, int yInit,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- pointer pglyphBase
- );
- int ImageGlyphBltNonTEFlags;
-
- void (*PolyGlyphBltNonTE) (
- DrawablePtr pDrawable,
- GCPtr pGC,
- int xInit, int yInit,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- pointer pglyphBase
- );
- int PolyGlyphBltNonTEFlags;
-
- void (*PolyRectangleThinSolid)(
- DrawablePtr pDrawable,
- GCPtr pGC,
- int nRectsInit,
- xRectangle *pRectsInit
- );
- int PolyRectangleThinSolidFlags;
-
- void (*PolylinesWideSolid)(
- DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr pPts
- );
- int PolylinesWideSolidFlags;
-
- void (*PolylinesThinSolid)(
- DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr pPts
- );
- int PolylinesThinSolidFlags;
-
- void (*PolySegmentThinSolid)(
- DrawablePtr pDrawable,
- GCPtr pGC,
- int nseg,
- xSegment *pSeg
- );
- int PolySegmentThinSolidFlags;
-
- void (*PolylinesThinDashed)(
- DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr pPts
- );
- int PolylinesThinDashedFlags;
-
- void (*PolySegmentThinDashed)(
- DrawablePtr pDrawable,
- GCPtr pGC,
- int nseg,
- xSegment *pSeg
- );
- int PolySegmentThinDashedFlags;
-
- void (*FillPolygonSolid)(
- DrawablePtr pDrawable,
- GCPtr pGC,
- int shape,
- int mode,
- int count,
- DDXPointPtr ptsIn
- );
- int FillPolygonSolidFlags;
-
- void (*FillPolygonStippled)(
- DrawablePtr pDrawable,
- GCPtr pGC,
- int shape,
- int mode,
- int count,
- DDXPointPtr ptsIn
- );
- int FillPolygonStippledFlags;
-
- void (*FillPolygonOpaqueStippled)(
- DrawablePtr pDrawable,
- GCPtr pGC,
- int shape,
- int mode,
- int count,
- DDXPointPtr ptsIn
- );
- int FillPolygonOpaqueStippledFlags;
-
- void (*FillPolygonTiled)(
- DrawablePtr pDrawable,
- GCPtr pGC,
- int shape,
- int mode,
- int count,
- DDXPointPtr ptsIn
- );
- int FillPolygonTiledFlags;
-
- void (*PolyFillArcSolid)(
- DrawablePtr pDraw,
- GCPtr pGC,
- int narcs,
- xArc *parcs
- );
- int PolyFillArcSolidFlags;
-
- void (*PutImage)(
- DrawablePtr pDraw,
- GCPtr pGC,
- int depth,
- int x,
- int y,
- int w,
- int h,
- int leftPad,
- int format,
- char *pImage
- );
- int PutImageFlags;
-
- /* Validation masks */
-
- unsigned long FillSpansMask;
- ValidateGCProcPtr ValidateFillSpans;
- unsigned long SetSpansMask;
- ValidateGCProcPtr ValidateSetSpans;
- unsigned long PutImageMask;
- ValidateGCProcPtr ValidatePutImage;
- unsigned long CopyAreaMask;
- ValidateGCProcPtr ValidateCopyArea;
- unsigned long CopyPlaneMask;
- ValidateGCProcPtr ValidateCopyPlane;
- unsigned long PolyPointMask;
- ValidateGCProcPtr ValidatePolyPoint;
- unsigned long PolylinesMask;
- ValidateGCProcPtr ValidatePolylines;
- unsigned long PolySegmentMask;
- ValidateGCProcPtr ValidatePolySegment;
- unsigned long PolyRectangleMask;
- ValidateGCProcPtr ValidatePolyRectangle;
- unsigned long PolyArcMask;
- ValidateGCProcPtr ValidatePolyArc;
- unsigned long FillPolygonMask;
- ValidateGCProcPtr ValidateFillPolygon;
- unsigned long PolyFillRectMask;
- ValidateGCProcPtr ValidatePolyFillRect;
- unsigned long PolyFillArcMask;
- ValidateGCProcPtr ValidatePolyFillArc;
- unsigned long PolyText8Mask;
- ValidateGCProcPtr ValidatePolyText8;
- unsigned long PolyText16Mask;
- ValidateGCProcPtr ValidatePolyText16;
- unsigned long ImageText8Mask;
- ValidateGCProcPtr ValidateImageText8;
- unsigned long ImageText16Mask;
- ValidateGCProcPtr ValidateImageText16;
- unsigned long PolyGlyphBltMask;
- ValidateGCProcPtr ValidatePolyGlyphBlt;
- unsigned long ImageGlyphBltMask;
- ValidateGCProcPtr ValidateImageGlyphBlt;
- unsigned long PushPixelsMask;
- ValidateGCProcPtr ValidatePushPixels;
-
- void (*ComputeDash)(GCPtr pGC);
-
- /* Pixmap Cache */
-
- int PixmapCacheFlags;
- Bool UsingPixmapCache;
- Bool CanDoMono8x8;
- Bool CanDoColor8x8;
-
- void (*InitPixmapCache)(
- ScreenPtr pScreen,
- RegionPtr areas,
- pointer data
- );
- void (*ClosePixmapCache)(
- ScreenPtr pScreen
- );
-
- int (*StippledFillChooser)(GCPtr pGC);
- int (*OpaqueStippledFillChooser)(GCPtr pGC);
- int (*TiledFillChooser)(GCPtr pGC);
-
- int CachePixelGranularity;
- int MaxCacheableTileWidth;
- int MaxCacheableTileHeight;
- int MaxCacheableStippleWidth;
- int MaxCacheableStippleHeight;
-
- XAACacheInfoPtr (*CacheTile)(
- ScrnInfoPtr Scrn, PixmapPtr pPix
- );
- XAACacheInfoPtr (*CacheStipple)(
- ScrnInfoPtr Scrn, PixmapPtr pPix,
- int fg, int bg
- );
- XAACacheInfoPtr (*CacheMonoStipple)(
- ScrnInfoPtr Scrn, PixmapPtr pPix
- );
- XAACacheInfoPtr (*CacheMono8x8Pattern)(
- ScrnInfoPtr Scrn, int pat0, int pat1
- );
- XAACacheInfoPtr (*CacheColor8x8Pattern)(
- ScrnInfoPtr Scrn, PixmapPtr pPix,
- int fg, int bg
- );
-
-
- int MonoPatternPitch;
- int CacheWidthMono8x8Pattern;
- int CacheHeightMono8x8Pattern;
-
- int ColorPatternPitch;
- int CacheWidthColor8x8Pattern;
- int CacheHeightColor8x8Pattern;
-
- int CacheColorExpandDensity;
-
- void (*WriteBitmapToCache) (
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h,
- unsigned char *src,
- int srcwidth,
- int fg, int bg
- );
- void (*WritePixmapToCache) (
- ScrnInfoPtr pScrn,
- int x, int y, int w, int h,
- unsigned char *src,
- int srcwidth,
- int bpp, int depth
- );
- void (*WriteMono8x8PatternToCache)(
- ScrnInfoPtr pScrn,
- XAACacheInfoPtr pCache
- );
- void (*WriteColor8x8PatternToCache)(
- ScrnInfoPtr pScrn,
- PixmapPtr pPix,
- XAACacheInfoPtr pCache
- );
-
- char* PixmapCachePrivate;
-
- /* Miscellaneous */
-
- GC ScratchGC;
- int PreAllocSize;
- unsigned char *PreAllocMem;
-
- CharInfoPtr CharInfo[255];
- NonTEGlyphInfo GlyphInfo[255];
-
- unsigned int FullPlanemask; /* deprecated */
-
- PixmapLinkPtr OffscreenPixmaps;
- int maxOffPixWidth;
- int maxOffPixHeight;
-
- XAACacheInfoRec ScratchCacheInfoRec;
-
- BoxPtr ClipBox;
-
- Bool NeedToSync;
-
- char *dgaSaves;
-
- /* These can be supplied to override the defaults */
-
- GetImageProcPtr GetImage;
- GetSpansProcPtr GetSpans;
- CopyWindowProcPtr CopyWindow;
- BackingStoreSaveAreasProcPtr SaveAreas;
- BackingStoreRestoreAreasProcPtr RestoreAreas;
-
- unsigned int offscreenDepths;
- Bool offscreenDepthsInitialized;
-
- CARD32 FullPlanemasks[32];
-
- Bool (*Composite) (
- CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height
- );
-
- Bool (*Glyphs) (
- CARD8 op,
- PicturePtr pSrc,
- PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc,
- INT16 ySrc,
- int nlist,
- GlyphListPtr list,
- GlyphPtr *glyphs
- );
-
- /* The old SetupForCPUToScreenAlphaTexture function is no longer used because
- * it doesn't pass in enough information to write a conforming
- * implementation. See SetupForCPUToScreenAlphaTexture2.
- */
- Bool (*SetupForCPUToScreenAlphaTexture) (
- ScrnInfoPtr pScrn,
- int op,
- CARD16 red,
- CARD16 green,
- CARD16 blue,
- CARD16 alpha,
- int alphaType,
- CARD8 *alphaPtr,
- int alphaPitch,
- int width,
- int height,
- int flags
- );
- void (*SubsequentCPUToScreenAlphaTexture) (
- ScrnInfoPtr pScrn,
- int dstx,
- int dsty,
- int srcx,
- int srcy,
- int width,
- int height
- );
- int CPUToScreenAlphaTextureFlags;
- CARD32 * CPUToScreenAlphaTextureFormats;
-
- /* The old SetupForCPUToScreenTexture function is no longer used because
- * it doesn't pass in enough information to write a conforming
- * implementation. See SetupForCPUToScreenTexture2.
- */
- Bool (*SetupForCPUToScreenTexture) (
- ScrnInfoPtr pScrn,
- int op,
- int texType,
- CARD8 *texPtr,
- int texPitch,
- int width,
- int height,
- int flags
- );
- void (*SubsequentCPUToScreenTexture) (
- ScrnInfoPtr pScrn,
- int dstx,
- int dsty,
- int srcx,
- int srcy,
- int width,
- int height
- );
- int CPUToScreenTextureFlags;
- CARD32 * CPUToScreenTextureFormats;
-
-
- /* these were added for 4.3.0 */
- BoxRec SolidLineLimits;
- BoxRec DashedLineLimits;
-
- /* These were added for X.Org 6.8.0 */
- Bool (*SetupForCPUToScreenAlphaTexture2) (
- ScrnInfoPtr pScrn,
- int op,
- CARD16 red,
- CARD16 green,
- CARD16 blue,
- CARD16 alpha,
- CARD32 maskFormat,
- CARD32 dstFormat,
- CARD8 *alphaPtr,
- int alphaPitch,
- int width,
- int height,
- int flags
- );
- CARD32 *CPUToScreenAlphaTextureDstFormats;
-
- Bool (*SetupForCPUToScreenTexture2) (
- ScrnInfoPtr pScrn,
- int op,
- CARD32 srcFormat,
- CARD32 dstFormat,
- CARD8 *texPtr,
- int texPitch,
- int width,
- int height,
- int flags
- );
- CARD32 *CPUToScreenTextureDstFormats;
-} XAAInfoRec, *XAAInfoRecPtr;
-
-#define SET_SYNC_FLAG(infoRec) (infoRec)->NeedToSync = TRUE
-
-
-extern _X_EXPORT Bool
-XAAInit(
- ScreenPtr pScreen,
- XAAInfoRecPtr infoRec
-);
-
-extern _X_EXPORT XAAInfoRecPtr XAACreateInfoRec(void);
-
-extern _X_EXPORT void
-XAADestroyInfoRec(
- XAAInfoRecPtr infoRec
-);
-
-typedef void (*DepthChangeFuncPtr) (ScrnInfoPtr pScrn, int depth);
-
-extern _X_EXPORT Bool
-XAAInitDualFramebufferOverlay(
- ScreenPtr pScreen,
- DepthChangeFuncPtr callback
-);
-
-#endif /* _XAA_H */
+
+#ifndef _XAA_H
+#define _XAA_H
+
+#define XAA_VERSION_MAJOR 1
+#define XAA_VERSION_MINOR 2
+#define XAA_VERSION_RELEASE 1
+
+/*
+
+ ******** OPERATION SPECIFIC FLAGS *********
+
+ **** solid/dashed line flags ****
+
+--------- --------
+23 LINE_PATTERN_LSBFIRST_MSBJUSTIFIED
+22 LINE_PATTERN_LSBFIRST_LSBJUSTIFIED
+21 LINE_PATTERN_MSBFIRST_MSBJUSTIFIED
+20 LINE_PATTERN_MSBFIRST_LSBJUSTIFIED
+19 LINE_PATTERN_POWER_OF_2_ONLY
+18 LINE_LIMIT_COORDS
+17 .
+16 .
+--------- -------
+
+ **** screen to screen copy flags ****
+
+--------- --------
+23 ONLY_LEFT_TO_RIGHT_BITBLT
+22 ONLY_TWO_BITBLT_DIRECTIONS
+21 .
+20 .
+19 .
+18 .
+17 .
+16 .
+--------- -------
+
+ **** clipping flags ****
+
+--------- --------
+23 .
+22 HARDWARE_CLIP_SCREEN_TO_SCREEN_COLOR_EXPAND
+21 HARDWARE_CLIP_SCREEN_TO_SCREEN_COPY
+20 HARDWARE_CLIP_MONO_8x8_FILL
+19 HARDWARE_CLIP_COLOR_8x8_FILL
+18 HARDWARE_CLIP_SOLID_FILL
+17 HARDWARE_CLIP_DASHED_LINE
+16 HARDWARE_CLIP_SOLID_LINE
+--------- -------
+
+
+ **** hardware pattern flags ****
+
+--------- --------
+23 .
+22 .
+21 HARDWARE_PATTERN_SCREEN_ORIGIN
+20 .
+19 .
+18 .
+17 HARDWARE_PATTERN_PROGRAMMED_ORIGIN
+16 HARDWARE_PATTERN_PROGRAMMED_BITS
+--------- -------
+
+ **** write pixmap flags ****
+
+--------- --------
+23 .
+22 .
+21 .
+20 .
+19 .
+18 .
+17 .
+16 CONVERT_32BPP_TO_24BPP
+--------- -------
+
+
+ ******** GENERIC FLAGS *********
+
+--------- -------
+15 SYNC_AFTER_COLOR_EXPAND
+14 CPU_TRANSFER_PAD_QWORD
+13 .
+12 LEFT_EDGE_CLIPPING_NEGATIVE_X
+11 LEFT_EDGE_CLIPPING
+10 CPU_TRANSFER_BASE_FIXED
+ 9 BIT_ORDER_IN_BYTE_MSBFIRST
+ 8 TRANSPARENCY_GXCOPY_ONLY
+--------- -------
+ 7 NO_TRANSPARENCY
+ 6 TRANSPARENCY_ONLY
+ 5 ROP_NEEDS_SOURCE
+ 4 TRIPLE_BITS_24BPP
+ 3 RGB_EQUAL
+ 2 NO_PLANEMASK
+ 1 NO_GXCOPY
+ 0 GXCOPY_ONLY
+--------- -------
+
+
+*/
+
+#include "gcstruct.h"
+#include "pixmapstr.h"
+#include "xf86str.h"
+#include "regionstr.h"
+#include "xf86fbman.h"
+
+#include "picturestr.h"
+
+/* Flags */
+#define PIXMAP_CACHE 0x00000001
+#define MICROSOFT_ZERO_LINE_BIAS 0x00000002
+#define OFFSCREEN_PIXMAPS 0x00000004
+#define LINEAR_FRAMEBUFFER 0x00000008
+
+
+/* GC fg, bg, and planemask restrictions */
+#define GXCOPY_ONLY 0x00000001
+#define NO_GXCOPY 0x00000002
+#define NO_PLANEMASK 0x00000004
+#define RGB_EQUAL 0x00000008
+#define TRIPLE_BITS_24BPP 0x00000010
+#define ROP_NEEDS_SOURCE 0x00000020
+
+/* transparency restrictions */
+#define TRANSPARENCY_ONLY 0x00000040
+#define NO_TRANSPARENCY 0x00000080
+#define TRANSPARENCY_GXCOPY_ONLY 0x00000100
+
+/* bit order restrictions */
+#define BIT_ORDER_IN_BYTE_MSBFIRST 0x00000200
+#define BIT_ORDER_IN_BYTE_LSBFIRST 0x00000000
+
+/* transfer base restriction */
+#define CPU_TRANSFER_BASE_FIXED 0x00000400
+
+/* skipleft restrictions */
+#define LEFT_EDGE_CLIPPING 0x00000800
+#define LEFT_EDGE_CLIPPING_NEGATIVE_X 0x00001000
+
+/* data padding */
+#define CPU_TRANSFER_PAD_DWORD 0x00000000
+#define CPU_TRANSFER_PAD_QWORD 0x00004000
+#define SCANLINE_PAD_DWORD 0x00000000
+
+#define SYNC_AFTER_COLOR_EXPAND 0x00008000
+#define SYNC_AFTER_IMAGE_WRITE SYNC_AFTER_COLOR_EXPAND
+
+/* hardware pattern */
+#define HARDWARE_PATTERN_PROGRAMMED_BITS 0x00010000
+#define HARDWARE_PATTERN_PROGRAMMED_ORIGIN 0x00020000
+#define HARDWARE_PATTERN_SCREEN_ORIGIN 0x00200000
+
+/* copyarea flags */
+#define ONLY_TWO_BITBLT_DIRECTIONS 0x00400000
+#define ONLY_LEFT_TO_RIGHT_BITBLT 0x00800000
+
+/* line flags */
+#define LINE_PATTERN_LSBFIRST_MSBJUSTIFIED 0x00800000
+#define LINE_PATTERN_LSBFIRST_LSBJUSTIFIED 0x00400000
+#define LINE_PATTERN_MSBFIRST_MSBJUSTIFIED 0x00200000
+#define LINE_PATTERN_MSBFIRST_LSBJUSTIFIED 0x00100000
+#define LINE_PATTERN_POWER_OF_2_ONLY 0x00080000
+#define LINE_LIMIT_COORDS 0x00040000
+
+/* clipping flags */
+#define HARDWARE_CLIP_SCREEN_TO_SCREEN_COLOR_EXPAND 0x00400000
+#define HARDWARE_CLIP_SCREEN_TO_SCREEN_COPY 0x00200000
+#define HARDWARE_CLIP_MONO_8x8_FILL 0x00100000
+#define HARDWARE_CLIP_COLOR_8x8_FILL 0x00080000
+#define HARDWARE_CLIP_SOLID_FILL 0x00040000
+#define HARDWARE_CLIP_DASHED_LINE 0x00020000
+#define HARDWARE_CLIP_SOLID_LINE 0x00010000
+
+#define HARDWARE_CLIP_LINE 0x00000000
+
+
+/* image write flags */
+#define CONVERT_32BPP_TO_24BPP 0x00010000
+
+/* pixmap cache flags */
+#define CACHE_MONO_8x8 0x00000001
+#define CACHE_COLOR_8x8 0x00000002
+#define DO_NOT_BLIT_STIPPLES 0x00000004
+#define DO_NOT_TILE_MONO_DATA 0x00000008
+#define DO_NOT_TILE_COLOR_DATA 0x00000010
+
+
+#define DEGREES_0 0
+#define DEGREES_90 1
+#define DEGREES_180 2
+#define DEGREES_270 3
+
+#define OMIT_LAST 1
+
+/* render flags */
+
+#define XAA_RENDER_POWER_OF_2_TILE_ONLY 0x00000008
+#define XAA_RENDER_NO_SRC_ALPHA 0x00000004
+#define XAA_RENDER_IMPRECISE_ONLY 0x00000002
+#define XAA_RENDER_NO_TILE 0x00000001
+
+#define XAA_RENDER_REPEAT 0x00000001
+
+typedef void (* ValidateGCProcPtr)(
+ GCPtr pGC,
+ unsigned long changes,
+ DrawablePtr pDraw
+);
+
+typedef struct {
+ unsigned char *bits;
+ int width;
+ int height;
+ int yoff;
+ int srcwidth;
+ int start;
+ int end;
+} NonTEGlyphInfo, *NonTEGlyphPtr;
+
+
+typedef struct {
+ int x;
+ int y;
+ int w;
+ int h;
+ int orig_w;
+ int orig_h;
+ unsigned long serialNumber;
+ int pat0;
+ int pat1;
+ int fg;
+ int bg;
+ int trans_color;
+ DDXPointPtr offsets;
+ DevUnion devPrivate;
+} XAACacheInfoRec, *XAACacheInfoPtr;
+
+
+typedef struct _PixmapLink {
+ PixmapPtr pPix;
+ struct _PixmapLink *next;
+ FBAreaPtr area;
+} PixmapLink, *PixmapLinkPtr;
+
+typedef struct _XAAInfoRec {
+ ScrnInfoPtr pScrn;
+ int Flags;
+
+ void (*Sync)(
+ ScrnInfoPtr pScrn
+ );
+
+ /* Restore Accel State is a driver callback that is used
+ * when another screen on the same device has been active.
+ * This allows multihead on a single device to work.
+ * If The entityProp has IS_SHARED_ACCEL defined then this
+ * function is required.
+ */
+
+ void (*RestoreAccelState)(
+ ScrnInfoPtr pScrn
+ );
+
+ /***************** Low Level *****************/
+
+/* Blits */
+ void (*SetupForScreenToScreenCopy)(
+ ScrnInfoPtr pScrn,
+ int xdir, int ydir,
+ int rop,
+ unsigned int planemask,
+ int trans_color
+ );
+ int ScreenToScreenCopyFlags;
+
+ void (*SubsequentScreenToScreenCopy)(
+ ScrnInfoPtr pScrn,
+ int xsrc, int ysrc,
+ int xdst, int ydst,
+ int w, int h
+ );
+
+
+/* Solid fills */
+ void (*SetupForSolidFill)(
+ ScrnInfoPtr pScrn,
+ int color,
+ int rop,
+ unsigned int planemask
+ );
+ int SolidFillFlags;
+
+ void (*SubsequentSolidFillRect)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h
+ );
+
+ void (*SubsequentSolidFillTrap)(
+ ScrnInfoPtr pScrn,
+ int y, int h,
+ int left, int dxL, int dyL, int eL,
+ int right, int dxR, int dyR, int eR
+ );
+
+
+/* Solid lines */
+
+ void (*SetupForSolidLine)(
+ ScrnInfoPtr pScrn,
+ int color,
+ int rop,
+ unsigned int planemask
+ );
+ int SolidLineFlags;
+
+ void (*SubsequentSolidTwoPointLine)(
+ ScrnInfoPtr pScrn,
+ int xa, int ya, int xb, int yb, int flags
+ );
+
+ void (*SubsequentSolidBresenhamLine)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int absmaj, int absmin, int err, int len, int octant
+ );
+ int SolidBresenhamLineErrorTermBits;
+
+ void (*SubsequentSolidHorVertLine)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int len, int dir
+ );
+
+/* Dashed lines */
+
+ void (*SetupForDashedLine)(
+ ScrnInfoPtr pScrn,
+ int fg, int bg,
+ int rop,
+ unsigned int planemask,
+ int length,
+ unsigned char *pattern
+ );
+ int DashedLineFlags;
+ int DashPatternMaxLength;
+
+ void (*SubsequentDashedTwoPointLine)(
+ ScrnInfoPtr pScrn,
+ int xa, int ya, int xb, int yb, int flags, int phase
+ );
+
+ void (*SubsequentDashedBresenhamLine)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int absmaj, int absmin, int err, int len, int flags,
+ int phase
+ );
+ int DashedBresenhamLineErrorTermBits;
+
+/* Clipper */
+
+ void (*SetClippingRectangle) (
+ ScrnInfoPtr pScrn,
+ int left, int top, int right, int bottom
+ );
+ int ClippingFlags;
+
+ void (*DisableClipping)(ScrnInfoPtr pScrn);
+
+/* 8x8 mono pattern fills */
+ void (*SetupForMono8x8PatternFill)(
+ ScrnInfoPtr pScrn,
+ int patx, int paty,
+ int fg, int bg,
+ int rop,
+ unsigned int planemask
+ );
+ int Mono8x8PatternFillFlags;
+
+ void (*SubsequentMono8x8PatternFillRect)(
+ ScrnInfoPtr pScrn,
+ int patx, int paty,
+ int x, int y, int w, int h
+ );
+
+ void (*SubsequentMono8x8PatternFillTrap)(
+ ScrnInfoPtr pScrn,
+ int patx, int paty,
+ int y, int h,
+ int left, int dxL, int dyL, int eL,
+ int right, int dxR, int dyR, int eR
+ );
+
+/* 8x8 color pattern fills */
+
+ void (*SetupForColor8x8PatternFill)(
+ ScrnInfoPtr pScrn,
+ int patx, int paty,
+ int rop,
+ unsigned int planemask,
+ int transparency_color
+ );
+ int Color8x8PatternFillFlags;
+
+ void (*SubsequentColor8x8PatternFillRect)(
+ ScrnInfoPtr pScrn,
+ int patx, int paty,
+ int x, int y, int w, int h
+ );
+
+ void (*SubsequentColor8x8PatternFillTrap)(
+ ScrnInfoPtr pScrn,
+ int patx, int paty,
+ int y, int h,
+ int left, int dxL, int dyL, int eL,
+ int right, int dxR, int dyR, int eR
+ );
+
+
+/* Color expansion */
+
+ void (*SetupForCPUToScreenColorExpandFill)(
+ ScrnInfoPtr pScrn,
+ int fg, int bg,
+ int rop,
+ unsigned int planemask
+ );
+ int CPUToScreenColorExpandFillFlags;
+
+ void (*SubsequentCPUToScreenColorExpandFill)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h,
+ int skipleft
+ );
+
+ unsigned char *ColorExpandBase;
+ int ColorExpandRange;
+
+
+/* Scanline color expansion */
+
+ void (*SetupForScanlineCPUToScreenColorExpandFill)(
+ ScrnInfoPtr pScrn,
+ int fg, int bg,
+ int rop,
+ unsigned int planemask
+ );
+ int ScanlineCPUToScreenColorExpandFillFlags;
+
+ void (*SubsequentScanlineCPUToScreenColorExpandFill)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h,
+ int skipleft
+ );
+
+ void (*SubsequentColorExpandScanline)(
+ ScrnInfoPtr pScrn,
+ int bufno
+ );
+
+ int NumScanlineColorExpandBuffers;
+ unsigned char **ScanlineColorExpandBuffers;
+
+/* Screen to screen color expansion */
+
+ void (*SetupForScreenToScreenColorExpandFill) (
+ ScrnInfoPtr pScrn,
+ int fg, int bg,
+ int rop,
+ unsigned int planemask
+ );
+ int ScreenToScreenColorExpandFillFlags;
+
+ void (*SubsequentScreenToScreenColorExpandFill)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h,
+ int srcx, int srcy, int skipleft
+ );
+
+
+/* Image transfers */
+
+ void (*SetupForImageWrite)(
+ ScrnInfoPtr pScrn,
+ int rop,
+ unsigned int planemask,
+ int transparency_color,
+ int bpp, int depth
+ );
+ int ImageWriteFlags;
+
+ void (*SubsequentImageWriteRect)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h,
+ int skipleft
+ );
+ unsigned char *ImageWriteBase;
+ int ImageWriteRange;
+
+/* Scanline Image transfers */
+
+ void (*SetupForScanlineImageWrite)(
+ ScrnInfoPtr pScrn,
+ int rop,
+ unsigned int planemask,
+ int transparency_color,
+ int bpp, int depth
+ );
+ int ScanlineImageWriteFlags;
+
+ void (*SubsequentScanlineImageWriteRect)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h,
+ int skipleft
+ );
+
+ void (*SubsequentImageWriteScanline) (
+ ScrnInfoPtr pScrn,
+ int bufno
+ );
+
+ int NumScanlineImageWriteBuffers;
+ unsigned char **ScanlineImageWriteBuffers;
+
+ /* Image Reads - OBSOLETE AND NOT USED */
+
+ void (*SetupForImageRead) (
+ ScrnInfoPtr pScrn,
+ int bpp, int depth
+ );
+ int ImageReadFlags;
+
+ unsigned char *ImageReadBase;
+ int ImageReadRange;
+
+ void (*SubsequentImageReadRect)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h
+ );
+
+
+ /***************** Mid Level *****************/
+ void (*ScreenToScreenBitBlt)(
+ ScrnInfoPtr pScrn,
+ int nbox,
+ DDXPointPtr pptSrc,
+ BoxPtr pbox,
+ int xdir, int ydir,
+ int alu,
+ unsigned int planmask
+ );
+ int ScreenToScreenBitBltFlags;
+
+ void (*WriteBitmap) (
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h,
+ unsigned char *src,
+ int srcwidth,
+ int skipleft,
+ int fg, int bg,
+ int rop,
+ unsigned int planemask
+ );
+ int WriteBitmapFlags;
+
+ void (*FillSolidRects)(
+ ScrnInfoPtr pScrn,
+ int fg, int rop,
+ unsigned int planemask,
+ int nBox,
+ BoxPtr pBox
+ );
+ int FillSolidRectsFlags;
+
+ void (*FillMono8x8PatternRects)(
+ ScrnInfoPtr pScrn,
+ int fg, int bg, int rop,
+ unsigned int planemask,
+ int nBox,
+ BoxPtr pBox,
+ int pat0, int pat1,
+ int xorg, int yorg
+ );
+ int FillMono8x8PatternRectsFlags;
+
+ void (*FillColor8x8PatternRects)(
+ ScrnInfoPtr pScrn,
+ int rop,
+ unsigned int planemask,
+ int nBox,
+ BoxPtr pBox,
+ int xorg, int yorg,
+ XAACacheInfoPtr pCache
+ );
+ int FillColor8x8PatternRectsFlags;
+
+ void (*FillCacheBltRects)(
+ ScrnInfoPtr pScrn,
+ int rop,
+ unsigned int planemask,
+ int nBox,
+ BoxPtr pBox,
+ int xorg, int yorg,
+ XAACacheInfoPtr pCache
+ );
+ int FillCacheBltRectsFlags;
+
+ void (*FillColorExpandRects)(
+ ScrnInfoPtr pScrn,
+ int fg, int bg, int rop,
+ unsigned int planemask,
+ int nBox,
+ BoxPtr pBox,
+ int xorg, int yorg,
+ PixmapPtr pPix
+ );
+ int FillColorExpandRectsFlags;
+
+ void (*FillCacheExpandRects)(
+ ScrnInfoPtr pScrn,
+ int fg, int bg, int rop,
+ unsigned int planemask,
+ int nBox,
+ BoxPtr pBox,
+ int xorg, int yorg,
+ PixmapPtr pPix
+ );
+ int FillCacheExpandRectsFlags;
+
+ void (*FillImageWriteRects)(
+ ScrnInfoPtr pScrn,
+ int rop,
+ unsigned int planemask,
+ int nBox,
+ BoxPtr pBox,
+ int xorg, int yorg,
+ PixmapPtr pPix
+ );
+ int FillImageWriteRectsFlags;
+
+
+ void (*FillSolidSpans)(
+ ScrnInfoPtr pScrn,
+ int fg, int rop,
+ unsigned int planemask,
+ int n,
+ DDXPointPtr points,
+ int *widths,
+ int fSorted
+ );
+ int FillSolidSpansFlags;
+
+ void (*FillMono8x8PatternSpans)(
+ ScrnInfoPtr pScrn,
+ int fg, int bg, int rop,
+ unsigned int planemask,
+ int n,
+ DDXPointPtr points,
+ int *widths,
+ int fSorted,
+ int pat0, int pat1,
+ int xorg, int yorg
+ );
+ int FillMono8x8PatternSpansFlags;
+
+ void (*FillColor8x8PatternSpans)(
+ ScrnInfoPtr pScrn,
+ int rop,
+ unsigned int planemask,
+ int n,
+ DDXPointPtr points,
+ int *widths,
+ int fSorted,
+ XAACacheInfoPtr pCache,
+ int xorg, int yorg
+ );
+ int FillColor8x8PatternSpansFlags;
+
+ void (*FillCacheBltSpans)(
+ ScrnInfoPtr pScrn,
+ int rop,
+ unsigned int planemask,
+ int n,
+ DDXPointPtr points,
+ int *widths,
+ int fSorted,
+ XAACacheInfoPtr pCache,
+ int xorg, int yorg
+ );
+ int FillCacheBltSpansFlags;
+
+ void (*FillColorExpandSpans)(
+ ScrnInfoPtr pScrn,
+ int fg, int bg, int rop,
+ unsigned int planemask,
+ int n,
+ DDXPointPtr points,
+ int *widths,
+ int fSorted,
+ int xorg, int yorg,
+ PixmapPtr pPix
+ );
+ int FillColorExpandSpansFlags;
+
+ void (*FillCacheExpandSpans)(
+ ScrnInfoPtr pScrn,
+ int fg, int bg, int rop,
+ unsigned int planemask,
+ int n,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int fSorted,
+ int xorg, int yorg,
+ PixmapPtr pPix
+ );
+ int FillCacheExpandSpansFlags;
+
+ void (*TEGlyphRenderer)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h, int skipleft, int startline,
+ unsigned int **glyphs, int glyphWidth,
+ int fg, int bg, int rop, unsigned planemask
+ );
+ int TEGlyphRendererFlags;
+
+ void (*NonTEGlyphRenderer)(
+ ScrnInfoPtr pScrn,
+ int x, int y, int n,
+ NonTEGlyphPtr glyphs,
+ BoxPtr pbox,
+ int fg, int rop,
+ unsigned int planemask
+ );
+ int NonTEGlyphRendererFlags;
+
+ void (*WritePixmap) (
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h,
+ unsigned char *src,
+ int srcwidth,
+ int rop,
+ unsigned int planemask,
+ int transparency_color,
+ int bpp, int depth
+ );
+ int WritePixmapFlags;
+
+ void (*ReadPixmap) (
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h,
+ unsigned char *dst,
+ int dstwidth,
+ int bpp, int depth
+ );
+ int ReadPixmapFlags;
+
+ /***************** GC Level *****************/
+ RegionPtr (*CopyArea)(
+ DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GC *pGC,
+ int srcx, int srcy,
+ int width, int height,
+ int dstx, int dsty
+ );
+ int CopyAreaFlags;
+
+ RegionPtr (*CopyPlane)(
+ DrawablePtr pSrc,
+ DrawablePtr pDst,
+ GCPtr pGC,
+ int srcx, int srcy,
+ int width, int height,
+ int dstx, int dsty,
+ unsigned long bitPlane
+ );
+ int CopyPlaneFlags;
+
+ void (*PushPixelsSolid) (
+ GCPtr pGC,
+ PixmapPtr pBitMap,
+ DrawablePtr pDrawable,
+ int dx, int dy,
+ int xOrg, int yOrg
+ );
+ int PushPixelsFlags;
+
+ /** PolyFillRect **/
+
+ void (*PolyFillRectSolid)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nrectFill,
+ xRectangle *prectInit
+ );
+ int PolyFillRectSolidFlags;
+
+ void (*PolyFillRectStippled)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nrectFill,
+ xRectangle *prectInit
+ );
+ int PolyFillRectStippledFlags;
+
+ void (*PolyFillRectOpaqueStippled)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nrectFill,
+ xRectangle *prectInit
+ );
+ int PolyFillRectOpaqueStippledFlags;
+
+ void (*PolyFillRectTiled)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nrectFill,
+ xRectangle *prectInit
+ );
+ int PolyFillRectTiledFlags;
+
+ /** FillSpans **/
+
+ void (*FillSpansSolid)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nInit,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int fSorted
+ );
+ int FillSpansSolidFlags;
+
+ void (*FillSpansStippled)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nInit,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int fSorted
+ );
+ int FillSpansStippledFlags;
+
+ void (*FillSpansOpaqueStippled)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nInit,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int fSorted
+ );
+ int FillSpansOpaqueStippledFlags;
+
+ void (*FillSpansTiled)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nInit,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int fSorted
+ );
+ int FillSpansTiledFlags;
+
+ int (*PolyText8TE) (
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x, int y,
+ int count,
+ char *chars
+ );
+ int PolyText8TEFlags;
+
+ int (*PolyText16TE) (
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x, int y,
+ int count,
+ unsigned short *chars
+ );
+ int PolyText16TEFlags;
+
+ void (*ImageText8TE) (
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x, int y,
+ int count,
+ char *chars
+ );
+ int ImageText8TEFlags;
+
+ void (*ImageText16TE) (
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x, int y,
+ int count,
+ unsigned short *chars
+ );
+ int ImageText16TEFlags;
+
+ void (*ImageGlyphBltTE) (
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int xInit, int yInit,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ pointer pglyphBase
+ );
+ int ImageGlyphBltTEFlags;
+
+ void (*PolyGlyphBltTE) (
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int xInit, int yInit,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ pointer pglyphBase
+ );
+ int PolyGlyphBltTEFlags;
+
+ int (*PolyText8NonTE) (
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x, int y,
+ int count,
+ char *chars
+ );
+ int PolyText8NonTEFlags;
+
+ int (*PolyText16NonTE) (
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x, int y,
+ int count,
+ unsigned short *chars
+ );
+ int PolyText16NonTEFlags;
+
+ void (*ImageText8NonTE) (
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x, int y,
+ int count,
+ char *chars
+ );
+ int ImageText8NonTEFlags;
+
+ void (*ImageText16NonTE) (
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x, int y,
+ int count,
+ unsigned short *chars
+ );
+ int ImageText16NonTEFlags;
+
+ void (*ImageGlyphBltNonTE) (
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int xInit, int yInit,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ pointer pglyphBase
+ );
+ int ImageGlyphBltNonTEFlags;
+
+ void (*PolyGlyphBltNonTE) (
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int xInit, int yInit,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ pointer pglyphBase
+ );
+ int PolyGlyphBltNonTEFlags;
+
+ void (*PolyRectangleThinSolid)(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nRectsInit,
+ xRectangle *pRectsInit
+ );
+ int PolyRectangleThinSolidFlags;
+
+ void (*PolylinesWideSolid)(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr pPts
+ );
+ int PolylinesWideSolidFlags;
+
+ void (*PolylinesThinSolid)(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr pPts
+ );
+ int PolylinesThinSolidFlags;
+
+ void (*PolySegmentThinSolid)(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pSeg
+ );
+ int PolySegmentThinSolidFlags;
+
+ void (*PolylinesThinDashed)(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr pPts
+ );
+ int PolylinesThinDashedFlags;
+
+ void (*PolySegmentThinDashed)(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pSeg
+ );
+ int PolySegmentThinDashedFlags;
+
+ void (*FillPolygonSolid)(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int shape,
+ int mode,
+ int count,
+ DDXPointPtr ptsIn
+ );
+ int FillPolygonSolidFlags;
+
+ void (*FillPolygonStippled)(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int shape,
+ int mode,
+ int count,
+ DDXPointPtr ptsIn
+ );
+ int FillPolygonStippledFlags;
+
+ void (*FillPolygonOpaqueStippled)(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int shape,
+ int mode,
+ int count,
+ DDXPointPtr ptsIn
+ );
+ int FillPolygonOpaqueStippledFlags;
+
+ void (*FillPolygonTiled)(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int shape,
+ int mode,
+ int count,
+ DDXPointPtr ptsIn
+ );
+ int FillPolygonTiledFlags;
+
+ void (*PolyFillArcSolid)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int narcs,
+ xArc *parcs
+ );
+ int PolyFillArcSolidFlags;
+
+ void (*PutImage)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int depth,
+ int x,
+ int y,
+ int w,
+ int h,
+ int leftPad,
+ int format,
+ char *pImage
+ );
+ int PutImageFlags;
+
+ /* Validation masks */
+
+ unsigned long FillSpansMask;
+ ValidateGCProcPtr ValidateFillSpans;
+ unsigned long SetSpansMask;
+ ValidateGCProcPtr ValidateSetSpans;
+ unsigned long PutImageMask;
+ ValidateGCProcPtr ValidatePutImage;
+ unsigned long CopyAreaMask;
+ ValidateGCProcPtr ValidateCopyArea;
+ unsigned long CopyPlaneMask;
+ ValidateGCProcPtr ValidateCopyPlane;
+ unsigned long PolyPointMask;
+ ValidateGCProcPtr ValidatePolyPoint;
+ unsigned long PolylinesMask;
+ ValidateGCProcPtr ValidatePolylines;
+ unsigned long PolySegmentMask;
+ ValidateGCProcPtr ValidatePolySegment;
+ unsigned long PolyRectangleMask;
+ ValidateGCProcPtr ValidatePolyRectangle;
+ unsigned long PolyArcMask;
+ ValidateGCProcPtr ValidatePolyArc;
+ unsigned long FillPolygonMask;
+ ValidateGCProcPtr ValidateFillPolygon;
+ unsigned long PolyFillRectMask;
+ ValidateGCProcPtr ValidatePolyFillRect;
+ unsigned long PolyFillArcMask;
+ ValidateGCProcPtr ValidatePolyFillArc;
+ unsigned long PolyText8Mask;
+ ValidateGCProcPtr ValidatePolyText8;
+ unsigned long PolyText16Mask;
+ ValidateGCProcPtr ValidatePolyText16;
+ unsigned long ImageText8Mask;
+ ValidateGCProcPtr ValidateImageText8;
+ unsigned long ImageText16Mask;
+ ValidateGCProcPtr ValidateImageText16;
+ unsigned long PolyGlyphBltMask;
+ ValidateGCProcPtr ValidatePolyGlyphBlt;
+ unsigned long ImageGlyphBltMask;
+ ValidateGCProcPtr ValidateImageGlyphBlt;
+ unsigned long PushPixelsMask;
+ ValidateGCProcPtr ValidatePushPixels;
+
+ void (*ComputeDash)(GCPtr pGC);
+
+ /* Pixmap Cache */
+
+ int PixmapCacheFlags;
+ Bool UsingPixmapCache;
+ Bool CanDoMono8x8;
+ Bool CanDoColor8x8;
+
+ void (*InitPixmapCache)(
+ ScreenPtr pScreen,
+ RegionPtr areas,
+ pointer data
+ );
+ void (*ClosePixmapCache)(
+ ScreenPtr pScreen
+ );
+
+ int (*StippledFillChooser)(GCPtr pGC);
+ int (*OpaqueStippledFillChooser)(GCPtr pGC);
+ int (*TiledFillChooser)(GCPtr pGC);
+
+ int CachePixelGranularity;
+ int MaxCacheableTileWidth;
+ int MaxCacheableTileHeight;
+ int MaxCacheableStippleWidth;
+ int MaxCacheableStippleHeight;
+
+ XAACacheInfoPtr (*CacheTile)(
+ ScrnInfoPtr Scrn, PixmapPtr pPix
+ );
+ XAACacheInfoPtr (*CacheStipple)(
+ ScrnInfoPtr Scrn, PixmapPtr pPix,
+ int fg, int bg
+ );
+ XAACacheInfoPtr (*CacheMonoStipple)(
+ ScrnInfoPtr Scrn, PixmapPtr pPix
+ );
+ XAACacheInfoPtr (*CacheMono8x8Pattern)(
+ ScrnInfoPtr Scrn, int pat0, int pat1
+ );
+ XAACacheInfoPtr (*CacheColor8x8Pattern)(
+ ScrnInfoPtr Scrn, PixmapPtr pPix,
+ int fg, int bg
+ );
+
+
+ int MonoPatternPitch;
+ int CacheWidthMono8x8Pattern;
+ int CacheHeightMono8x8Pattern;
+
+ int ColorPatternPitch;
+ int CacheWidthColor8x8Pattern;
+ int CacheHeightColor8x8Pattern;
+
+ int CacheColorExpandDensity;
+
+ void (*WriteBitmapToCache) (
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h,
+ unsigned char *src,
+ int srcwidth,
+ int fg, int bg
+ );
+ void (*WritePixmapToCache) (
+ ScrnInfoPtr pScrn,
+ int x, int y, int w, int h,
+ unsigned char *src,
+ int srcwidth,
+ int bpp, int depth
+ );
+ void (*WriteMono8x8PatternToCache)(
+ ScrnInfoPtr pScrn,
+ XAACacheInfoPtr pCache
+ );
+ void (*WriteColor8x8PatternToCache)(
+ ScrnInfoPtr pScrn,
+ PixmapPtr pPix,
+ XAACacheInfoPtr pCache
+ );
+
+ char* PixmapCachePrivate;
+
+ /* Miscellaneous */
+
+ GC ScratchGC;
+ int PreAllocSize;
+ unsigned char *PreAllocMem;
+
+ CharInfoPtr CharInfo[255];
+ NonTEGlyphInfo GlyphInfo[255];
+
+ unsigned int FullPlanemask; /* deprecated */
+
+ PixmapLinkPtr OffscreenPixmaps;
+ int maxOffPixWidth;
+ int maxOffPixHeight;
+
+ XAACacheInfoRec ScratchCacheInfoRec;
+
+ BoxPtr ClipBox;
+
+ Bool NeedToSync;
+
+ char *dgaSaves;
+
+ /* These can be supplied to override the defaults */
+
+ GetImageProcPtr GetImage;
+ GetSpansProcPtr GetSpans;
+ CopyWindowProcPtr CopyWindow;
+
+ unsigned int offscreenDepths;
+ Bool offscreenDepthsInitialized;
+
+ CARD32 FullPlanemasks[32];
+
+ Bool (*Composite) (
+ CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pMask,
+ PicturePtr pDst,
+ INT16 xSrc,
+ INT16 ySrc,
+ INT16 xMask,
+ INT16 yMask,
+ INT16 xDst,
+ INT16 yDst,
+ CARD16 width,
+ CARD16 height
+ );
+
+ Bool (*Glyphs) (
+ CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc,
+ int nlist,
+ GlyphListPtr list,
+ GlyphPtr *glyphs
+ );
+
+ /* The old SetupForCPUToScreenAlphaTexture function is no longer used because
+ * it doesn't pass in enough information to write a conforming
+ * implementation. See SetupForCPUToScreenAlphaTexture2.
+ */
+ Bool (*SetupForCPUToScreenAlphaTexture) (
+ ScrnInfoPtr pScrn,
+ int op,
+ CARD16 red,
+ CARD16 green,
+ CARD16 blue,
+ CARD16 alpha,
+ int alphaType,
+ CARD8 *alphaPtr,
+ int alphaPitch,
+ int width,
+ int height,
+ int flags
+ );
+ void (*SubsequentCPUToScreenAlphaTexture) (
+ ScrnInfoPtr pScrn,
+ int dstx,
+ int dsty,
+ int srcx,
+ int srcy,
+ int width,
+ int height
+ );
+ int CPUToScreenAlphaTextureFlags;
+ CARD32 * CPUToScreenAlphaTextureFormats;
+
+ /* The old SetupForCPUToScreenTexture function is no longer used because
+ * it doesn't pass in enough information to write a conforming
+ * implementation. See SetupForCPUToScreenTexture2.
+ */
+ Bool (*SetupForCPUToScreenTexture) (
+ ScrnInfoPtr pScrn,
+ int op,
+ int texType,
+ CARD8 *texPtr,
+ int texPitch,
+ int width,
+ int height,
+ int flags
+ );
+ void (*SubsequentCPUToScreenTexture) (
+ ScrnInfoPtr pScrn,
+ int dstx,
+ int dsty,
+ int srcx,
+ int srcy,
+ int width,
+ int height
+ );
+ int CPUToScreenTextureFlags;
+ CARD32 * CPUToScreenTextureFormats;
+
+
+ /* these were added for 4.3.0 */
+ BoxRec SolidLineLimits;
+ BoxRec DashedLineLimits;
+
+ /* These were added for X.Org 6.8.0 */
+ Bool (*SetupForCPUToScreenAlphaTexture2) (
+ ScrnInfoPtr pScrn,
+ int op,
+ CARD16 red,
+ CARD16 green,
+ CARD16 blue,
+ CARD16 alpha,
+ CARD32 maskFormat,
+ CARD32 dstFormat,
+ CARD8 *alphaPtr,
+ int alphaPitch,
+ int width,
+ int height,
+ int flags
+ );
+ CARD32 *CPUToScreenAlphaTextureDstFormats;
+
+ Bool (*SetupForCPUToScreenTexture2) (
+ ScrnInfoPtr pScrn,
+ int op,
+ CARD32 srcFormat,
+ CARD32 dstFormat,
+ CARD8 *texPtr,
+ int texPitch,
+ int width,
+ int height,
+ int flags
+ );
+ CARD32 *CPUToScreenTextureDstFormats;
+} XAAInfoRec, *XAAInfoRecPtr;
+
+#define SET_SYNC_FLAG(infoRec) (infoRec)->NeedToSync = TRUE
+
+
+extern _X_EXPORT Bool
+XAAInit(
+ ScreenPtr pScreen,
+ XAAInfoRecPtr infoRec
+);
+
+extern _X_EXPORT XAAInfoRecPtr XAACreateInfoRec(void);
+
+extern _X_EXPORT void
+XAADestroyInfoRec(
+ XAAInfoRecPtr infoRec
+);
+
+typedef void (*DepthChangeFuncPtr) (ScrnInfoPtr pScrn, int depth);
+
+extern _X_EXPORT Bool
+XAAInitDualFramebufferOverlay(
+ ScreenPtr pScreen,
+ DepthChangeFuncPtr callback
+);
+
+#endif /* _XAA_H */
diff --git a/xorg-server/hw/xfree86/xf8_16bpp/Makefile.am b/xorg-server/hw/xfree86/xf8_16bpp/Makefile.am
deleted file mode 100644
index 3c5b8c93d..000000000
--- a/xorg-server/hw/xfree86/xf8_16bpp/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-module_LTLIBRARIES = libxf8_16bpp.la
-
-sdk_HEADERS = cfb8_16.h
-
-INCLUDES = $(XORG_INCS) -I$(top_srcdir)/fb
-
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
-
-libxf8_16bpp_la_LDFLAGS = -avoid-version
-
-libxf8_16bpp_la_SOURCES = xf8_16module.c
diff --git a/xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h b/xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h
deleted file mode 100644
index b6ab955f3..000000000
--- a/xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2006 Adam Jackson.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _CFB8_16_H
-#define _CFB8_16_H
-
-#include "regionstr.h"
-#include "windowstr.h"
-
-/* this has to stay misnamed for ABI reasons */
-
-extern _X_EXPORT Bool
-cfb8_16ScreenInit(ScreenPtr pScreen, pointer pbits16, pointer pbits8,
- int xsize, int ysize, int dpix, int dpiy,
- int width16, int width8);
-
-#endif /* _CFB8_16_H */
diff --git a/xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c b/xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c
deleted file mode 100644
index 6a4529ae8..000000000
--- a/xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2006 Adam Jackson.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xmd.h>
-#include "misc.h"
-#include "servermd.h"
-#include "scrnintstr.h"
-#include "resource.h"
-#include "fb.h"
-#include "fboverlay.h"
-#include "cfb8_16.h"
-
-Bool
-cfb8_16ScreenInit(ScreenPtr pScreen, pointer pbits16, pointer pbits8,
- int xsize, int ysize, int dpix, int dpiy,
- int width16, int width8)
-{
- return
- (fbOverlaySetupScreen(pScreen, pbits16, pbits8, xsize, ysize,
- dpix, dpiy, width16, width8, 16, 8) &&
- fbOverlayFinishScreenInit(pScreen, pbits16, pbits8, xsize, ysize,
- dpix, dpiy, width16, width8, 16, 8, 16, 8));
-}
-
-#include "xf86Module.h"
-
-static MODULESETUPPROTO(xf8_16bppSetup);
-
-static XF86ModuleVersionInfo VersRec = {
- "xf8_16bpp",
- MODULEVENDORSTRING,
- MODINFOSTRING1,
- MODINFOSTRING2,
- XORG_VERSION_CURRENT,
- 2, 0, 0,
- ABI_CLASS_ANSIC, /* Only need the ansic layer */
- ABI_ANSIC_VERSION,
- NULL,
- {0,0,0,0} /* signature, to be patched into the file by a tool */
-};
-
-_X_EXPORT XF86ModuleData xf8_16bppModuleData = {
- &VersRec,
- xf8_16bppSetup,
- NULL
-};
-
-static pointer
-xf8_16bppSetup(pointer module, pointer opts, int *errmaj, int *errmin)
-{
- return (pointer)LoadSubModule(module, "fb", NULL, NULL, NULL, NULL,
- errmaj, errmin);
-}