summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
Diffstat (limited to 'driver')
-rw-r--r--driver/xf86-video-geode/ChangeLog103
-rw-r--r--driver/xf86-video-geode/Makefile.in7
-rw-r--r--driver/xf86-video-geode/aclocal.m4412
-rwxr-xr-xdriver/xf86-video-geode/configure423
-rw-r--r--driver/xf86-video-geode/configure.ac2
-rw-r--r--driver/xf86-video-geode/src/Makefile.in7
-rw-r--r--driver/xf86-video-geode/src/cim/cim_df.c8
-rw-r--r--driver/xf86-video-geode/src/cim/cim_vg.c3
-rw-r--r--driver/xf86-video-geode/src/geode.h2
-rw-r--r--driver/xf86-video-geode/src/gx_randr.c11
-rw-r--r--driver/xf86-video-geode/src/lx_display.c6
-rw-r--r--driver/xf86-video-geode/src/lx_driver.c2
-rw-r--r--driver/xf86-video-geode/src/lx_output.c4
-rw-r--r--driver/xf86-video-geode/src/lx_panel.c16
-rw-r--r--driver/xf86-video-geode/src/lx_video.c5
-rw-r--r--driver/xf86-video-geode/src/z4l.c1
16 files changed, 773 insertions, 239 deletions
diff --git a/driver/xf86-video-geode/ChangeLog b/driver/xf86-video-geode/ChangeLog
index b0047b2ab..092534905 100644
--- a/driver/xf86-video-geode/ChangeLog
+++ b/driver/xf86-video-geode/ChangeLog
@@ -1,3 +1,106 @@
+commit 1a23956758d17a8b4c1d8acebf8acc94358c37b9
+Author: Martin-Éric Racine <martin-eric.racine@iki.fi>
+Date: Sun Feb 13 21:52:55 2011 +0200
+
+ Geode 2.11.12
+
+commit 30d46e6c28479e07ac8328b6f4dfc2692eb1ac6d
+Author: Martin-Éric Racine <martin-eric.racine@iki.fi>
+Date: Mon Feb 7 00:04:06 2011 +0000
+
+ Stop including "linux/videodev.h" in z4l.c
+ V4L1 support was dropped as of Linux kernel 2.6.38
+
+commit 509f6085ce7747d76f638a7a30170c437b296a40
+Author: Daniel Drake <dsd@laptop.org>
+Date: Sun Feb 6 20:22:01 2011 +0000
+
+ Fix packed overlay offscreen allocations
+
+ Commit 5e72a00ad2 caused packed video data to corrupt glyphs and other
+ parts of the screen, but it turns out that the commit actually at fault
+ was d681a844e, incorrectly changing the size of the allocated destination
+ memory from the number of bytes needed to the number of lines needed.
+
+ While fixing this, I noticed that LXAllocateSurface is probably making the
+ same mistake, and that the height is probably not calculated correctly for
+ some corner cases when calling LXCopyFromSys in the packed
+ video path (but I'm not sure about either).
+
+ Fixes https://bugs.freedesktop.org/show_bug.cgi?id=33004
+
+commit 66c375d2a1d1eadb38d2cbfe2d08cfec20213cb4
+Author: Martin-Éric Racine <q-funk@iki.fi>
+Date: Mon Dec 27 15:20:38 2010 +0200
+
+ Geode 2.11.11
+
+commit b9a5a86a402832fe699e43b3030932b50ae821a0
+Author: Priit Laes <plaes@plaes.org>
+Date: Wed Dec 15 03:54:13 2010 +0200
+
+ Restoring compatibility down to X server 1.4
+
+ Signed-off-by: Priit Laes <plaes@plaes.org>
+
+commit bae443bb46c81702a57d4914b7e56f17e5aa1f3a
+Author: Daniel Drake <dsd@laptop.org>
+Date: Tue Nov 30 20:31:49 2010 +0000
+
+ Improve handling of gamma correction in video vs graphics
+
+ The LX is a bit odd in that the palette can be used for gamma correction
+ of graphics data, or video data, but not both at the same time.
+
+ Right now, during X startup, X sets gamma correction (but without any
+ actual correction) causing the Geode driver to start using the palette
+ for graphics gamma correction. (this is just momentary)
+
+ Later on during startup, vg_set_custom_mode() switches to using the
+ palette for video gamma correction, and this is the end result.
+
+ If you later use xrandr to change the gamma, the palette starts being used
+ for graphics again.
+
+ If you VT switch, vg_set_custom_mode (momentarily) starts using the palette
+ for video, but then X jumps in with a gamma callback causing it to be used
+ for graphics again.
+
+ End result: no user visible bug, but this is inconsistent.
+ As there is no exposed mechanism for changing video gamma I suggest
+ we just drop that bit from vg_set_custom_mode(). Then the inconsistency
+ goes away.
+
+ Downside: this now becomes dependent on X setting gamma during startup.
+ I don't know when this was introduced but I think it is recent.
+
+ Aditionally, I think I found a (harmless) bug in
+ df_set_video_palette_entry, it doesn't do what the comments say.
+
+commit 5873bfa48f1c090d224adbc7ca7df3ebea0b198f
+Author: Priit Laes <plaes@plaes.org>
+Date: Sun Dec 12 16:17:24 2010 +0200
+
+ Fix compilation under xorg >1.9.99
+
+ Signed-off-by: Priit Laes <plaes@plaes.org>
+
+commit 1d8d02d64e9f5d5dd3788b3b9b1b25866c2ed6b5
+Author: Martin-Éric Racine <q-funk@iki.fi>
+Date: Fri Nov 19 17:24:35 2010 +0200
+
+ LX Panel: lower the 1024x600 refresh rate down to 60Hz.
+
+ NOTE: the eCafe EC-800's panel doesn't support a higher refresh rate.
+
+commit 256356912bbc1d1e65db5c3c03c6ae25883a81fb
+Author: Frank Huang <frankr.huang@amd.com>
+Date: Fri Nov 19 10:28:31 2010 +0800
+
+ Print the panel mode BIOS uses
+
+ Signed-off-by: Frank Huang<frankr.huang@amd.com>
+
commit 50f9152e2087fd50dfc09e35505c2fbcdd3183b0
Author: Martin-Éric Racine <q-funk@iki.fi>
Date: Tue Nov 9 11:12:44 2010 +0200
diff --git a/driver/xf86-video-geode/Makefile.in b/driver/xf86-video-geode/Makefile.in
index 5c9e786fd..f0d814168 100644
--- a/driver/xf86-video-geode/Makefile.in
+++ b/driver/xf86-video-geode/Makefile.in
@@ -42,9 +42,9 @@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
+install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
+install_sh_PROGRAM = ${SHELL} $(install_sh) -c
+install_sh_SCRIPT = ${SHELL} $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
@@ -177,6 +177,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
XEXT_CFLAGS = @XEXT_CFLAGS@
diff --git a/driver/xf86-video-geode/aclocal.m4 b/driver/xf86-video-geode/aclocal.m4
index 089602f57..3a45bcd1c 100644
--- a/driver/xf86-video-geode/aclocal.m4
+++ b/driver/xf86-video-geode/aclocal.m4
@@ -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.11.0])
+m4_define([vers_have], [1.15.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,,
@@ -7718,7 +7718,7 @@ AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
# which is not the best choice for supporting other OS'es, but covers most
# of the ones we need for now.
AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
+AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
AC_MSG_RESULT([no])
else
@@ -7736,7 +7736,7 @@ fi
rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve "whitespace"?])
+AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
AC_MSG_RESULT([no])
else
@@ -8086,6 +8086,123 @@ AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
]) # XORG_WITH_XMLTO
+# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
+# --------------------------------------------
+# Minimum version: 1.12.0
+# Minimum version for optional DEFAULT argument: 1.12.0
+#
+# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
+# XML-based language used for the transformation of XML documents.
+# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
+# It is used under the cover by xmlto to generate html files from DocBook/XML.
+# The XSLT processor is often used as a standalone tool for transformations.
+# It should not be assumed that this tool is used only to work with documnetation.
+# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
+#
+# Interface to module:
+# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
+# XSLTPROC: returns the path of the xsltproc program found
+# returns the path set by the user in the environment
+# --with-xsltproc: 'yes' user instructs the module to use xsltproc
+# 'no' user instructs the module not to use xsltproc
+# have_xsltproc: returns yes if xsltproc found in PATH or no
+#
+# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XSLTPROC],[
+AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
+# Preserves the interface, should it be implemented later
+m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(xsltproc,
+ AS_HELP_STRING([--with-xsltproc],
+ [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
+ [use_xsltproc=$withval], [use_xsltproc=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_xsltproc" = x"auto"; then
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test "x$XSLTPROC" = "x"; then
+ AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
+ have_xsltproc=no
+ else
+ have_xsltproc=yes
+ fi
+elif test "x$use_xsltproc" = x"yes" ; then
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test "x$XSLTPROC" = "x"; then
+ AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
+ fi
+ have_xsltproc=yes
+elif test "x$use_xsltproc" = x"no" ; then
+ if test "x$XSLTPROC" != "x"; then
+ AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
+ fi
+ have_xsltproc=no
+else
+ AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
+fi
+
+AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
+]) # XORG_WITH_XSLTPROC
+
+# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
+# ----------------------------------------
+# Minimum version: 1.15.0
+#
+# PERL (Practical Extraction and Report Language) is a language optimized for
+# scanning arbitrary text files, extracting information from those text files,
+# and printing reports based on that information.
+#
+# When DEFAULT is not specified, --with-perl assumes 'auto'.
+#
+# Interface to module:
+# HAVE_PERL: used in makefiles to conditionally scan text files
+# PERL: returns the path of the perl program found
+# returns the path set by the user in the environment
+# --with-perl: 'yes' user instructs the module to use perl
+# 'no' user instructs the module not to use perl
+# have_perl: returns yes if perl found in PATH or no
+#
+# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PERL],[
+AC_ARG_VAR([PERL], [Path to perl command])
+# Preserves the interface, should it be implemented later
+m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(perl,
+ AS_HELP_STRING([--with-perl],
+ [Use perl for extracting information from files (default: ]_defopt[)]),
+ [use_perl=$withval], [use_perl=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_perl" = x"auto"; then
+ AC_PATH_PROG([PERL], [perl])
+ if test "x$PERL" = "x"; then
+ AC_MSG_WARN([perl not found - cannot extract information and report])
+ have_perl=no
+ else
+ have_perl=yes
+ fi
+elif test "x$use_perl" = x"yes" ; then
+ AC_PATH_PROG([PERL], [perl])
+ if test "x$PERL" = "x"; then
+ AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
+ fi
+ have_perl=yes
+elif test "x$use_perl" = x"no" ; then
+ if test "x$PERL" != "x"; then
+ AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
+ fi
+ have_perl=no
+else
+ AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
+fi
+
+AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
+]) # XORG_WITH_PERL
+
# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
# ----------------
# Minimum version: 1.5.0
@@ -8331,10 +8448,11 @@ 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([DEFAULT])
-# ----------------
+# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
+# ---------------------------------------
# Minimum version: 1.6.0
# Minimum version for optional DEFAULT argument: 1.11.0
+# Minimum version for optional MIN-VERSION argument: 1.15.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
@@ -8354,7 +8472,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
#
AC_DEFUN([XORG_WITH_FOP],[
AC_ARG_VAR([FOP], [Path to fop command])
-m4_define([_defopt], m4_default([$1], [auto]))
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(fop,
AS_HELP_STRING([--with-fop],
[Use fop to regenerate documentation (default: ]_defopt[)]),
@@ -8383,6 +8501,22 @@ elif test "x$use_fop" = x"no" ; then
else
AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
fi
+
+# Test for a minimum version of fop, if provided.
+m4_ifval([$1],
+[if test "$have_fop" = yes; then
+ # scrape the fop version
+ AC_MSG_CHECKING([for fop minimum version])
+ fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
+ AC_MSG_RESULT([$fop_version])
+ AS_VERSION_COMPARE([$fop_version], [$1],
+ [if test "x$use_fop" = xauto; then
+ AC_MSG_WARN([fop version $fop_version found, but $1 needed])
+ have_fop=no
+ else
+ AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
+ fi])
+fi])
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
]) # XORG_WITH_FOP
@@ -8465,12 +8599,12 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DOCS],[
-m4_define([default], m4_default([$1], [yes]))
+m4_define([docs_default], m4_default([$1], [yes]))
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],
- [Enable building the documentation (default: ]default[)]),
- [build_docs=$enableval], [build_docs=]default)
-m4_undefine([default])
+ [Enable building the documentation (default: ]docs_default[)]),
+ [build_docs=$enableval], [build_docs=]docs_default)
+m4_undefine([docs_default])
AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
AC_MSG_CHECKING([whether to build documentation])
AC_MSG_RESULT([$build_docs])
@@ -8542,6 +8676,194 @@ AC_MSG_CHECKING([whether to build functional specifications])
AC_MSG_RESULT([$build_specs])
]) # XORG_ENABLE_SPECS
+# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
+# ----------------------------------------------
+# Minimum version: 1.13.0
+#
+# This macro enables a builder to enable/disable unit testing
+# It makes no assumption about the test cases implementation
+# Test cases may or may not use Automake "Support for test suites"
+# They may or may not use the software utility library GLib
+#
+# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
+# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
+# The variable enable_unit_tests is used by other macros in this file.
+#
+# Interface to module:
+# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests
+# enable_unit_tests: used in configure.ac for additional configuration
+# --enable-unit-tests: 'yes' user instructs the module to build tests
+# 'no' user instructs the module not to build tests
+# parm1: specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
+AC_BEFORE([$0], [XORG_WITH_GLIB])
+AC_BEFORE([$0], [XORG_LD_WRAP])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
+ [Enable building unit test cases (default: ]_defopt[)]),
+ [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
+m4_undefine([_defopt])
+AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
+AC_MSG_CHECKING([whether to build unit test cases])
+AC_MSG_RESULT([$enable_unit_tests])
+]) # XORG_ENABLE_UNIT_TESTS
+
+# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
+# ----------------------------------------
+# Minimum version: 1.13.0
+#
+# GLib is a library which provides advanced data structures and functions.
+# This macro enables a module to test for the presence of Glib.
+#
+# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
+# Otherwise the value of $enable_unit_tests is blank.
+#
+# Interface to module:
+# HAVE_GLIB: used in makefiles to conditionally build targets
+# with_glib: used in configure.ac to know if GLib has been found
+# --with-glib: 'yes' user instructs the module to use glib
+# 'no' user instructs the module not to use glib
+#
+AC_DEFUN([XORG_WITH_GLIB],[
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
+ [Use GLib library for unit testing (default: ]_defopt[)]),
+ [with_glib=$withval], [with_glib=]_defopt)
+m4_undefine([_defopt])
+
+have_glib=no
+# Do not probe GLib if user explicitly disabled unit testing
+if test "x$enable_unit_tests" != x"no"; then
+ # Do not probe GLib if user explicitly disabled it
+ if test "x$with_glib" != x"no"; then
+ m4_ifval(
+ [$1],
+ [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
+ [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
+ )
+ fi
+fi
+
+# Not having GLib when unit testing has been explicitly requested is an error
+if test "x$enable_unit_tests" = x"yes"; then
+ if test "x$have_glib" = x"no"; then
+ AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
+ fi
+fi
+
+# Having unit testing disabled when GLib has been explicitly requested is an error
+if test "x$enable_unit_tests" = x"no"; then
+ if test "x$with_glib" = x"yes"; then
+ AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
+ fi
+fi
+
+# Not having GLib when it has been explicitly requested is an error
+if test "x$with_glib" = x"yes"; then
+ if test "x$have_glib" = x"no"; then
+ AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
+ fi
+fi
+
+AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
+]) # XORG_WITH_GLIB
+
+# XORG_LD_WRAP
+# ------------
+# Minimum version: 1.13.0
+#
+# Check if linker supports -wrap, passed via compiler flags
+#
+# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
+# Otherwise the value of $enable_unit_tests is blank.
+#
+AC_DEFUN([XORG_LD_WRAP],[
+XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no])
+# Not having ld wrap when unit testing has been explicitly requested is an error
+if test "x$enable_unit_tests" = x"yes"; then
+ if test "x$have_ld_wrap" = x"no"; then
+ AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
+ fi
+fi
+AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
+#
+]) # XORG_LD_WRAP
+
+# XORG_CHECK_LINKER_FLAGS
+# -----------------------
+# SYNOPSIS
+#
+# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
+#
+# DESCRIPTION
+#
+# Check whether the given linker FLAGS work with the current language's
+# linker, or whether they give an error.
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# NOTE: Based on AX_CHECK_COMPILER_FLAGS.
+#
+# LICENSE
+#
+# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
+# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2009 Matteo Frigo
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.#
+AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
+[AC_MSG_CHECKING([whether the linker accepts $1])
+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
+AS_LITERAL_IF([$1],
+ [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
+ ax_save_FLAGS=$LDFLAGS
+ LDFLAGS="$1"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
+ AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
+ LDFLAGS=$ax_save_FLAGS])],
+ [ax_save_FLAGS=$LDFLAGS
+ LDFLAGS="$1"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
+ eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
+ LDFLAGS=$ax_save_FLAGS])
+eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
+AC_MSG_RESULT($xorg_check_linker_flags)
+if test "x$xorg_check_linker_flags" = xyes; then
+ m4_default([$2], :)
+else
+ m4_default([$3], :)
+fi
+]) # XORG_CHECK_LINKER_FLAGS
+
# XORG_CHECK_MALLOC_ZERO
# ----------------------
# Minimum version: 1.0.0
@@ -8558,18 +8880,16 @@ AC_ARG_ENABLE(malloc0returnsnull,
AC_MSG_CHECKING([whether malloc(0) returns NULL])
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
- AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([
+#include <stdlib.h>
+],[
char *m0, *r0, *c0, *p;
m0 = malloc(0);
p = malloc(10);
r0 = realloc(p,0);
- c0 = calloc(0);
- exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
+ c0 = calloc(0,10);
+ exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
+])],
[MALLOC_ZERO_RETURNS_NULL=yes],
[MALLOC_ZERO_RETURNS_NULL=no],
[MALLOC_ZERO_RETURNS_NULL=yes])
@@ -8695,6 +9015,23 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
]) # XORG_LINT_LIBRARY
+# XORG_COMPILER_BRAND
+# -------------------
+# Minimum version: 1.14.0
+#
+# Checks for various brands of compilers and sets flags as appropriate:
+# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
+# clang compiler - sets CLANGCC to "yes"
+# Intel compiler - sets INTELCC to "yes"
+# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
+#
+AC_DEFUN([XORG_COMPILER_BRAND], [
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
+AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+]) # XORG_COMPILER_BRAND
+
# XORG_CWARNFLAGS
# ---------------
# Minimum version: 1.2.0
@@ -8703,6 +9040,7 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
#
AC_DEFUN([XORG_CWARNFLAGS], [
AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_COMPILER_BRAND])
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
@@ -8713,7 +9051,6 @@ if test "x$GCC" = xyes ; then
;;
esac
else
- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
if test "x$SUNCC" = "xyes"; then
CWARNFLAGS="-v"
fi
@@ -8725,28 +9062,43 @@ AC_SUBST(CWARNFLAGS)
# -----------------------
# Minimum version: 1.3.0
#
-# Add configure option to enable strict compilation
+# Add configure option to enable strict compilation flags, such as treating
+# warnings as fatal errors.
+# If --enable-strict-compilation is passed to configure, adds strict flags to
+# $CWARNFLAGS.
+#
+# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
+# when strict compilation is unconditionally desired.
AC_DEFUN([XORG_STRICT_OPTION], [
# 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_COMPILER_BRAND])
AC_REQUIRE([XORG_CWARNFLAGS])
AC_ARG_ENABLE(strict-compilation,
AS_HELP_STRING([--enable-strict-compilation],
[Enable all warnings from compiler and make them errors (default: disabled)]),
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$GCC" = xyes ; then
+ STRICT_CFLAGS="-pedantic -Werror"
+ # Add -Werror=attributes if supported (gcc 4.2 & later)
+ AC_MSG_CHECKING([if $CC supports -Werror=attributes])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([return 0;])],
+ [STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+ CFLAGS="$save_CFLAGS"
+elif test "x$SUNCC" = "xyes"; then
+ STRICT_CFLAGS="-errwarn"
+elif test "x$INTELCC" = "xyes"; then
+ STRICT_CFLAGS="-Werror"
+fi
if test "x$STRICT_COMPILE" = "xyes"; then
- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
- AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
- if test "x$GCC" = xyes ; then
- STRICT_CFLAGS="-pedantic -Werror"
- elif test "x$SUNCC" = "xyes"; then
- STRICT_CFLAGS="-errwarn"
- elif test "x$INTELCC" = "xyes"; then
- STRICT_CFLAGS="-Werror"
- fi
+ CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([STRICT_CFLAGS])
AC_SUBST([CWARNFLAGS])
]) # XORG_STRICT_OPTION
diff --git a/driver/xf86-video-geode/configure b/driver/xf86-video-geode/configure
index 5d2452500..cdc5dbf87 100755
--- a/driver/xf86-video-geode/configure
+++ b/driver/xf86-video-geode/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for xf86-video-geode 2.11.10.
+# Generated by GNU Autoconf 2.62 for xf86-video-geode 2.11.12.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode>.
#
@@ -750,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='xf86-video-geode'
PACKAGE_TARNAME='xf86-video-geode'
-PACKAGE_VERSION='2.11.10'
-PACKAGE_STRING='xf86-video-geode 2.11.10'
+PACKAGE_VERSION='2.11.12'
+PACKAGE_STRING='xf86-video-geode 2.11.12'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode'
ac_unique_file="Makefile.am"
@@ -842,6 +842,7 @@ CPP
GREP
EGREP
CWARNFLAGS
+STRICT_CFLAGS
CHANGELOG_CMD
PKG_CONFIG
INSTALL_CMD
@@ -1527,7 +1528,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xf86-video-geode 2.11.10 to adapt to many kinds of systems.
+\`configure' configures xf86-video-geode 2.11.12 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1598,7 +1599,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xf86-video-geode 2.11.10:";;
+ short | recursive ) echo "Configuration of xf86-video-geode 2.11.12:";;
esac
cat <<\_ACEOF
@@ -1725,7 +1726,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xf86-video-geode configure 2.11.10
+xf86-video-geode configure 2.11.12
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1739,7 +1740,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xf86-video-geode $as_me 2.11.10, which was
+It was created by xf86-video-geode $as_me 2.11.12, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -4001,6 +4002,186 @@ done
+{ $as_echo "$as_me:$LINENO: checking whether __clang__ is declared" >&5
+$as_echo_n "checking whether __clang__ is declared... " >&6; }
+if test "${ac_cv_have_decl___clang__+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef __clang__
+ (void) __clang__;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl___clang__=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl___clang__=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___clang__" >&5
+$as_echo "$ac_cv_have_decl___clang__" >&6; }
+if test $ac_cv_have_decl___clang__ = yes; then
+ CLANGCC="yes"
+else
+ CLANGCC="no"
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5
+$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; }
+if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef __INTEL_COMPILER
+ (void) __INTEL_COMPILER;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl___INTEL_COMPILER=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl___INTEL_COMPILER=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5
+$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; }
+if test $ac_cv_have_decl___INTEL_COMPILER = yes; then
+ INTELCC="yes"
+else
+ INTELCC="no"
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
+$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
+if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef __SUNPRO_C
+ (void) __SUNPRO_C;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl___SUNPRO_C=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl___SUNPRO_C=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
+$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
+if test $ac_cv_have_decl___SUNPRO_C = yes; then
+ SUNCC="yes"
+else
+ SUNCC="no"
+fi
+
+
+
+
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
@@ -4277,6 +4458,7 @@ $as_echo "$ac_cv_path_SED" >&6; }
+
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
@@ -4287,65 +4469,6 @@ if test "x$GCC" = xyes ; then
;;
esac
else
- { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
-$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
-if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __SUNPRO_C
- (void) __SUNPRO_C;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_have_decl___SUNPRO_C=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_have_decl___SUNPRO_C=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
-$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
-if test $ac_cv_have_decl___SUNPRO_C = yes; then
- SUNCC="yes"
-else
- SUNCC="no"
-fi
-
if test "x$SUNCC" = "xyes"; then
CWARNFLAGS="-v"
fi
@@ -4357,6 +4480,7 @@ fi
+
# Check whether --enable-strict-compilation was given.
if test "${enable_strict_compilation+set}" = set; then
enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
@@ -4364,88 +4488,20 @@ else
STRICT_COMPILE=no
fi
-if test "x$STRICT_COMPILE" = "xyes"; then
- { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
-$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
-if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
+if test "x$GCC" = xyes ; then
+ STRICT_CFLAGS="-pedantic -Werror"
+ # Add -Werror=attributes if supported (gcc 4.2 & later)
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=attributes" >&5
+$as_echo_n "checking if $CC supports -Werror=attributes... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __SUNPRO_C
- (void) __SUNPRO_C;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_have_decl___SUNPRO_C=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_have_decl___SUNPRO_C=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
-$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
-if test $ac_cv_have_decl___SUNPRO_C = yes; then
- SUNCC="yes"
-else
- SUNCC="no"
-fi
-
- { $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5
-$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; }
-if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __INTEL_COMPILER
- (void) __INTEL_COMPILER;
-#endif
-
- ;
- return 0;
-}
+return 0;
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
@@ -4465,33 +4521,28 @@ $as_echo "$ac_try_echo") >&5
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_have_decl___INTEL_COMPILER=yes
+ STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_decl___INTEL_COMPILER=no
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$save_CFLAGS"
+elif test "x$SUNCC" = "xyes"; then
+ STRICT_CFLAGS="-errwarn"
+elif test "x$INTELCC" = "xyes"; then
+ STRICT_CFLAGS="-Werror"
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5
-$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; }
-if test $ac_cv_have_decl___INTEL_COMPILER = yes; then
- INTELCC="yes"
-else
- INTELCC="no"
+if test "x$STRICT_COMPILE" = "xyes"; then
+ CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
fi
- if test "x$GCC" = xyes ; then
- STRICT_CFLAGS="-pedantic -Werror"
- elif test "x$SUNCC" = "xyes"; then
- STRICT_CFLAGS="-errwarn"
- elif test "x$INTELCC" = "xyes"; then
- STRICT_CFLAGS="-Werror"
- fi
-fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
@@ -4853,7 +4904,7 @@ fi
# Define the identity of the package.
PACKAGE='xf86-video-geode'
- VERSION='2.11.10'
+ VERSION='2.11.12'
cat >>confdefs.h <<_ACEOF
@@ -5698,7 +5749,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5701 "configure"' > conftest.$ac_ext
+ echo '#line 5752 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -8321,11 +8372,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8324: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8375: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8328: \$? = $ac_status" >&5
+ echo "$as_me:8379: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8611,11 +8662,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8614: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8665: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8618: \$? = $ac_status" >&5
+ echo "$as_me:8669: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8715,11 +8766,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8718: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8769: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8722: \$? = $ac_status" >&5
+ echo "$as_me:8773: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11115,7 +11166,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11118 "configure"
+#line 11169 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11215,7 +11266,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11218 "configure"
+#line 11269 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13624,11 +13675,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13627: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13678: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13631: \$? = $ac_status" >&5
+ echo "$as_me:13682: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13728,11 +13779,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13731: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13782: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13735: \$? = $ac_status" >&5
+ echo "$as_me:13786: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15311,11 +15362,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15314: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15365: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15318: \$? = $ac_status" >&5
+ echo "$as_me:15369: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15415,11 +15466,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15418: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15469: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15422: \$? = $ac_status" >&5
+ echo "$as_me:15473: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17630,11 +17681,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17633: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17684: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17637: \$? = $ac_status" >&5
+ echo "$as_me:17688: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -17920,11 +17971,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17923: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17974: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17927: \$? = $ac_status" >&5
+ echo "$as_me:17978: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -18024,11 +18075,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18027: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18078: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:18031: \$? = $ac_status" >&5
+ echo "$as_me:18082: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -22948,7 +22999,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xf86-video-geode $as_me 2.11.10, which was
+This file was extended by xf86-video-geode $as_me 2.11.12, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23001,7 +23052,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-xf86-video-geode config.status 2.11.10
+xf86-video-geode config.status 2.11.12
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/driver/xf86-video-geode/configure.ac b/driver/xf86-video-geode/configure.ac
index 9f0771c8a..483caff88 100644
--- a/driver/xf86-video-geode/configure.ac
+++ b/driver/xf86-video-geode/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.59)
AC_INIT([xf86-video-geode],
- [2.11.10],
+ [2.11.12],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode],
[xf86-video-geode],
[http://www.x.org/wiki/GeodeDriver])
diff --git a/driver/xf86-video-geode/src/Makefile.in b/driver/xf86-video-geode/src/Makefile.in
index 9fed16cd6..0af5996cd 100644
--- a/driver/xf86-video-geode/src/Makefile.in
+++ b/driver/xf86-video-geode/src/Makefile.in
@@ -49,9 +49,9 @@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
+install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
+install_sh_PROGRAM = ${SHELL} $(install_sh) -c
+install_sh_SCRIPT = ${SHELL} $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
@@ -190,6 +190,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
XEXT_CFLAGS = @XEXT_CFLAGS@
diff --git a/driver/xf86-video-geode/src/cim/cim_df.c b/driver/xf86-video-geode/src/cim/cim_df.c
index 676ef3c40..f81b74004 100644
--- a/driver/xf86-video-geode/src/cim/cim_df.c
+++ b/driver/xf86-video-geode/src/cim/cim_df.c
@@ -983,11 +983,15 @@ df_set_video_palette_entry(unsigned long index, unsigned long palette)
/* Ensure that the Graphic data passes through the Gamma
* Correction RAM
+ *
+ * XXX is this a bug? perhaps it should be setting the bit so that video
+ * data is routed, according to the description above.
+ * it also mismatches df_set_video_palette().
*/
dcfg &= ~DF_DCFG_GV_PAL_BYP;
- /* The graphics and video data are passed through gamma
- * correction RAM
+ /* Unset the "bypass both" bit to make sure the above selection (gfx/video
+ * data through gamma correction RAM) takes effect.
*/
misc &= ~DF_GAMMA_BYPASS_BOTH;
diff --git a/driver/xf86-video-geode/src/cim/cim_vg.c b/driver/xf86-video-geode/src/cim/cim_vg.c
index 6a8ea4973..ff24221b0 100644
--- a/driver/xf86-video-geode/src/cim/cim_vg.c
+++ b/driver/xf86-video-geode/src/cim/cim_vg.c
@@ -1002,8 +1002,7 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp)
temp &= ~(DF_DCFG_CRT_SYNC_SKW_MASK | DF_DCFG_PWR_SEQ_DLY_MASK |
DF_DCFG_CRT_HSYNC_POL | DF_DCFG_CRT_VSYNC_POL);
- temp |= (DF_DCFG_CRT_SYNC_SKW_INIT |
- DF_DCFG_PWR_SEQ_DLY_INIT | DF_DCFG_GV_PAL_BYP);
+ temp |= DF_DCFG_CRT_SYNC_SKW_INIT | DF_DCFG_PWR_SEQ_DLY_INIT;
if (mode_params->flags & VG_MODEFLAG_NEG_HSYNC)
temp |= DF_DCFG_CRT_HSYNC_POL;
diff --git a/driver/xf86-video-geode/src/geode.h b/driver/xf86-video-geode/src/geode.h
index ad94a026f..ebf8abb9b 100644
--- a/driver/xf86-video-geode/src/geode.h
+++ b/driver/xf86-video-geode/src/geode.h
@@ -454,7 +454,7 @@ void LXInitVideo(ScreenPtr pScrn);
void LXSetupOutput(ScrnInfoPtr);
/* lx_panel.c */
-DisplayModePtr LXGetLegacyPanelMode(void);
+DisplayModePtr LXGetLegacyPanelMode(ScrnInfoPtr pScrni);
DisplayModePtr LXGetManualPanelMode(char *modestr);
void LXAdjustFrame(int scrnIndex, int x, int y, int flags);
diff --git a/driver/xf86-video-geode/src/gx_randr.c b/driver/xf86-video-geode/src/gx_randr.c
index 719337163..453d43720 100644
--- a/driver/xf86-video-geode/src/gx_randr.c
+++ b/driver/xf86-video-geode/src/gx_randr.c
@@ -26,7 +26,12 @@
* software without specific prior written permission.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xf86.h"
+#include "xf86Modes.h"
#include "os.h"
#include "globals.h"
#include "xf86.h"
@@ -171,7 +176,9 @@ GXRandRSetMode(ScreenPtr pScreen,
#endif
DisplayModePtr currentMode = NULL;
Bool ret = TRUE;
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,9,99,1,0)
PixmapPtr pspix = NULL;
+ #endif
if (pRoot)
(*pScrni->EnableDisableFBAccess) (pScreen->myNum, FALSE);
@@ -210,16 +217,16 @@ GXRandRSetMode(ScreenPtr pScreen,
pScrni->currentMode = currentMode;
}
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,9,99,1,0)
/*
* Get the new Screen pixmap ptr as SwitchMode might have called
* ModifyPixmapHeader and xf86EnableDisableFBAccess will put it back...
* Unfortunately.
-
*/
-
pspix = (*pScreen->GetScreenPixmap) (pScreen);
if (pspix->devPrivate.ptr)
pScrni->pixmapPrivate = pspix->devPrivate;
+#endif
xf86ReconfigureLayout();
diff --git a/driver/xf86-video-geode/src/lx_display.c b/driver/xf86-video-geode/src/lx_display.c
index d34a25f7a..ca6fed156 100644
--- a/driver/xf86-video-geode/src/lx_display.c
+++ b/driver/xf86-video-geode/src/lx_display.c
@@ -389,7 +389,13 @@ lx_create_bo_pixmap(ScreenPtr pScreen,
{
PixmapPtr pixmap;
+
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,5,0,0,0)
pixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth, 0);
+#else
+ pixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth);
+#endif
+
if (!pixmap)
return NULL;
if (!(*pScreen->ModifyPixmapHeader)(pixmap, width, height,
diff --git a/driver/xf86-video-geode/src/lx_driver.c b/driver/xf86-video-geode/src/lx_driver.c
index 0fcd51e3d..477939ddc 100644
--- a/driver/xf86-video-geode/src/lx_driver.c
+++ b/driver/xf86-video-geode/src/lx_driver.c
@@ -452,7 +452,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
pGeode->panelMode = LXGetManualPanelMode(pmode);
if (pGeode->panelMode == NULL)
- pGeode->panelMode = LXGetLegacyPanelMode();
+ pGeode->panelMode = LXGetLegacyPanelMode(pScrni);
if (pGeode->panelMode == NULL)
pGeode->Output &= ~OUTPUT_PANEL;
diff --git a/driver/xf86-video-geode/src/lx_output.c b/driver/xf86-video-geode/src/lx_output.c
index cd1809b1c..6e36426ba 100644
--- a/driver/xf86-video-geode/src/lx_output.c
+++ b/driver/xf86-video-geode/src/lx_output.c
@@ -247,10 +247,12 @@ lx_output_destroy(xf86OutputPtr output)
output->driver_private = NULL;
}
+#ifdef RANDR_GET_CRTC_INTERFACE
static xf86CrtcPtr lx_output_get_crtc(xf86OutputPtr output)
{
return output->crtc;
}
+#endif
static const xf86OutputFuncsRec lx_output_funcs = {
@@ -265,7 +267,9 @@ static const xf86OutputFuncsRec lx_output_funcs = {
.commit = lx_output_commit,
.detect = lx_output_detect,
.get_modes = lx_output_get_modes,
+#ifdef RANDR_GET_CRTC_INTERFACE
.get_crtc = lx_output_get_crtc,
+#endif
.set_property = lx_output_set_property,
.destroy = lx_output_destroy,
};
diff --git a/driver/xf86-video-geode/src/lx_panel.c b/driver/xf86-video-geode/src/lx_panel.c
index 6832fec53..95cf0b344 100644
--- a/driver/xf86-video-geode/src/lx_panel.c
+++ b/driver/xf86-video-geode/src/lx_panel.c
@@ -69,19 +69,18 @@ DisplayModeRec lx_panel_modes[] = {
{MODEPREFIX, 162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
V_NHSYNC | V_NVSYNC, MODESUFFIX}
, /* 1600x1200@60 */
- {MODEPREFIX, 67630, 1024, 1080, 1184, 1344, 0, 600, 601, 604, 629, 0,
- V_NHSYNC | V_NVSYNC, MODESUFFIX}
- , /* 1024x600@80 */
+ {MODEPREFIX, 48960, 1024, 1064, 1168, 1312, 0, 600, 601, 604, 622, 0,
+ V_NHSYNC | V_NVSYNC, MODESUFFIX}
+ , /* 1024x600@60 wide panels */
};
/* Get the legacy panel size from VSA, and return the associated mode rec */
DisplayModePtr
-LXGetLegacyPanelMode(void)
+LXGetLegacyPanelMode(ScrnInfoPtr pScrni)
{
unsigned short reg = LX_READ_VG(0x00);
unsigned char ret = (reg >> 8) & 0x07;
-
if ((ret == 1 || ret == 5)) {
reg = LX_READ_VG(0x02);
@@ -94,8 +93,13 @@ LXGetLegacyPanelMode(void)
* The user can use this entry for other wide screen resolutions.
*/
- if (ret < 8)
+ if (ret < 8) {
+ xf86DrvMsg(pScrni->scrnIndex, X_INFO,
+ " VSA Panel Mode is: %dx%d, pixel clock freq(kHz) is %d\n",
+ lx_panel_modes[ret].HDisplay, lx_panel_modes[ret].VDisplay,
+ lx_panel_modes[ret].Clock);
return &lx_panel_modes[ret];
+ }
}
diff --git a/driver/xf86-video-geode/src/lx_video.c b/driver/xf86-video-geode/src/lx_video.c
index 7b51c5b69..35e3ffa68 100644
--- a/driver/xf86-video-geode/src/lx_video.c
+++ b/driver/xf86-video-geode/src/lx_video.c
@@ -302,7 +302,7 @@ LXCopyPacked(ScrnInfoPtr pScrni, int id, unsigned char *buf,
lines = ((dstPitch * height) + pGeode->Pitch - 1) / pGeode->Pitch;
- if (LXAllocateVidMem(pScrni, pPriv, lines) == FALSE) {
+ if (LXAllocateVidMem(pScrni, pPriv, dstPitch * height) == FALSE) {
ErrorF("Error allocating an offscreen Packed region.\n");
return FALSE;
}
@@ -334,6 +334,7 @@ LXCopyPacked(ScrnInfoPtr pScrni, int id, unsigned char *buf,
GeodeCopyGreyscale(buf + srcOffset, pGeode->FBBase + dstOffset,
srcPitch, dstPitch, height, pixels >> 1);
} else
+ /* FIXME: should lines be used here instead of height? */
LXCopyFromSys(pGeode, buf + srcOffset, dstOffset, dstPitch, srcPitch,
height, pixels);
@@ -818,6 +819,8 @@ LXAllocateSurface(ScrnInfoPtr pScrni, int id, unsigned short w,
pitch = ((w << 1) + 15) & ~15;
lines = ((pitch * h) + (pGeode->Pitch - 1)) / pGeode->Pitch;
+ /* FIXME: is lines the right parameter to use here,
+ * or should it be height * pitch? */
vidmem = exaOffscreenAlloc(pScrni->pScreen, lines, 4, TRUE,
NULL, NULL);
diff --git a/driver/xf86-video-geode/src/z4l.c b/driver/xf86-video-geode/src/z4l.c
index 11b3fa5b6..d44ff7395 100644
--- a/driver/xf86-video-geode/src/z4l.c
+++ b/driver/xf86-video-geode/src/z4l.c
@@ -55,7 +55,6 @@ typedef long long __s64;
#define __u64 __u_64
typedef unsigned long long __u64;
-#include "linux/videodev.h"
#define __user
#include "linux/videodev2.h"