Update to xf86-video-geode 2.11.9.
A bunch of bug fixes and performance improvements. Tested on Alix 3c3.
This commit is contained in:
parent
654eabe550
commit
419d03f9a0
@ -1,23 +1,30 @@
|
||||
Copyright (c) 2005 Advanced Micro Devices, Inc.
|
||||
Copyright (C) 2003-2008 Advanced Micro Devices, Inc.
|
||||
Copyright (C) 2007 George Sapountzis
|
||||
Copyright (C) 2002 David Dawes
|
||||
Copyright (C) 2001 VA Linux Systems Inc., Fremont, California.
|
||||
|
||||
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 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.
|
||||
LICENSE:
|
||||
|
||||
Neither the name of the Advanced Micro Devices, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
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 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.
|
||||
|
||||
ADDITIONAL AMD CLAUSE:
|
||||
|
||||
Neither the name of the Advanced Micro Devices, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
@ -57,7 +57,7 @@ build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/configure COPYING ChangeLog INSTALL TODO \
|
||||
$(top_srcdir)/configure COPYING ChangeLog INSTALL NEWS TODO \
|
||||
config.guess config.sub depcomp install-sh ltmain.sh missing
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
@ -158,6 +158,7 @@ MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN_SUBSTS = @MAN_SUBSTS@
|
||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
||||
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
|
||||
NMEDIT = @NMEDIT@
|
||||
@ -182,6 +183,7 @@ XEXT_CFLAGS = @XEXT_CFLAGS@
|
||||
XEXT_LIBS = @XEXT_LIBS@
|
||||
XORG_CFLAGS = @XORG_CFLAGS@
|
||||
XORG_LIBS = @XORG_LIBS@
|
||||
XORG_MAN_PAGE = @XORG_MAN_PAGE@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
|
23
driver/xf86-video-geode/NEWS
Normal file
23
driver/xf86-video-geode/NEWS
Normal file
@ -0,0 +1,23 @@
|
||||
Geode 2.11.9 (2010-08-23)
|
||||
=========================
|
||||
We are pleased to announce this maintenance release of xf86-video-geode.
|
||||
It features a plethora of bug fixes, a few documentation updates and one
|
||||
performance enhancement.
|
||||
|
||||
This release also marks the return of AMD to the development team.
|
||||
|
||||
Noticeable changes compared to 2.11.8
|
||||
-------------------------------------
|
||||
* Fixes all known rendering bugs, most notably those pertaining to the
|
||||
GNOME and KDE desktop environments, to video player applications and
|
||||
to the Chrome and Firefox browsers.
|
||||
|
||||
* Dramatically improves the performance:
|
||||
Before After
|
||||
-aa10text 4660/sec 53300/sec
|
||||
-aa24text 2740/sec 16200/sec
|
||||
|
||||
* Validates resolutions rather than resorts to virtual screen sizes.
|
||||
Adds a new screen resolution at 106.50MHz to those we know about.
|
||||
|
||||
* Clarifies the copyrights of each file and updates COPYING to match.
|
@ -66,6 +66,13 @@ because it utilizes the new common DDC probing libraries from X.Org.
|
||||
|
||||
= FAQ =
|
||||
|
||||
Q: Why doesn't screen rotation work?
|
||||
|
||||
A: Make sure that a sufficient amount of video RAM is reserved in the BIOS,
|
||||
otherwise rotation will fail and this error message appear in Xorg.log:
|
||||
Couldn't allocate the shadow memory for rotation
|
||||
You need XX bytes, but only YY bytes are available
|
||||
|
||||
Q: Why doesn't this GEODE driver work at WXGA (wide screen) resolutions?
|
||||
|
||||
A: Make sure that TFT Panel support is disabled in the BIOS settings,
|
||||
@ -110,27 +117,24 @@ EndSection
|
||||
|
||||
The following options may be added to the section:
|
||||
|
||||
== GX ==
|
||||
== Common options ==
|
||||
|
||||
SWCursor: Enable software cursors (essentially disabling HW cursor support)
|
||||
NoCompression: Disable video bandwidth compression
|
||||
FBSize: Specify the size of the video space (in bytes)
|
||||
NoAccel: Disable hardware assisted acceleration
|
||||
AccelMethod: "XAA" (default) or "EXA"
|
||||
Rotate: Select a orientation to start with - LEFT, INVERT, CCW
|
||||
NoCompression: Disable video bandwidth compression
|
||||
NoPanel: Disable panel support
|
||||
Rotate: Select a orientation to start with - LEFT, INVERT, CCW
|
||||
SWCursor: Enable software cursors (essentially disabling HW cursor support)
|
||||
|
||||
== GX-specific options ==
|
||||
|
||||
AccelMethod: "XAA" (default) or "EXA"
|
||||
PanelGeometry: Specify the geometry of the attached panel ("<width>x<height>")
|
||||
OSMImageBuffers: Set the number of image buffers (XAA only)
|
||||
OSMColorExpBuffers: Set the number of color expansion buffers (XAA only)
|
||||
FBSize: Specify the size of the video space (in bytes)
|
||||
PanelGeometry: Specify the geometry of the attached panel ("<width>x<height>")
|
||||
|
||||
== LX ==
|
||||
== LX-specific options ==
|
||||
|
||||
SWCursor: Enable software cursors (essentially disabling HW cursor support)
|
||||
NoCompression: Disable video bandwidth compression
|
||||
NoAccel: Disable hardware assisted acceleration
|
||||
Rotate: Select a orientation to start with - LEFT, INVERT, CCW
|
||||
NoPanel: Disable panel support
|
||||
ExaScratch: Specify the amount of extra EXA scratch buffer (in bytes)
|
||||
FBSize: Specify the size of the video space (in bytes)
|
||||
|
||||
= EOF =
|
||||
|
365
driver/xf86-video-geode/aclocal.m4
vendored
365
driver/xf86-video-geode/aclocal.m4
vendored
@ -7654,7 +7654,7 @@ AC_SUBST([am__untar])
|
||||
|
||||
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
|
||||
dnl
|
||||
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
dnl
|
||||
dnl Permission is hereby granted, free of charge, to any person obtaining a
|
||||
dnl copy of this software and associated documentation files (the "Software"),
|
||||
@ -7691,7 +7691,7 @@ dnl DEALINGS IN THE SOFTWARE.
|
||||
# See the "minimum version" comment for each macro you use to see what
|
||||
# version you require.
|
||||
m4_defun([XORG_MACROS_VERSION],[
|
||||
m4_define([vers_have], [1.6.1])
|
||||
m4_define([vers_have], [1.11.0])
|
||||
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
|
||||
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||
m4_if(m4_cmp(maj_have, maj_needed), 0,,
|
||||
@ -7759,9 +7759,12 @@ AC_SUBST(RAWCPPFLAGS)
|
||||
# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
|
||||
# Not sure if there's any better way than just hardcoding by OS name.
|
||||
# Override default settings by setting environment variables
|
||||
# Added MAN_SUBSTS in version 1.8
|
||||
# Added AC_PROG_SED in version 1.8
|
||||
|
||||
AC_DEFUN([XORG_MANPAGE_SECTIONS],[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
|
||||
if test x$APP_MAN_SUFFIX = x ; then
|
||||
APP_MAN_SUFFIX=1
|
||||
@ -7830,8 +7833,60 @@ AC_SUBST([FILE_MAN_DIR])
|
||||
AC_SUBST([MISC_MAN_DIR])
|
||||
AC_SUBST([DRIVER_MAN_DIR])
|
||||
AC_SUBST([ADMIN_MAN_DIR])
|
||||
|
||||
XORG_MAN_PAGE="X Version 11"
|
||||
AC_SUBST([XORG_MAN_PAGE])
|
||||
MAN_SUBSTS="\
|
||||
-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
|
||||
-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
|
||||
-e 's|__xservername__|Xorg|g' \
|
||||
-e 's|__xconfigfile__|xorg.conf|g' \
|
||||
-e 's|__projectroot__|\$(prefix)|g' \
|
||||
-e 's|__apploaddir__|\$(appdefaultdir)|g' \
|
||||
-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
|
||||
-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
|
||||
-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
|
||||
-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
|
||||
-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
|
||||
-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
|
||||
AC_SUBST([MAN_SUBSTS])
|
||||
|
||||
]) # XORG_MANPAGE_SECTIONS
|
||||
|
||||
# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
|
||||
# ------------------------
|
||||
# Minimum version: 1.7.0
|
||||
#
|
||||
# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
|
||||
# provided by xorg-sgml-doctools, if installed.
|
||||
AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
|
||||
AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
|
||||
XORG_SGML_PATH=
|
||||
PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
|
||||
[XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
|
||||
[m4_ifval([$1],[:],
|
||||
[if test x"$cross_compiling" != x"yes" ; then
|
||||
AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
|
||||
[XORG_SGML_PATH=$prefix/share/sgml])
|
||||
fi])
|
||||
])
|
||||
|
||||
# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
|
||||
# the path and the name of the doc stylesheet
|
||||
if test "x$XORG_SGML_PATH" != "x" ; then
|
||||
AC_MSG_RESULT([$XORG_SGML_PATH])
|
||||
STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
|
||||
XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(XORG_SGML_PATH)
|
||||
AC_SUBST(STYLESHEET_SRCDIR)
|
||||
AC_SUBST(XSL_STYLESHEET)
|
||||
AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
|
||||
]) # XORG_CHECK_SGML_DOCTOOLS
|
||||
|
||||
# XORG_CHECK_LINUXDOC
|
||||
# -------------------
|
||||
# Minimum version: 1.0.0
|
||||
@ -7841,23 +7896,14 @@ AC_SUBST([ADMIN_MAN_DIR])
|
||||
# Whether or not the necessary tools and files are found can be checked
|
||||
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
|
||||
AC_DEFUN([XORG_CHECK_LINUXDOC],[
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
|
||||
if test x"$cross_compiling" = x"yes" ; then
|
||||
HAVE_DEFS_ENT=no
|
||||
else
|
||||
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
|
||||
fi
|
||||
AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
|
||||
AC_REQUIRE([XORG_WITH_PS2PDF])
|
||||
|
||||
AC_PATH_PROG(LINUXDOC, linuxdoc)
|
||||
AC_PATH_PROG(PS2PDF, ps2pdf)
|
||||
|
||||
AC_MSG_CHECKING([whether to build documentation])
|
||||
|
||||
if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
|
||||
if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
|
||||
BUILDDOC=yes
|
||||
else
|
||||
BUILDDOC=no
|
||||
@ -7869,7 +7915,7 @@ AC_MSG_RESULT([$BUILDDOC])
|
||||
|
||||
AC_MSG_CHECKING([whether to build pdf documentation])
|
||||
|
||||
if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
|
||||
if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
|
||||
BUILDPDFDOC=yes
|
||||
else
|
||||
BUILDPDFDOC=no
|
||||
@ -7879,7 +7925,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
|
||||
|
||||
AC_MSG_RESULT([$BUILDPDFDOC])
|
||||
|
||||
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
|
||||
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
|
||||
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
|
||||
MAKE_PDF="$PS2PDF"
|
||||
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
|
||||
@ -7899,24 +7945,20 @@ AC_SUBST(MAKE_HTML)
|
||||
# indicates whether the necessary tools and files are found and, if set,
|
||||
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
|
||||
AC_DEFUN([XORG_CHECK_DOCBOOK],[
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
|
||||
|
||||
BUILDTXTDOC=no
|
||||
BUILDPDFDOC=no
|
||||
BUILDPSDOC=no
|
||||
BUILDHTMLDOC=no
|
||||
|
||||
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
|
||||
|
||||
AC_PATH_PROG(DOCBOOKPS, docbook2ps)
|
||||
AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
|
||||
AC_PATH_PROG(DOCBOOKHTML, docbook2html)
|
||||
AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
|
||||
|
||||
AC_MSG_CHECKING([whether to build text documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
|
||||
if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
|
||||
test x$BUILD_TXTDOC != xno; then
|
||||
BUILDTXTDOC=yes
|
||||
fi
|
||||
@ -7924,7 +7966,7 @@ AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
|
||||
AC_MSG_RESULT([$BUILDTXTDOC])
|
||||
|
||||
AC_MSG_CHECKING([whether to build PDF documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
|
||||
if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
|
||||
test x$BUILD_PDFDOC != xno; then
|
||||
BUILDPDFDOC=yes
|
||||
fi
|
||||
@ -7932,7 +7974,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
|
||||
AC_MSG_RESULT([$BUILDPDFDOC])
|
||||
|
||||
AC_MSG_CHECKING([whether to build PostScript documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
|
||||
if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
|
||||
test x$BUILD_PSDOC != xno; then
|
||||
BUILDPSDOC=yes
|
||||
fi
|
||||
@ -7940,7 +7982,7 @@ AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
|
||||
AC_MSG_RESULT([$BUILDPSDOC])
|
||||
|
||||
AC_MSG_CHECKING([whether to build HTML documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
|
||||
if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
|
||||
test x$BUILD_HTMLDOC != xno; then
|
||||
BUILDHTMLDOC=yes
|
||||
fi
|
||||
@ -7958,15 +8000,17 @@ AC_SUBST(MAKE_PDF)
|
||||
AC_SUBST(MAKE_HTML)
|
||||
]) # XORG_CHECK_DOCBOOK
|
||||
|
||||
# XORG_WITH_XMLTO([MIN-VERSION])
|
||||
# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
|
||||
# ----------------
|
||||
# Minimum version: 1.5.0
|
||||
# Minimum version for optional DEFAULT argument: 1.11.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-xmlto option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the xmlto package.
|
||||
# as whether or not to use the xmlto package. When DEFAULT is not specified,
|
||||
# --with-xmlto assumes 'auto'.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_XMLTO: used in makefiles to conditionally generate documentation
|
||||
@ -7975,14 +8019,20 @@ AC_SUBST(MAKE_HTML)
|
||||
# --with-xmlto: 'yes' user instructs the module to use xmlto
|
||||
# 'no' user instructs the module not to use xmlto
|
||||
#
|
||||
# Added in version 1.10.0
|
||||
# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
|
||||
# xmlto for text output requires either lynx, links, or w3m browsers
|
||||
#
|
||||
# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_XMLTO],[
|
||||
AC_ARG_VAR([XMLTO], [Path to xmlto command])
|
||||
m4_define([_defopt], m4_default([$2], [auto]))
|
||||
AC_ARG_WITH(xmlto,
|
||||
AS_HELP_STRING([--with-xmlto],
|
||||
[Use xmlto to regenerate documentation (default: yes, if installed)]),
|
||||
[use_xmlto=$withval], [use_xmlto=auto])
|
||||
[Use xmlto to regenerate documentation (default: ]_defopt[)]),
|
||||
[use_xmlto=$withval], [use_xmlto=]_defopt)
|
||||
m4_undefine([_defopt])
|
||||
|
||||
if test "x$use_xmlto" = x"auto"; then
|
||||
AC_PATH_PROG([XMLTO], [xmlto])
|
||||
@ -8006,6 +8056,8 @@ elif test "x$use_xmlto" = x"no" ; then
|
||||
else
|
||||
AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
|
||||
fi
|
||||
|
||||
# Test for a minimum version of xmlto, if provided.
|
||||
m4_ifval([$1],
|
||||
[if test "$have_xmlto" = yes; then
|
||||
# scrape the xmlto version
|
||||
@ -8020,18 +8072,31 @@ m4_ifval([$1],
|
||||
AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
# Test for the ability of xmlto to generate a text target
|
||||
have_xmlto_text=no
|
||||
cat > conftest.xml << "EOF"
|
||||
EOF
|
||||
AS_IF([test "$have_xmlto" = yes],
|
||||
[AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
|
||||
[have_xmlto_text=yes],
|
||||
[AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
|
||||
rm -f conftest.xml
|
||||
AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
|
||||
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
|
||||
]) # XORG_WITH_XMLTO
|
||||
|
||||
# XORG_WITH_ASCIIDOC([MIN-VERSION])
|
||||
# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
|
||||
# ----------------
|
||||
# Minimum version: 1.5.0
|
||||
# Minimum version for optional DEFAULT argument: 1.11.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-asciidoc option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the asciidoc package.
|
||||
# as whether or not to use the asciidoc package. When DEFAULT is not specified,
|
||||
# --with-asciidoc assumes 'auto'.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
|
||||
@ -8044,10 +8109,12 @@ AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_ASCIIDOC],[
|
||||
AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
|
||||
m4_define([_defopt], m4_default([$2], [auto]))
|
||||
AC_ARG_WITH(asciidoc,
|
||||
AS_HELP_STRING([--with-asciidoc],
|
||||
[Use asciidoc to regenerate documentation (default: yes, if installed)]),
|
||||
[use_asciidoc=$withval], [use_asciidoc=auto])
|
||||
[Use asciidoc to regenerate documentation (default: ]_defopt[)]),
|
||||
[use_asciidoc=$withval], [use_asciidoc=]_defopt)
|
||||
m4_undefine([_defopt])
|
||||
|
||||
if test "x$use_asciidoc" = x"auto"; then
|
||||
AC_PATH_PROG([ASCIIDOC], [asciidoc])
|
||||
@ -8088,15 +8155,17 @@ fi])
|
||||
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
|
||||
]) # XORG_WITH_ASCIIDOC
|
||||
|
||||
# XORG_WITH_DOXYGEN([MIN-VERSION])
|
||||
# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
|
||||
# --------------------------------
|
||||
# Minimum version: 1.5.0
|
||||
# Minimum version for optional DEFAULT argument: 1.11.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-doxygen option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the doxygen package.
|
||||
# as whether or not to use the doxygen package. When DEFAULT is not specified,
|
||||
# --with-doxygen assumes 'auto'.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
|
||||
@ -8109,10 +8178,12 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_DOXYGEN],[
|
||||
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
|
||||
m4_define([_defopt], m4_default([$2], [auto]))
|
||||
AC_ARG_WITH(doxygen,
|
||||
AS_HELP_STRING([--with-doxygen],
|
||||
[Use doxygen to regenerate documentation (default: yes, if installed)]),
|
||||
[use_doxygen=$withval], [use_doxygen=auto])
|
||||
[Use doxygen to regenerate documentation (default: ]_defopt[)]),
|
||||
[use_doxygen=$withval], [use_doxygen=]_defopt)
|
||||
m4_undefine([_defopt])
|
||||
|
||||
if test "x$use_doxygen" = x"auto"; then
|
||||
AC_PATH_PROG([DOXYGEN], [doxygen])
|
||||
@ -8153,15 +8224,17 @@ fi])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
|
||||
]) # XORG_WITH_DOXYGEN
|
||||
|
||||
# XORG_WITH_GROFF
|
||||
# XORG_WITH_GROFF([DEFAULT])
|
||||
# ----------------
|
||||
# Minimum version: 1.6.0
|
||||
# Minimum version for optional DEFAULT argument: 1.11.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-groff option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the groff package.
|
||||
# as whether or not to use the groff package. When DEFAULT is not specified,
|
||||
# --with-groff assumes 'auto'.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_GROFF: used in makefiles to conditionally generate documentation
|
||||
@ -8172,6 +8245,12 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
|
||||
# --with-groff: 'yes' user instructs the module to use groff
|
||||
# 'no' user instructs the module not to use groff
|
||||
#
|
||||
# Added in version 1.9.0:
|
||||
# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
|
||||
# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
|
||||
# psselect from the psutils package.
|
||||
# the ghostcript package. Refer to the grohtml man pages
|
||||
#
|
||||
# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
|
||||
#
|
||||
# OS and distros often splits groff in a basic and full package, the former
|
||||
@ -8184,10 +8263,12 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_GROFF],[
|
||||
AC_ARG_VAR([GROFF], [Path to groff command])
|
||||
m4_define([_defopt], m4_default([$1], [auto]))
|
||||
AC_ARG_WITH(groff,
|
||||
AS_HELP_STRING([--with-groff],
|
||||
[Use groff to regenerate documentation (default: yes, if installed)]),
|
||||
[use_groff=$withval], [use_groff=auto])
|
||||
[Use groff to regenerate documentation (default: ]_defopt[)]),
|
||||
[use_groff=$withval], [use_groff=]_defopt)
|
||||
m4_undefine([_defopt])
|
||||
|
||||
if test "x$use_groff" = x"auto"; then
|
||||
AC_PATH_PROG([GROFF], [groff])
|
||||
@ -8211,6 +8292,7 @@ elif test "x$use_groff" = x"no" ; then
|
||||
else
|
||||
AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
|
||||
fi
|
||||
|
||||
# We have groff, test for the presence of the macro packages
|
||||
if test "x$have_groff" = x"yes"; then
|
||||
AC_MSG_CHECKING([for ${GROFF} -ms macros])
|
||||
@ -8228,20 +8310,38 @@ if test "x$have_groff" = x"yes"; then
|
||||
fi
|
||||
AC_MSG_RESULT([$groff_mm_works])
|
||||
fi
|
||||
|
||||
# We have groff, test for HTML dependencies, one command per package
|
||||
if test "x$have_groff" = x"yes"; then
|
||||
AC_PATH_PROGS(GS_PATH, [gs gswin32c])
|
||||
AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
|
||||
AC_PATH_PROG(PSSELECT_PATH, [psselect])
|
||||
if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
|
||||
have_groff_html=yes
|
||||
else
|
||||
have_groff_html=no
|
||||
AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set Automake conditionals for Makefiles
|
||||
AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
|
||||
AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
|
||||
AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
|
||||
AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
|
||||
]) # XORG_WITH_GROFF
|
||||
|
||||
# XORG_WITH_FOP
|
||||
# XORG_WITH_FOP([DEFAULT])
|
||||
# ----------------
|
||||
# Minimum version: 1.6.0
|
||||
# Minimum version for optional DEFAULT argument: 1.11.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-fop option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the fop package.
|
||||
# as whether or not to use the fop package. When DEFAULT is not specified,
|
||||
# --with-fop assumes 'auto'.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_FOP: used in makefiles to conditionally generate documentation
|
||||
@ -8254,10 +8354,12 @@ AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_FOP],[
|
||||
AC_ARG_VAR([FOP], [Path to fop command])
|
||||
m4_define([_defopt], m4_default([$1], [auto]))
|
||||
AC_ARG_WITH(fop,
|
||||
AS_HELP_STRING([--with-fop],
|
||||
[Use fop to regenerate documentation (default: yes, if installed)]),
|
||||
[use_fop=$withval], [use_fop=auto])
|
||||
[Use fop to regenerate documentation (default: ]_defopt[)]),
|
||||
[use_fop=$withval], [use_fop=]_defopt)
|
||||
m4_undefine([_defopt])
|
||||
|
||||
if test "x$use_fop" = x"auto"; then
|
||||
AC_PATH_PROG([FOP], [fop])
|
||||
@ -8284,15 +8386,17 @@ fi
|
||||
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
|
||||
]) # XORG_WITH_FOP
|
||||
|
||||
# XORG_WITH_PS2PDF
|
||||
# XORG_WITH_PS2PDF([DEFAULT])
|
||||
# ----------------
|
||||
# Minimum version: 1.6.0
|
||||
# Minimum version for optional DEFAULT argument: 1.11.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the ps2pdf package.
|
||||
# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
|
||||
# --with-ps2pdf assumes 'auto'.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_PS2PDF: used in makefiles to conditionally generate documentation
|
||||
@ -8305,10 +8409,12 @@ AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_PS2PDF],[
|
||||
AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
|
||||
m4_define([_defopt], m4_default([$1], [auto]))
|
||||
AC_ARG_WITH(ps2pdf,
|
||||
AS_HELP_STRING([--with-ps2pdf],
|
||||
[Use ps2pdf to regenerate documentation (default: yes, if installed)]),
|
||||
[use_ps2pdf=$withval], [use_ps2pdf=auto])
|
||||
[Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
|
||||
[use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
|
||||
m4_undefine([_defopt])
|
||||
|
||||
if test "x$use_ps2pdf" = x"auto"; then
|
||||
AC_PATH_PROG([PS2PDF], [ps2pdf])
|
||||
@ -8359,14 +8465,12 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
|
||||
# parm1: specify the default value, yes or no.
|
||||
#
|
||||
AC_DEFUN([XORG_ENABLE_DOCS],[
|
||||
default=$1
|
||||
if test "x$default" = x ; then
|
||||
default="yes"
|
||||
fi
|
||||
m4_define([default], m4_default([$1], [yes]))
|
||||
AC_ARG_ENABLE(docs,
|
||||
AS_HELP_STRING([--enable-docs],
|
||||
[Enable building the documentation (default: yes)]),
|
||||
[build_docs=$enableval], [build_docs=$default])
|
||||
[Enable building the documentation (default: ]default[)]),
|
||||
[build_docs=$enableval], [build_docs=]default)
|
||||
m4_undefine([default])
|
||||
AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
|
||||
AC_MSG_CHECKING([whether to build documentation])
|
||||
AC_MSG_RESULT([$build_docs])
|
||||
@ -8394,14 +8498,12 @@ AC_MSG_RESULT([$build_docs])
|
||||
# parm1: specify the default value, yes or no.
|
||||
#
|
||||
AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
|
||||
devel_default=$1
|
||||
if test "x$devel_default" = x ; then
|
||||
devel_default="yes"
|
||||
fi
|
||||
m4_define([devel_default], m4_default([$1], [yes]))
|
||||
AC_ARG_ENABLE(devel-docs,
|
||||
AS_HELP_STRING([--enable-devel-docs],
|
||||
[Enable building the developer documentation (default: yes)]),
|
||||
[build_devel_docs=$enableval], [build_devel_docs=$devel_default])
|
||||
[Enable building the developer documentation (default: ]devel_default[)]),
|
||||
[build_devel_docs=$enableval], [build_devel_docs=]devel_default)
|
||||
m4_undefine([devel_default])
|
||||
AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
|
||||
AC_MSG_CHECKING([whether to build developer documentation])
|
||||
AC_MSG_RESULT([$build_devel_docs])
|
||||
@ -8429,14 +8531,12 @@ AC_MSG_RESULT([$build_devel_docs])
|
||||
# parm1: specify the default value, yes or no.
|
||||
#
|
||||
AC_DEFUN([XORG_ENABLE_SPECS],[
|
||||
spec_default=$1
|
||||
if test "x$spec_default" = x ; then
|
||||
spec_default="yes"
|
||||
fi
|
||||
m4_define([spec_default], m4_default([$1], [yes]))
|
||||
AC_ARG_ENABLE(specs,
|
||||
AS_HELP_STRING([--enable-specs],
|
||||
[Enable building the specs (default: yes)]),
|
||||
[build_specs=$enableval], [build_specs=$spec_default])
|
||||
[Enable building the specs (default: ]spec_default[)]),
|
||||
[build_specs=$enableval], [build_specs=]spec_default)
|
||||
m4_undefine([spec_default])
|
||||
AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
|
||||
AC_MSG_CHECKING([whether to build functional specifications])
|
||||
AC_MSG_RESULT([$build_specs])
|
||||
@ -8495,38 +8595,69 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
|
||||
# ----------------
|
||||
# Minimum version: 1.1.0
|
||||
#
|
||||
# Sets up flags for source checkers such as lint and sparse if --with-lint
|
||||
# is specified. (Use --with-lint=sparse for sparse.)
|
||||
# Sets $LINT to name of source checker passed with --with-lint (default: lint)
|
||||
# Sets $LINT_FLAGS to flags to pass to source checker
|
||||
# Sets LINT automake conditional if enabled (default: disabled)
|
||||
# This macro enables the use of a tool that flags some suspicious and
|
||||
# non-portable constructs (likely to be bugs) in C language source code.
|
||||
# It will attempt to locate the tool and use appropriate options.
|
||||
# There are various lint type tools on different platforms.
|
||||
#
|
||||
# Interface to module:
|
||||
# LINT: returns the path to the tool found on the platform
|
||||
# or the value set to LINT on the configure cmd line
|
||||
# also an Automake conditional
|
||||
# LINT_FLAGS: an Automake variable with appropriate flags
|
||||
#
|
||||
# --with-lint: 'yes' user instructs the module to use lint
|
||||
# 'no' user instructs the module not to use lint (default)
|
||||
#
|
||||
# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
|
||||
# If the user sets the value of LINT_FLAGS, they are used verbatim.
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_LINT],[
|
||||
|
||||
# Allow checking code with lint, sparse, etc.
|
||||
AC_ARG_VAR([LINT], [Path to a lint-style command])
|
||||
AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
|
||||
AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
|
||||
[Use a lint-style source code checker (default: disabled)])],
|
||||
[use_lint=$withval], [use_lint=no])
|
||||
if test "x$use_lint" = "xyes" ; then
|
||||
LINT="lint"
|
||||
|
||||
# Obtain platform specific info like program name and options
|
||||
# The lint program on FreeBSD and NetBSD is different from the one on Solaris
|
||||
case $host_os in
|
||||
*linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
|
||||
lint_name=splint
|
||||
lint_options="-badflag"
|
||||
;;
|
||||
*freebsd* | *netbsd*)
|
||||
lint_name=lint
|
||||
lint_options="-u -b"
|
||||
;;
|
||||
*solaris*)
|
||||
lint_name=lint
|
||||
lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Test for the presence of the program (either guessed by the code or spelled out by the user)
|
||||
if test "x$use_lint" = x"yes" ; then
|
||||
AC_PATH_PROG([LINT], [$lint_name])
|
||||
if test "x$LINT" = "x"; then
|
||||
AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
|
||||
fi
|
||||
elif test "x$use_lint" = x"no" ; then
|
||||
if test "x$LINT" != "x"; then
|
||||
AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
|
||||
fi
|
||||
else
|
||||
LINT="$use_lint"
|
||||
fi
|
||||
if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
|
||||
case $LINT in
|
||||
lint|*/lint)
|
||||
case $host_os in
|
||||
solaris*)
|
||||
LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
|
||||
fi
|
||||
|
||||
AC_SUBST(LINT)
|
||||
AC_SUBST(LINT_FLAGS)
|
||||
AM_CONDITIONAL(LINT, [test x$LINT != xno])
|
||||
# User supplied flags override default flags
|
||||
if test "x$LINT_FLAGS" != "x"; then
|
||||
lint_options=$LINT_FLAGS
|
||||
fi
|
||||
|
||||
AC_SUBST([LINT_FLAGS],[$lint_options])
|
||||
AM_CONDITIONAL(LINT, [test "x$LINT" != x])
|
||||
|
||||
]) # XORG_WITH_LINT
|
||||
|
||||
@ -8536,28 +8667,29 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
|
||||
#
|
||||
# Sets up flags for building lint libraries for checking programs that call
|
||||
# functions in the library.
|
||||
# Disabled by default, enable with --enable-lint-library
|
||||
# Sets:
|
||||
# @LINTLIB@ - name of lint library file to make
|
||||
# MAKE_LINT_LIB - automake conditional
|
||||
#
|
||||
# Interface to module:
|
||||
# LINTLIB - Automake variable with the name of lint library file to make
|
||||
# MAKE_LINT_LIB - Automake conditional
|
||||
#
|
||||
# --enable-lint-library: - 'yes' user instructs the module to created a lint library
|
||||
# - 'no' user instructs the module not to create a lint library (default)
|
||||
|
||||
AC_DEFUN([XORG_LINT_LIBRARY],[
|
||||
AC_REQUIRE([XORG_WITH_LINT])
|
||||
# Build lint "library" for more indepth checks of programs calling this library
|
||||
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
|
||||
[Create lint library (default: disabled)])],
|
||||
[make_lint_lib=$enableval], [make_lint_lib=no])
|
||||
if test "x$make_lint_lib" != "xno" ; then
|
||||
if test "x$LINT" = "xno" ; then
|
||||
AC_MSG_ERROR([Cannot make lint library without --with-lint])
|
||||
fi
|
||||
if test "x$make_lint_lib" = "xyes" ; then
|
||||
LINTLIB=llib-l$1.ln
|
||||
else
|
||||
LINTLIB=$make_lint_lib
|
||||
fi
|
||||
|
||||
if test "x$make_lint_lib" = x"yes" ; then
|
||||
LINTLIB=llib-l$1.ln
|
||||
if test "x$LINT" = "x"; then
|
||||
AC_MSG_ERROR([Cannot make lint library without --with-lint])
|
||||
fi
|
||||
elif test "x$make_lint_lib" != x"no" ; then
|
||||
AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
|
||||
fi
|
||||
|
||||
AC_SUBST(LINTLIB)
|
||||
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
|
||||
|
||||
@ -8570,7 +8702,7 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
|
||||
# Defines CWARNFLAGS to enable C compiler warnings.
|
||||
#
|
||||
AC_DEFUN([XORG_CWARNFLAGS], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
if test "x$GCC" = xyes ; then
|
||||
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
|
||||
@ -8595,7 +8727,7 @@ AC_SUBST(CWARNFLAGS)
|
||||
#
|
||||
# Add configure option to enable strict compilation
|
||||
AC_DEFUN([XORG_STRICT_OPTION], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
AC_REQUIRE([XORG_CWARNFLAGS])
|
||||
|
||||
@ -8625,6 +8757,7 @@ AC_SUBST([CWARNFLAGS])
|
||||
# Defines default options for X.Org modules.
|
||||
#
|
||||
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
|
||||
AC_REQUIRE([AC_PROG_INSTALL])
|
||||
XORG_CWARNFLAGS
|
||||
XORG_STRICT_OPTION
|
||||
XORG_RELEASE_VERSION
|
||||
@ -8678,22 +8811,9 @@ dnl
|
||||
|
||||
# XORG_RELEASE_VERSION
|
||||
# --------------------
|
||||
# Adds --with/without-release-string and changes the PACKAGE and
|
||||
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
|
||||
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
|
||||
# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
|
||||
# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
|
||||
|
||||
AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
AC_ARG_WITH(release-version,
|
||||
AS_HELP_STRING([--with-release-version=STRING],
|
||||
[Use release version string in package name]),
|
||||
[RELEASE_VERSION="$withval"],
|
||||
[RELEASE_VERSION=""])
|
||||
if test "x$RELEASE_VERSION" != "x"; then
|
||||
PACKAGE="$PACKAGE-$RELEASE_VERSION"
|
||||
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
|
||||
AC_MSG_NOTICE([Building with package name set to $PACKAGE])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
|
||||
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
|
||||
[Major version of this package])
|
||||
@ -8760,8 +8880,9 @@ dnl
|
||||
# is defined, then add $1 to $REQUIRED_MODULES.
|
||||
|
||||
AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
|
||||
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
|
||||
CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include "xorg-server.h"
|
||||
#if !defined $1
|
||||
|
788
driver/xf86-video-geode/configure
vendored
788
driver/xf86-video-geode/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -22,9 +22,9 @@
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT([xf86-video-geode],
|
||||
2.11.8,
|
||||
[2.11.9],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode],
|
||||
xf86-video-geode,
|
||||
[xf86-video-geode],
|
||||
[http://www.x.org/wiki/GeodeDriver])
|
||||
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
|
@ -171,6 +171,7 @@ MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN_SUBSTS = @MAN_SUBSTS@
|
||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
||||
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
|
||||
NMEDIT = @NMEDIT@
|
||||
@ -195,6 +196,7 @@ XEXT_CFLAGS = @XEXT_CFLAGS@
|
||||
XEXT_LIBS = @XEXT_LIBS@
|
||||
XORG_CFLAGS = @XORG_CFLAGS@
|
||||
XORG_LIBS = @XORG_LIBS@
|
||||
XORG_MAN_PAGE = @XORG_MAN_PAGE@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
|
@ -981,7 +981,14 @@ df_set_video_palette_entry(unsigned long index, unsigned long palette)
|
||||
dcfg = READ_VID32(DF_DISPLAY_CONFIG);
|
||||
misc = READ_VID32(DF_VID_MISC);
|
||||
|
||||
dcfg |= DF_DCFG_GV_PAL_BYP;
|
||||
/* Ensure that the Graphic data passes through the Gamma
|
||||
* Correction RAM
|
||||
*/
|
||||
dcfg &= ~DF_DCFG_GV_PAL_BYP;
|
||||
|
||||
/* The graphics and video data are passed through gamma
|
||||
* correction RAM
|
||||
*/
|
||||
misc &= ~DF_GAMMA_BYPASS_BOTH;
|
||||
|
||||
WRITE_VID32(DF_DISPLAY_CONFIG, dcfg);
|
||||
|
@ -1319,6 +1319,8 @@ static const PLL_FREQUENCY CimarronPLLFrequencies[] = {
|
||||
, /* 100.187, - 3,25, 4 */
|
||||
{0x00002122, (101L << 16) | ((4200L * 65536L) / 10000L)}
|
||||
, /* 101.420, - 3,19, 3 */
|
||||
{0x000041B1, (106L << 16) | ((5000L * 65536L) / 10000L)}
|
||||
, /* 106.50, - 5,28, 2 */
|
||||
{0x00001081, (108L << 16) | ((0000L * 65536L) / 10000L)}
|
||||
, /* 108.00, - 2, 9, 2 */
|
||||
{0x00006201, (113L << 16) | ((3100L * 65536L) / 10000L)}
|
||||
@ -1376,7 +1378,7 @@ static const PLL_FREQUENCY CimarronPLLFrequencies[] = {
|
||||
{0x00002130, (320L << 16) | ((2070L * 65536L) / 10000L)}
|
||||
, /* 320.207, - 3,20, 1 */
|
||||
{0x00006310, (341L << 16) | ((3490L * 65536L) / 10000L)}
|
||||
/* 341.349, - 7,50, 1 */
|
||||
/* 341.349, - 7,50, 1 */
|
||||
};
|
||||
|
||||
#define NUM_CIMARRON_PLL_FREQUENCIES sizeof(CimarronPLLFrequencies) / \
|
||||
|
@ -210,6 +210,8 @@ typedef struct _geodeRec
|
||||
int Pitch; /* display FB pitch */
|
||||
int displaySize; /* The size of the visibile area */
|
||||
|
||||
ExaOffscreenArea *shadowArea;
|
||||
|
||||
/* Framebuffer memory */
|
||||
|
||||
unsigned char *FBBase;
|
||||
|
@ -58,7 +58,6 @@
|
||||
|
||||
/* Machine independent stuff */
|
||||
#include "mipointer.h"
|
||||
#include "mibank.h"
|
||||
#include "micmap.h"
|
||||
/* All drivers implementing backing store need this */
|
||||
#include "mibstore.h"
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
#include "xf86.h"
|
||||
#include "os.h"
|
||||
#include "mibank.h"
|
||||
#include "globals.h"
|
||||
#include "xf86.h"
|
||||
#include "xf86Priv.h"
|
||||
@ -56,7 +55,11 @@ typedef struct _GXRandRInfo
|
||||
Rotation supported_rotations; /* driver supported */
|
||||
} XF86RandRInfoRec, *XF86RandRInfoPtr;
|
||||
|
||||
#if HAS_DEVPRIVATEKEYREC
|
||||
static DevPrivateKeyRec GXRandRIndex;
|
||||
#else
|
||||
static int GXRandRIndex;
|
||||
#endif
|
||||
|
||||
#define OLD_VIDEODRV_INTERFACE (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4)
|
||||
|
||||
@ -161,7 +164,11 @@ GXRandRSetMode(ScreenPtr pScreen,
|
||||
int oldHeight = pScreen->height;
|
||||
int oldmmWidth = pScreen->mmWidth;
|
||||
int oldmmHeight = pScreen->mmHeight;
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 8
|
||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
||||
#else
|
||||
WindowPtr pRoot = pScreen->root;
|
||||
#endif
|
||||
DisplayModePtr currentMode = NULL;
|
||||
Bool ret = TRUE;
|
||||
PixmapPtr pspix = NULL;
|
||||
@ -334,6 +341,10 @@ GXRandRInit(ScreenPtr pScreen, int rotation)
|
||||
#if OLD_VIDEODRV_INTERFACE
|
||||
GXRandRIndex = AllocateScreenPrivateIndex();
|
||||
#endif
|
||||
#if HAS_DIXREGISTERPRIVATEKEY
|
||||
if (!dixRegisterPrivateKey(&GXRandRIndex, PRIVATE_SCREEN, 0))
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
pRandr = xcalloc(sizeof(XF86RandRInfoRec), 1);
|
||||
if (pRandr == NULL)
|
||||
|
@ -339,8 +339,16 @@ lx_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green,
|
||||
|
||||
assert(size == 256);
|
||||
|
||||
/* We need the Gamma Correction for video - fading operation,
|
||||
* the values address should be plused for every cycle.
|
||||
* Special for Screensaver Operation.
|
||||
*/
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
unsigned int val = (*red << 8) | *green | (*blue >> 8);
|
||||
(*red) &= 0xff00;
|
||||
(*green) &= 0xff00;
|
||||
(*blue) &= 0xff00;
|
||||
unsigned int val = (*(red++) << 8) | *(green++) | (*(blue++) >> 8);
|
||||
|
||||
df_set_video_palette_entry(i, val);
|
||||
}
|
||||
@ -355,20 +363,48 @@ lx_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green,
|
||||
WRITE_VID32(DF_DISPLAY_CONFIG, dcfg);
|
||||
}
|
||||
|
||||
/* Allocates shadow memory, and allocating a new space for Rotatation.
|
||||
* The size is measured in bytes, and the offset from the beginning
|
||||
* of card space is returned.
|
||||
*/
|
||||
|
||||
static Bool
|
||||
LXAllocShadow(ScrnInfoPtr pScrni, int size)
|
||||
{
|
||||
GeodeRec *pGeode = GEODEPTR(pScrni);
|
||||
|
||||
if (pGeode->shadowArea) {
|
||||
if (pGeode->shadowArea->size != size) {
|
||||
exaOffscreenFree(pScrni->pScreen, pGeode->shadowArea);
|
||||
pGeode->shadowArea = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (pGeode->shadowArea == NULL) {
|
||||
pGeode->shadowArea =
|
||||
exaOffscreenAlloc(pScrni->pScreen, size, 4, TRUE,
|
||||
NULL, NULL);
|
||||
|
||||
if (pGeode->shadowArea == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pScrni->fbOffset = pGeode->shadowArea->offset;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void *
|
||||
lx_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
|
||||
{
|
||||
ScrnInfoPtr pScrni = crtc->scrn;
|
||||
GeodePtr pGeode = GEODEPTR(pScrni);
|
||||
LXCrtcPrivatePtr lx_crtc = crtc->driver_private;
|
||||
unsigned int rpitch, size;
|
||||
|
||||
rpitch = pScrni->displayWidth * (pScrni->bitsPerPixel / 8);
|
||||
size = rpitch * height;
|
||||
|
||||
lx_crtc->rotate_mem = GeodeAllocOffscreen(pGeode, size, 4);
|
||||
|
||||
if (lx_crtc->rotate_mem == NULL) {
|
||||
/* Allocate shadow memory */
|
||||
if (LXAllocShadow(pScrni, size) == FALSE) {
|
||||
xf86DrvMsg(pScrni->scrnIndex, X_ERROR,
|
||||
"Couldn't allocate the shadow memory for rotation\n");
|
||||
xf86DrvMsg(pScrni->scrnIndex, X_ERROR,
|
||||
@ -378,8 +414,8 @@ lx_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset(pGeode->FBBase + lx_crtc->rotate_mem->offset, 0, size);
|
||||
return pGeode->FBBase + lx_crtc->rotate_mem->offset;
|
||||
memset(pGeode->FBBase + pGeode->shadowArea->offset, 0, size);
|
||||
return pGeode->FBBase + pGeode->shadowArea->offset;
|
||||
}
|
||||
|
||||
static PixmapPtr
|
||||
@ -409,15 +445,17 @@ lx_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rpixmap, void *data)
|
||||
{
|
||||
ScrnInfoPtr pScrni = crtc->scrn;
|
||||
GeodeRec *pGeode = GEODEPTR(pScrni);
|
||||
LXCrtcPrivatePtr lx_crtc = crtc->driver_private;
|
||||
|
||||
if (rpixmap)
|
||||
FreeScratchPixmapHeader(rpixmap);
|
||||
|
||||
/* Free shadow memory */
|
||||
if (data) {
|
||||
gp_wait_until_idle();
|
||||
GeodeFreeOffscreen(pGeode, lx_crtc->rotate_mem);
|
||||
lx_crtc->rotate_mem = NULL;
|
||||
if (pGeode->shadowArea != NULL) {
|
||||
exaOffscreenFree(pScrni->pScreen, pGeode->shadowArea);
|
||||
pGeode->shadowArea = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,8 @@ static const struct exa_format_t
|
||||
PICT_b5g6r5, 16, CIMGP_SOURCE_FMT_16BPP_BGR, 0}, {
|
||||
PICT_x1r5g5b5, 16, CIMGP_SOURCE_FMT_1_5_5_5, 0}, {
|
||||
PICT_x1b5g5r5, 16, CIMGP_SOURCE_FMT_15BPP_BGR, 0}, {
|
||||
PICT_r3g3b2, 8, CIMGP_SOURCE_FMT_3_3_2, 0}
|
||||
PICT_r3g3b2, 8, CIMGP_SOURCE_FMT_3_3_2, 0}, {
|
||||
PICT_a8, 32, CIMGP_SOURCE_FMT_8_8_8_8, 8}
|
||||
};
|
||||
|
||||
/* This is a chunk of memory we use for scratch space */
|
||||
@ -88,6 +89,7 @@ static struct
|
||||
unsigned int srcColor;
|
||||
int op;
|
||||
int repeat;
|
||||
int maskrepeat;
|
||||
unsigned int fourBpp;
|
||||
unsigned int bufferOffset;
|
||||
struct exa_format_t *srcFormat;
|
||||
@ -408,29 +410,28 @@ struct blend_ops_t
|
||||
},
|
||||
/* PictOpOver */
|
||||
{
|
||||
CIMGP_ALPHA_A_PLUS_BETA_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE},
|
||||
{
|
||||
},
|
||||
CIMGP_A_PLUS_BETA_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, {
|
||||
CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE},
|
||||
/* PictOpOverReverse */
|
||||
{
|
||||
CIMGP_ALPHA_A_PLUS_BETA_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, {
|
||||
},
|
||||
CIMGP_A_PLUS_BETA_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, {
|
||||
CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE},
|
||||
/* PictOpIn */
|
||||
{
|
||||
CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_SOURCE}, {
|
||||
},
|
||||
CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE},
|
||||
/* PictOpInReverse */
|
||||
{
|
||||
CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_DEST}, {
|
||||
},
|
||||
CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE},
|
||||
/* PictOpOut */
|
||||
{
|
||||
CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, {
|
||||
},
|
||||
CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, {
|
||||
CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE},
|
||||
/* PictOpOutReverse */
|
||||
{
|
||||
CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, {
|
||||
},
|
||||
CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, {
|
||||
CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE},
|
||||
/* SrcAtop */
|
||||
{
|
||||
CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_DEST}, {
|
||||
@ -457,16 +458,9 @@ lx_get_format(PicturePtr p)
|
||||
int i;
|
||||
unsigned int format = p->format;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(lx_exa_formats); i++) {
|
||||
|
||||
if (lx_exa_formats[i].bpp < PICT_FORMAT_BPP(format))
|
||||
break;
|
||||
else if (lx_exa_formats[i].bpp != PICT_FORMAT_BPP(format))
|
||||
continue;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(lx_exa_formats); i++)
|
||||
if (lx_exa_formats[i].exa == format)
|
||||
return (&lx_exa_formats[i]);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -536,12 +530,29 @@ static Bool
|
||||
lx_check_composite(int op, PicturePtr pSrc, PicturePtr pMsk, PicturePtr pDst)
|
||||
{
|
||||
GeodeRec *pGeode = GEODEPTR_FROM_PICTURE(pDst);
|
||||
const struct exa_format_t *srcFmt, *dstFmt;
|
||||
|
||||
/* Check that the operation is supported */
|
||||
|
||||
if (op > PictOpAdd)
|
||||
return FALSE;
|
||||
|
||||
/* FIXME: Meet this conditions from the debug for PictOpAdd.
|
||||
* Any Other possibilities? Add a judge for the future supplement */
|
||||
if (op == PictOpAdd && pSrc->format == PICT_a8r8g8b8 &&
|
||||
pDst->format == PICT_a8 && !pMsk)
|
||||
return TRUE;
|
||||
|
||||
if (op == PictOpAdd && pSrc->format == PICT_x8r8g8b8 &&
|
||||
pDst->format == PICT_a8 && !pMsk)
|
||||
return TRUE;
|
||||
|
||||
if (op == PictOpAdd && pSrc->format == PICT_r5g6b5 &&
|
||||
pDst->format == PICT_a8 && !pMsk)
|
||||
return TRUE;
|
||||
|
||||
/* We need the off-screen buffer to do the multipass work */
|
||||
|
||||
if (usesPasses(op)) {
|
||||
if (pGeode->exaBfrOffset == 0 || !pMsk)
|
||||
return FALSE;
|
||||
@ -568,6 +579,10 @@ lx_check_composite(int op, PicturePtr pSrc, PicturePtr pMsk, PicturePtr pDst)
|
||||
if (pMsk && pMsk->transform)
|
||||
return FALSE;
|
||||
|
||||
/* XXX - don't know if we can do any hwaccel on solid fills or gradient types */
|
||||
if (pSrc->pSourcePict || (pMsk && pMsk->pSourcePict))
|
||||
return FALSE;
|
||||
|
||||
/* Keep an eye out for source rotation transforms - those we can
|
||||
* do something about */
|
||||
|
||||
@ -579,25 +594,34 @@ lx_check_composite(int op, PicturePtr pSrc, PicturePtr pMsk, PicturePtr pDst)
|
||||
|
||||
/* XXX - I don't understand PICT_a8 enough - so I'm punting */
|
||||
|
||||
if (pSrc->format == PICT_a8 || pDst->format == PICT_a8)
|
||||
if ((op != PictOpAdd) && (pSrc->format == PICT_a8 ||
|
||||
pDst->format == PICT_a8))
|
||||
return FALSE;
|
||||
|
||||
if (pMsk && op != PictOpClear) {
|
||||
struct blend_ops_t *opPtr = &lx_alpha_ops[op * 2];
|
||||
int direction = (opPtr->channel == CIMGP_CHANNEL_A_SOURCE) ? 0 : 1;
|
||||
|
||||
/* Direction 0 indicates src->dst, 1 indiates dst->src */
|
||||
if (((direction == 0) && (pSrc->pDrawable->bitsPerPixel < 16)) ||
|
||||
((direction == 1) && (pDst->pDrawable->bitsPerPixel < 16))) {
|
||||
ErrorF("Can't do mask blending with less then 16bpp\n");
|
||||
return FALSE;
|
||||
}
|
||||
/* We can only do masks with a 8bpp or a 4bpp mask */
|
||||
if (pMsk->format != PICT_a8 && pMsk->format != PICT_a4)
|
||||
return FALSE;
|
||||
/* The pSrc should be 1x1 pixel if the pMsk is not zero */
|
||||
if (pSrc->pDrawable->width != 1 || pSrc->pDrawable->height != 1)
|
||||
return FALSE;
|
||||
/* FIXME: In lx_prepare_composite, there are no variables to record the
|
||||
* one pixel source's width and height when the mask is not zero.
|
||||
* That will lead to bigger region to render instead of one pixel in lx
|
||||
* _do_composite, so we should fallback currently to avoid this */
|
||||
if (!pSrc->repeat)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk,
|
||||
PicturePtr pDst, PixmapPtr pxSrc, PixmapPtr pxMsk, PixmapPtr pxDst)
|
||||
{
|
||||
GeodeRec *pGeode = GEODEPTR_FROM_PIXMAP(pxDst);
|
||||
const struct exa_format_t *srcFmt, *dstFmt;
|
||||
|
||||
/* Get the formats for the source and destination */
|
||||
|
||||
if ((srcFmt = lx_get_format(pSrc)) == NULL) {
|
||||
@ -631,6 +655,20 @@ lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk,
|
||||
ErrorF("EXA: Can't rotate and convert formats at the same time\n");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk,
|
||||
PicturePtr pDst, PixmapPtr pxSrc, PixmapPtr pxMsk, PixmapPtr pxDst)
|
||||
{
|
||||
GeodeRec *pGeode = GEODEPTR_FROM_PIXMAP(pxDst);
|
||||
const struct exa_format_t *srcFmt, *dstFmt;
|
||||
|
||||
/* Get the formats for the source and destination */
|
||||
|
||||
srcFmt = lx_get_format(pSrc);
|
||||
dstFmt = lx_get_format(pDst);
|
||||
|
||||
/* Set up the scratch buffer with the information we need */
|
||||
|
||||
@ -641,34 +679,29 @@ lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk,
|
||||
exaScratch.bufferOffset = pGeode->exaBfrOffset;
|
||||
|
||||
if (pMsk && op != PictOpClear) {
|
||||
struct blend_ops_t *opPtr = &lx_alpha_ops[op * 2];
|
||||
int direction = (opPtr->channel == CIMGP_CHANNEL_A_SOURCE) ? 0 : 1;
|
||||
|
||||
/* Direction 0 indicates src->dst, 1 indiates dst->src */
|
||||
|
||||
if (((direction == 0) && (pxSrc->drawable.bitsPerPixel < 16)) ||
|
||||
((direction == 1) && (pxDst->drawable.bitsPerPixel < 16))) {
|
||||
ErrorF("Can't do mask blending with less then 16bpp\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Get the source color */
|
||||
/* If the op is PictOpOver(or PictOpOutReverse, PictOpInReverse,
|
||||
* PictOpIn, PictOpOut, PictOpOverReverse), we should get the
|
||||
* ARGB32 source format */
|
||||
|
||||
if (direction == 0)
|
||||
if ((op == PictOpOver || op == PictOpOutReverse || op ==
|
||||
PictOpInReverse || op == PictOpIn || op == PictOpOut ||
|
||||
op == PictOpOverReverse) && (srcFmt->alphabits != 0))
|
||||
exaScratch.srcColor = exaGetPixmapFirstPixel(pxSrc);
|
||||
else if ((op == PictOpOver || op == PictOpOutReverse || op ==
|
||||
PictOpInReverse || op == PictOpIn || op == PictOpOut ||
|
||||
op == PictOpOverReverse) &&
|
||||
(srcFmt->alphabits == 0))
|
||||
exaScratch.srcColor = lx_get_source_color(pxSrc, pSrc->format,
|
||||
PICT_a8r8g8b8);
|
||||
else
|
||||
exaScratch.srcColor = lx_get_source_color(pxSrc, pSrc->format,
|
||||
pDst->format);
|
||||
else
|
||||
exaScratch.srcColor = lx_get_source_color(pxDst, pDst->format,
|
||||
pSrc->format);
|
||||
|
||||
/* FIXME: What to do here? */
|
||||
|
||||
if (pSrc->pDrawable->width != 1 || pSrc->pDrawable->height != 1)
|
||||
return FALSE;
|
||||
|
||||
/* Save off the info we need (reuse the source values to save space) */
|
||||
|
||||
exaScratch.type = COMP_TYPE_MASK;
|
||||
exaScratch.maskrepeat = pMsk->repeat;
|
||||
|
||||
exaScratch.srcOffset = exaGetPixmapOffset(pxMsk);
|
||||
exaScratch.srcPitch = exaGetPixmapPitch(pxMsk);
|
||||
@ -679,11 +712,6 @@ lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk,
|
||||
|
||||
/* Flag to indicate if this a 8BPP or a 4BPP mask */
|
||||
exaScratch.fourBpp = (pxMsk->drawable.bitsPerPixel == 4) ? 1 : 0;
|
||||
|
||||
/* If the direction is reversed, then remember the source */
|
||||
|
||||
if (direction == 1)
|
||||
exaScratch.srcPixmap = pxSrc;
|
||||
} else {
|
||||
if (usesPasses(op))
|
||||
exaScratch.type = COMP_TYPE_TWOPASS;
|
||||
@ -762,6 +790,70 @@ get_op_type(struct exa_format_t *src, struct exa_format_t *dst, int type)
|
||||
* ifdefed out until such time that we are sure its not needed
|
||||
*/
|
||||
|
||||
#define GetPixmapOffset(px, x, y) ( exaGetPixmapOffset((px)) + \
|
||||
(exaGetPixmapPitch((px)) * (y)) + \
|
||||
((((px)->drawable.bitsPerPixel + 7) / 8) * (x)) )
|
||||
|
||||
#define GetSrcOffset(_x, _y) (exaScratch.srcOffset + ((_y) * exaScratch.srcPitch) + \
|
||||
((_x) * exaScratch.srcBpp))
|
||||
|
||||
static void
|
||||
lx_composite_onepass_add_a8(PixmapPtr pxDst, unsigned long dstOffset,
|
||||
unsigned long srcOffset, int width, int height, int opX, int opY,
|
||||
int srcX, int srcY)
|
||||
{
|
||||
struct blend_ops_t *opPtr;
|
||||
int apply, type;
|
||||
int optempX, optempY;
|
||||
int i, j;
|
||||
unsigned long pixmapOffset, pixmapPitch, calBitsPixel;
|
||||
|
||||
pixmapOffset = exaGetPixmapOffset(pxDst);
|
||||
pixmapPitch = exaGetPixmapPitch(pxDst);
|
||||
calBitsPixel = (pxDst->drawable.bitsPerPixel + 7) / 8;
|
||||
|
||||
/* Keep this GP idle judge here. Otherwise the SW method has chance to
|
||||
* conflict with the HW rendering method */
|
||||
gp_wait_until_idle();
|
||||
|
||||
if (opX % 4 == 0 && srcX % 4 == 0) {
|
||||
/* HW acceleration */
|
||||
opPtr = &lx_alpha_ops[exaScratch.op * 2];
|
||||
apply = CIMGP_APPLY_BLEND_TO_ALL;
|
||||
gp_declare_blt(0);
|
||||
gp_set_bpp(32);
|
||||
gp_set_strides(exaGetPixmapPitch(pxDst), exaScratch.srcPitch);
|
||||
gp_set_source_format(8);
|
||||
type = opPtr->type;
|
||||
gp_set_alpha_operation(opPtr->operation, type, opPtr->channel, apply, 0);
|
||||
gp_screen_to_screen_convert(dstOffset, srcOffset, width / 4, height, 0);
|
||||
/* Calculate the pixels in the tail of each line */
|
||||
for (j = srcY; j < srcY + height; j++)
|
||||
for (i = srcX + (width / 4) * 4; i < srcX + width; i++) {
|
||||
srcOffset = GetSrcOffset(i, j);
|
||||
optempX = opX + i - srcX;
|
||||
optempY = opY + j - srcY;
|
||||
dstOffset = pixmapOffset + pixmapPitch * optempY +
|
||||
calBitsPixel * optempX;
|
||||
*(cim_fb_ptr + dstOffset) = (*(cim_fb_ptr + srcOffset)
|
||||
+ *(cim_fb_ptr + dstOffset) <= 0xff) ?
|
||||
*(cim_fb_ptr + srcOffset) + *(cim_fb_ptr + dstOffset) : 0xff;
|
||||
}
|
||||
} else {
|
||||
for (j = srcY; j < srcY + height; j++)
|
||||
for (i = srcX; i < srcX + width; i++) {
|
||||
srcOffset = GetSrcOffset(i, j);
|
||||
optempX = opX + i - srcX;
|
||||
optempY = opY + j - srcY;
|
||||
dstOffset = pixmapOffset + pixmapPitch * optempY +
|
||||
calBitsPixel * optempX;
|
||||
*(cim_fb_ptr + dstOffset) = (*(cim_fb_ptr + srcOffset) +
|
||||
*(cim_fb_ptr + dstOffset) <= 0xff) ?
|
||||
*(cim_fb_ptr + srcOffset) + *(cim_fb_ptr + dstOffset) : 0xff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
lx_composite_onepass(PixmapPtr pxDst, unsigned long dstOffset,
|
||||
unsigned long srcOffset, int width, int height)
|
||||
@ -790,6 +882,103 @@ lx_composite_onepass(PixmapPtr pxDst, unsigned long dstOffset,
|
||||
gp_screen_to_screen_convert(dstOffset, srcOffset, width, height, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
lx_composite_all_black(unsigned long srcOffset, int width, int height)
|
||||
{
|
||||
struct blend_ops_t *opPtr;
|
||||
int apply, type;
|
||||
|
||||
opPtr = &lx_alpha_ops[0];
|
||||
apply = (exaScratch.srcFormat->alphabits != 0) ?
|
||||
CIMGP_APPLY_BLEND_TO_ALL : CIMGP_APPLY_BLEND_TO_RGB;
|
||||
gp_declare_blt(0);
|
||||
gp_set_bpp(lx_get_bpp_from_format(exaScratch.srcFormat->fmt));
|
||||
gp_set_strides(exaScratch.srcPitch, exaScratch.srcPitch);
|
||||
lx_set_source_format(exaScratch.srcFormat->fmt,
|
||||
exaScratch.srcFormat->fmt);
|
||||
type =
|
||||
get_op_type(exaScratch.srcFormat, exaScratch.srcFormat, opPtr->type);
|
||||
gp_set_alpha_operation(opPtr->operation, type, opPtr->channel, apply, 0);
|
||||
gp_screen_to_screen_convert(srcOffset, srcOffset, width, height, 0);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
lx_composite_onepass_special(PixmapPtr pxDst, int width, int height, int opX,
|
||||
int opY, int srcX, int srcY)
|
||||
{
|
||||
struct blend_ops_t *opPtr;
|
||||
int apply, type;
|
||||
int opWidth, opHeight;
|
||||
int optempX, optempY;
|
||||
unsigned int dstOffset, srcOffset = 0;
|
||||
|
||||
optempX = opX;
|
||||
optempY = opY;
|
||||
|
||||
/* Make sure srcX and srcY are in source region */
|
||||
srcX = ((srcX % (int)exaScratch.srcWidth) + (int)exaScratch.srcWidth)
|
||||
% (int)exaScratch.srcWidth;
|
||||
srcY = ((srcY % (int)exaScratch.srcHeight) + (int)exaScratch.srcHeight)
|
||||
% (int)exaScratch.srcHeight;
|
||||
|
||||
opWidth = exaScratch.srcWidth - srcX;
|
||||
opHeight = exaScratch.srcHeight - srcY;
|
||||
|
||||
srcOffset = GetSrcOffset(srcX, srcY);
|
||||
|
||||
if (width < opWidth)
|
||||
opWidth = width;
|
||||
if (height < opHeight)
|
||||
opHeight = height;
|
||||
|
||||
while (1) {
|
||||
gp_wait_until_idle();
|
||||
dstOffset = GetPixmapOffset(pxDst, optempX, optempY);
|
||||
opPtr = &lx_alpha_ops[exaScratch.op * 2];
|
||||
apply = (exaScratch.dstFormat->alphabits != 0 &&
|
||||
exaScratch.srcFormat->alphabits != 0) ?
|
||||
CIMGP_APPLY_BLEND_TO_ALL : CIMGP_APPLY_BLEND_TO_RGB;
|
||||
gp_declare_blt(0);
|
||||
gp_set_bpp(lx_get_bpp_from_format(exaScratch.dstFormat->fmt));
|
||||
gp_set_strides(exaGetPixmapPitch(pxDst), exaScratch.srcPitch);
|
||||
lx_set_source_format(exaScratch.srcFormat->fmt,
|
||||
exaScratch.dstFormat->fmt);
|
||||
type = get_op_type(exaScratch.srcFormat, exaScratch.dstFormat,
|
||||
opPtr->type);
|
||||
gp_set_alpha_operation(opPtr->operation, type, opPtr->channel,
|
||||
apply, 0);
|
||||
gp_screen_to_screen_convert(dstOffset, srcOffset, opWidth, opHeight, 0);
|
||||
|
||||
optempX += opWidth;
|
||||
if (optempX >= opX + width) {
|
||||
optempX = opX;
|
||||
optempY += opHeight;
|
||||
if (optempY >= opY + height)
|
||||
break;
|
||||
}
|
||||
if (optempX == opX) {
|
||||
srcOffset = GetSrcOffset(srcX, 0);
|
||||
opWidth = ((opX + width) - optempX) > (exaScratch.srcWidth - srcX)
|
||||
? (exaScratch.srcWidth - srcX) : ((opX + width) - optempX);
|
||||
opHeight = ((opY + height) - optempY) > exaScratch.srcHeight
|
||||
? exaScratch.srcHeight : ((opY + height) - optempY);
|
||||
} else if (optempY == opY) {
|
||||
srcOffset = GetSrcOffset(0, srcY);
|
||||
opWidth = ((opX + width) - optempX) > exaScratch.srcWidth
|
||||
? exaScratch.srcWidth : ((opX + width) - optempX);
|
||||
opHeight = ((opY + height) - optempY) > (exaScratch.srcHeight -
|
||||
srcY) ? (exaScratch.srcHeight - srcY) : ((opY + height) - optempY);
|
||||
} else {
|
||||
srcOffset = GetSrcOffset(0, 0);
|
||||
opWidth = ((opX + width) - optempX) > exaScratch.srcWidth
|
||||
? exaScratch.srcWidth : ((opX + width) - optempX);
|
||||
opHeight = ((opY + height) - optempY) > exaScratch.srcHeight
|
||||
? exaScratch.srcHeight : ((opY + height) - optempY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* This function handles the multipass blend functions */
|
||||
|
||||
static void
|
||||
@ -908,12 +1097,83 @@ lx_do_composite_mask(PixmapPtr pxDst, unsigned long dstOffset,
|
||||
exaScratch.srcPitch, opPtr->operation, exaScratch.fourBpp);
|
||||
}
|
||||
|
||||
#define GetPixmapOffset(px, x, y) ( exaGetPixmapOffset((px)) + \
|
||||
(exaGetPixmapPitch((px)) * (y)) + \
|
||||
((((px)->drawable.bitsPerPixel + 7) / 8) * (x)) )
|
||||
static void
|
||||
lx_do_composite_mask_two_pass(PixmapPtr pxDst, unsigned long dstOffset,
|
||||
unsigned int maskOffset, int width, int height, int opX, int opY,
|
||||
xPointFixed srcPoint)
|
||||
{
|
||||
int apply, type;
|
||||
struct blend_ops_t *opPtr;
|
||||
int opWidth, opHeight;
|
||||
int opoverX, opoverY;
|
||||
|
||||
#define GetSrcOffset(_x, _y) (exaScratch.srcOffset + ((_y) * exaScratch.srcPitch) + \
|
||||
((_x) * exaScratch.srcBpp))
|
||||
opoverX = opX;
|
||||
opoverY = opY;
|
||||
|
||||
/* The rendering region should not be bigger than off-screen memory size
|
||||
* which equals to DEFAULT_EXA_SCRATCH_BFRSZ. If that happens, we split
|
||||
* the PictOpOver rendering region into several 256KB chunks. And because
|
||||
* of the Pitch(stride) parameter, so we use maximun width of mask picture.
|
||||
* that is to say it is a scanline rendering process */
|
||||
if (width * height * 4 > DEFAULT_EXA_SCRATCH_BFRSZ) {
|
||||
opWidth = width;
|
||||
opHeight = DEFAULT_EXA_SCRATCH_BFRSZ / (width * 4);
|
||||
} else {
|
||||
opWidth = width;
|
||||
opHeight = height;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
|
||||
/* Wait until the GP is idle - this will ensure that the scratch buffer
|
||||
* isn't occupied */
|
||||
|
||||
gp_wait_until_idle();
|
||||
|
||||
/* Copy the source to the scratch buffer, and do a src * mask raster
|
||||
* operation */
|
||||
|
||||
gp_declare_blt(0);
|
||||
opPtr = &lx_alpha_ops[(exaScratch.op * 2) + 1];
|
||||
gp_set_source_format(CIMGP_SOURCE_FMT_8_8_8_8);
|
||||
gp_set_strides(opWidth * 4, exaScratch.srcPitch);
|
||||
gp_set_bpp(lx_get_bpp_from_format(CIMGP_SOURCE_FMT_8_8_8_8));
|
||||
gp_set_solid_source(exaScratch.srcColor);
|
||||
gp_blend_mask_blt(exaScratch.bufferOffset, 0, opWidth, opHeight,
|
||||
maskOffset, exaScratch.srcPitch, opPtr->operation,
|
||||
exaScratch.fourBpp);
|
||||
|
||||
/* Do a relative operation(refer rendercheck ops.c), and copy the
|
||||
* operation result to destination */
|
||||
|
||||
gp_declare_blt(CIMGP_BLTFLAGS_HAZARD);
|
||||
opPtr = &lx_alpha_ops[exaScratch.op * 2];
|
||||
apply = (exaScratch.dstFormat->alphabits == 0) ?
|
||||
CIMGP_APPLY_BLEND_TO_RGB : CIMGP_APPLY_BLEND_TO_ALL;
|
||||
gp_set_source_format(CIMGP_SOURCE_FMT_8_8_8_8);
|
||||
gp_set_strides(exaGetPixmapPitch(pxDst), opWidth * 4);
|
||||
gp_set_bpp(lx_get_bpp_from_format(exaScratch.dstFormat->fmt));
|
||||
type = CIMGP_CONVERTED_ALPHA;
|
||||
gp_set_alpha_operation(opPtr->operation, type, opPtr->channel,
|
||||
apply, 0);
|
||||
gp_screen_to_screen_convert(dstOffset, exaScratch.bufferOffset,
|
||||
opWidth, opHeight, 0);
|
||||
|
||||
if (width * height * 4 > DEFAULT_EXA_SCRATCH_BFRSZ) {
|
||||
/* Finish the rendering */
|
||||
if (opoverY + opHeight == opY + height)
|
||||
break;
|
||||
/* Recalculate the Dest and Mask rendering start point */
|
||||
srcPoint.y = srcPoint.y + F(opHeight);
|
||||
opoverY = opoverY + opHeight;
|
||||
if (opoverY + opHeight > opY + height)
|
||||
opHeight = opY + height - opoverY;
|
||||
dstOffset = GetPixmapOffset(pxDst, opoverX, opoverY);
|
||||
maskOffset = GetSrcOffset(I(srcPoint.x), I(srcPoint.y));
|
||||
} else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
transformPoint(PictTransform * t, xPointFixed * point)
|
||||
@ -935,8 +1195,6 @@ static void
|
||||
lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
|
||||
int maskY, int dstX, int dstY, int width, int height)
|
||||
{
|
||||
struct blend_ops_t *opPtr = &lx_alpha_ops[exaScratch.op * 2];
|
||||
|
||||
unsigned int dstOffset, srcOffset = 0;
|
||||
|
||||
xPointFixed srcPoint;
|
||||
@ -999,13 +1257,85 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
|
||||
srcPoint.y = F(0);
|
||||
}
|
||||
|
||||
/* Get the source point offset position */
|
||||
|
||||
srcOffset = GetSrcOffset(I(srcPoint.x), I(srcPoint.y));
|
||||
|
||||
if (exaScratch.srcWidth < opWidth)
|
||||
opWidth = exaScratch.srcWidth;
|
||||
/* When mask exists, exaScratch.srcWidth and exaScratch.srcHeight are
|
||||
* the source width and source height; Otherwise, they are mask width
|
||||
* and mask height */
|
||||
/* exaScratch.repeat is the source repeat attribute
|
||||
* exaScratch.maskrepeat is the mask repeat attribute */
|
||||
/* If type is COMP_TYPE_MASK, maskX and maskY are not zero, we should
|
||||
* subtract them to do the operation in the correct region */
|
||||
|
||||
if (exaScratch.srcHeight < opHeight)
|
||||
opHeight = exaScratch.srcHeight;
|
||||
/* FIXME: Please add the code to handle the condition when the maskX
|
||||
* and maskY coordinate are negative or greater than
|
||||
* exaScratch.srcWidth and exaScratch.srcHeight */
|
||||
|
||||
if (exaScratch.type == COMP_TYPE_MASK) {
|
||||
if ((exaScratch.srcWidth - maskX) < opWidth)
|
||||
opWidth = exaScratch.srcWidth - maskX;
|
||||
if ((exaScratch.srcHeight - maskY) < opHeight)
|
||||
opHeight = exaScratch.srcHeight - maskY;
|
||||
} else {
|
||||
if (exaScratch.type == COMP_TYPE_ONEPASS) {
|
||||
/* This is the condition srcX or/and srcY is/are out of source
|
||||
* region */
|
||||
if (((srcX >= 0 && srcY >= exaScratch.srcHeight)
|
||||
|| (srcX >= exaScratch.srcWidth && srcY >= 0)) &&
|
||||
(exaScratch.op == PictOpOver || exaScratch.op == PictOpSrc)) {
|
||||
if (exaScratch.repeat == 1) {
|
||||
opWidth = width;
|
||||
opHeight = height;
|
||||
} else {
|
||||
if (exaScratch.op == PictOpOver)
|
||||
return ;
|
||||
else {
|
||||
exaScratch.op = PictOpClear;
|
||||
opWidth = width;
|
||||
opHeight = height;
|
||||
}
|
||||
}
|
||||
/* This is the condition srcX or/and srcY is/are in the source
|
||||
* region */
|
||||
} else if (srcX >= 0 && srcY >= 0 &&
|
||||
(exaScratch.op == PictOpOver || exaScratch.op == PictOpSrc)) {
|
||||
if (exaScratch.repeat == 1) {
|
||||
opWidth = width;
|
||||
opHeight = height;
|
||||
} else {
|
||||
if ((exaScratch.srcWidth - srcX) < opWidth)
|
||||
opWidth = exaScratch.srcWidth - srcX;
|
||||
if ((exaScratch.srcHeight - srcY) < opHeight)
|
||||
opHeight = exaScratch.srcHeight - srcY;
|
||||
}
|
||||
/* This is the condition srcX or/and srcY is/are negative */
|
||||
} else if ((srcX < 0 || srcY < 0) &&
|
||||
(exaScratch.op == PictOpOver || exaScratch.op == PictOpSrc)) {
|
||||
if (exaScratch.repeat == 1) {
|
||||
opWidth = width;
|
||||
opHeight = height;
|
||||
} else {
|
||||
/* Have not met this condition till now */
|
||||
return ;
|
||||
}
|
||||
} else {
|
||||
if (exaScratch.srcWidth < opWidth)
|
||||
opWidth = exaScratch.srcWidth;
|
||||
if (exaScratch.srcHeight < opHeight)
|
||||
opHeight = exaScratch.srcHeight;
|
||||
}
|
||||
} else {
|
||||
if (exaScratch.rotate == RR_Rotate_180) {
|
||||
} else {
|
||||
if ((exaScratch.srcWidth - srcY) < opWidth)
|
||||
opWidth = exaScratch.srcWidth - srcY;
|
||||
if ((exaScratch.srcHeight - srcX) < opHeight)
|
||||
opHeight = exaScratch.srcHeight - srcX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (1) {
|
||||
|
||||
@ -1014,24 +1344,31 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
|
||||
switch (exaScratch.type) {
|
||||
|
||||
case COMP_TYPE_MASK:{
|
||||
int direction =
|
||||
(opPtr->channel == CIMGP_CHANNEL_A_SOURCE) ? 0 : 1;
|
||||
|
||||
if (direction == 1) {
|
||||
dstOffset =
|
||||
GetPixmapOffset(exaScratch.srcPixmap, opX, opY);
|
||||
lx_do_composite_mask(exaScratch.srcPixmap, dstOffset,
|
||||
srcOffset, opWidth, opHeight);
|
||||
} else {
|
||||
lx_do_composite_mask(pxDst, dstOffset, srcOffset, opWidth,
|
||||
opHeight);
|
||||
}
|
||||
if (exaScratch.op == PictOpOver || exaScratch.op ==
|
||||
PictOpOutReverse || exaScratch.op == PictOpInReverse ||
|
||||
exaScratch.op == PictOpIn || exaScratch.op == PictOpOut ||
|
||||
exaScratch.op == PictOpOverReverse)
|
||||
lx_do_composite_mask_two_pass(pxDst, dstOffset,
|
||||
srcOffset, opWidth, opHeight, opX, opY, srcPoint);
|
||||
else
|
||||
lx_do_composite_mask(pxDst, dstOffset, srcOffset,
|
||||
opWidth, opHeight);
|
||||
}
|
||||
break;
|
||||
|
||||
case COMP_TYPE_ONEPASS:
|
||||
lx_composite_onepass(pxDst, dstOffset, srcOffset, opWidth,
|
||||
opHeight);
|
||||
if ((exaScratch.op == PictOpOver || exaScratch.op == PictOpSrc)
|
||||
&& (exaScratch.repeat == 1)) {
|
||||
lx_composite_onepass_special(pxDst, opWidth, opHeight, opX, opY,
|
||||
srcX, srcY);
|
||||
return ;
|
||||
} else if ((exaScratch.op == PictOpAdd) && (exaScratch.srcFormat->exa
|
||||
== PICT_a8) && (exaScratch.dstFormat->exa == PICT_a8))
|
||||
lx_composite_onepass_add_a8(pxDst, dstOffset, srcOffset,
|
||||
opWidth, opHeight, opX, opY, srcX, srcY);
|
||||
else
|
||||
lx_composite_onepass(pxDst, dstOffset, srcOffset, opWidth,
|
||||
opHeight);
|
||||
break;
|
||||
|
||||
case COMP_TYPE_TWOPASS:
|
||||
@ -1044,9 +1381,6 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
|
||||
break;
|
||||
}
|
||||
|
||||
if (!exaScratch.repeat)
|
||||
break;
|
||||
|
||||
opX += opWidth;
|
||||
|
||||
if (opX >= dstX + width) {
|
||||
@ -1057,10 +1391,49 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
|
||||
break;
|
||||
}
|
||||
|
||||
opWidth = ((dstX + width) - opX) > exaScratch.srcWidth ?
|
||||
exaScratch.srcWidth : (dstX + width) - opX;
|
||||
opHeight = ((dstY + height) - opY) > exaScratch.srcHeight ?
|
||||
exaScratch.srcHeight : (dstY + height) - opY;
|
||||
/* FIXME: Please add the code to handle the condition when the maskX
|
||||
* and maskY coordinate are negative or greater than
|
||||
* exaScratch.srcWidth and exaScratch.srcHeight */
|
||||
|
||||
if (exaScratch.type == COMP_TYPE_MASK) {
|
||||
opWidth = ((dstX + width) - opX) > (exaScratch.srcWidth - maskX)
|
||||
? (exaScratch.srcWidth - maskX) : (dstX + width) - opX;
|
||||
opHeight = ((dstY + height) - opY) > (exaScratch.srcHeight - maskY)
|
||||
? (exaScratch.srcHeight - maskY) : (dstY + height) - opY;
|
||||
/* All black out of the mask */
|
||||
if (!exaScratch.maskrepeat)
|
||||
exaScratch.srcColor = 0x0;
|
||||
} else {
|
||||
if (exaScratch.type == COMP_TYPE_ONEPASS) {
|
||||
if (srcX >= 0 && srcY >= 0 && (exaScratch.op == PictOpOver ||
|
||||
exaScratch.op == PictOpSrc || exaScratch.op ==
|
||||
PictOpClear)) {
|
||||
opWidth = ((dstX + width) - opX) > (exaScratch.srcWidth -
|
||||
srcX) ? (exaScratch.srcWidth - srcX) : (dstX + width)
|
||||
- opX;
|
||||
opHeight = ((dstY + height) - opY) >
|
||||
(exaScratch.srcHeight - srcY) ?
|
||||
(exaScratch.srcHeight - srcY) : (dstY + height) - opY;
|
||||
} else {
|
||||
opWidth = ((dstX + width) - opX) > exaScratch.srcWidth ?
|
||||
exaScratch.srcWidth : (dstX + width) - opX;
|
||||
opHeight = ((dstY + height) - opY) > exaScratch.srcHeight ?
|
||||
exaScratch.srcHeight : (dstY + height) - opY;
|
||||
}
|
||||
} else {
|
||||
opWidth = ((dstX + width) - opX) > (exaScratch.srcWidth - srcY)
|
||||
? (exaScratch.srcWidth - srcY) : (dstX + width) - opX;
|
||||
opHeight = ((dstY + height) - opY) > (exaScratch.srcHeight - srcX
|
||||
) ? (exaScratch.srcHeight - srcX) : (dstY + height) - opY;
|
||||
}
|
||||
/* All black out of the source */
|
||||
if (!exaScratch.repeat && (exaScratch.type == COMP_TYPE_ONEPASS)) {
|
||||
lx_composite_all_black(srcOffset, exaScratch.srcWidth,
|
||||
exaScratch.srcHeight);
|
||||
}
|
||||
if (!exaScratch.repeat && (exaScratch.type == COMP_TYPE_ROTATE))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -249,10 +249,6 @@ LXInitOffscreen(ScrnInfoPtr pScrni)
|
||||
|
||||
/* Deduct the maxmimum size of a video overlay */
|
||||
size -= 0x200000;
|
||||
|
||||
/* Deduct the probable size of a shadow buffer */
|
||||
size -= pScrni->virtualX *
|
||||
(pScrni->virtualY * (pScrni->bitsPerPixel >> 3));
|
||||
|
||||
/* Align the size to a K boundary */
|
||||
size &= ~1023;
|
||||
@ -287,7 +283,11 @@ LXInitOffscreen(ScrnInfoPtr pScrni)
|
||||
xf86DrvMsg(pScrni->scrnIndex, X_INFO, " Cursor: 0x%x bytes\n",
|
||||
LX_CURSOR_HW_WIDTH * 4 * LX_CURSOR_HW_HEIGHT);
|
||||
|
||||
if (pGeode->pExa->offScreenBase)
|
||||
if (pGeode->exaBfrSz)
|
||||
xf86DrvMsg(pScrni->scrnIndex, X_INFO, " ExaBfrSz: 0x%x bytes\n",
|
||||
pGeode->exaBfrSz);
|
||||
|
||||
if (pGeode->pExa && pGeode->pExa->offScreenBase)
|
||||
xf86DrvMsg(pScrni->scrnIndex, X_INFO, " EXA: 0x%x bytes\n",
|
||||
(unsigned int)(pGeode->pExa->memorySize -
|
||||
pGeode->pExa->offScreenBase));
|
||||
|
@ -155,15 +155,34 @@ lx_output_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
|
||||
ScrnInfoPtr pScrni = output->scrn;
|
||||
GeodeRec *pGeode = GEODEPTR(pScrni);
|
||||
|
||||
/* No scaling > for modes with > 1024 width */
|
||||
|
||||
if (pGeode->Output & OUTPUT_PANEL) {
|
||||
if ((pMode->HDisplay != pGeode->panelMode->HDisplay) &&
|
||||
pMode->HDisplay > 1024)
|
||||
return MODE_BAD;
|
||||
/* DCON Panel specific resolution - OLPC's one */
|
||||
if (pGeode->Output & (OUTPUT_PANEL | OUTPUT_DCON)) {
|
||||
if (pGeode->panelMode->HDisplay == 1200 &&
|
||||
pGeode->panelMode->VDisplay == 900)
|
||||
return MODE_OK;
|
||||
}
|
||||
|
||||
return MODE_OK;
|
||||
if (pGeode->Output & OUTPUT_PANEL &&
|
||||
gfx_is_panel_mode_supported(pGeode->panelMode->HDisplay,
|
||||
pGeode->panelMode->VDisplay,
|
||||
pMode->HDisplay,
|
||||
pMode->VDisplay,
|
||||
pScrni->bitsPerPixel) != -1) {
|
||||
|
||||
return MODE_OK;
|
||||
}
|
||||
|
||||
if (gfx_is_display_mode_supported(pMode->HDisplay,
|
||||
pMode->VDisplay,
|
||||
pScrni->bitsPerPixel,
|
||||
GeodeGetRefreshRate(pMode)) != -1) {
|
||||
return MODE_OK;
|
||||
}
|
||||
|
||||
if (pMode->type & (M_T_DRIVER | M_T_PREFERRED))
|
||||
return MODE_OK;
|
||||
|
||||
return MODE_BAD;
|
||||
}
|
||||
|
||||
static Bool
|
||||
|
@ -124,6 +124,7 @@ LXGetManualPanelMode(char *modestr)
|
||||
sprintf(sname, "%dx%d", hactive, vactive);
|
||||
|
||||
mode->name = xnfalloc(strlen(sname) + 1);
|
||||
strcpy(mode->name, sname);
|
||||
|
||||
mode->type = M_T_DRIVER | M_T_PREFERRED;
|
||||
mode->Clock = clock;
|
||||
|
@ -119,7 +119,7 @@ LXCopyFromSys(GeodeRec * pGeode, unsigned char *src, unsigned int dst,
|
||||
{
|
||||
|
||||
gp_declare_blt(0);
|
||||
gp_set_bpp(16);
|
||||
gp_set_bpp((srcPitch / w) << 3);
|
||||
|
||||
gp_set_raster_operation(0xCC);
|
||||
gp_set_strides(dstPitch, srcPitch);
|
||||
|
@ -193,7 +193,7 @@ set_Redcloud_92xx_mode_params(int mode)
|
||||
CS92xx_MODE *pMode = &FPModeParams[mode];
|
||||
unsigned long temp_data = 0;
|
||||
unsigned long base_data;
|
||||
Q_WORD msrValue;
|
||||
QQ_WORD msrValue;
|
||||
|
||||
/* on a Redcloud, we need to set up the DF pad select MSR */
|
||||
if (gfx_msr_read(RC_ID_DF, GX2_VP_MSR_PAD_SELECT, &msrValue) == FOUND) {
|
||||
|
@ -1184,7 +1184,7 @@ Z4lSetPortAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 value,
|
||||
XF86AttributePtr attr;
|
||||
struct v4l2_control ctrl;
|
||||
int i, nattrs, attrId, val;
|
||||
char *name = NameForAtom(attribute);
|
||||
const char *name = NameForAtom(attribute);
|
||||
int old_fd = pPriv->fd;
|
||||
|
||||
DBLOG(1, "Z4lSetPortAttribute(%#lx,%d) '%s'\n", (unsigned long)attribute,
|
||||
@ -1245,7 +1245,7 @@ Z4lGetPortAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 * value,
|
||||
XF86AttributePtr attr;
|
||||
struct v4l2_control ctrl;
|
||||
int i, nattrs, attrId, val;
|
||||
char *name = NameForAtom(attribute);
|
||||
const char *name = NameForAtom(attribute);
|
||||
int old_fd = pPriv->fd;
|
||||
|
||||
DBLOG(1, "Z4lGetPortAttribute(%#lx) '%s'\n",
|
||||
|
Loading…
Reference in New Issue
Block a user