diff options
author | Matthieu Herrb <matthieu.herrb@laas.fr> | 2012-01-01 19:24:01 +0100 |
---|---|---|
committer | Matthieu Herrb <matthieu.herrb@laas.fr> | 2012-01-01 19:24:01 +0100 |
commit | 9feb25df3eed21929816944bf251280663fa7791 (patch) | |
tree | b12eae7e36191fa37be3a5eca77a3996d7ad04b8 | |
parent | 222fe9ace2791587e2ceafc606459e780e6caf00 (diff) | |
parent | e420d7956afceeb41f20179cedc28d46aebdb29f (diff) |
Merge remote-tracking branch 'origin/master' into obsd
Conflicts:
src/Makefile.am
src/geode_msr.c
-rw-r--r-- | COPYING | 1 | ||||
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | README | 179 | ||||
-rw-r--r-- | configure.ac | 130 | ||||
-rw-r--r-- | src/Makefile.am | 224 | ||||
-rw-r--r-- | src/durango.c | 2 | ||||
-rw-r--r-- | src/geode_dcon.c | 7 | ||||
-rw-r--r-- | src/geode_msr.c | 8 | ||||
-rw-r--r-- | src/gx_driver.c | 2 | ||||
-rw-r--r-- | src/lx_display.c | 3 | ||||
-rw-r--r-- | src/lx_driver.c | 2 | ||||
-rw-r--r-- | src/z4l.c | 22 |
12 files changed, 316 insertions, 265 deletions
@@ -2,6 +2,7 @@ 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. +Copyright (C) 2002 Keith Packard, member of The XFree86 Project, Inc. LICENSE: diff --git a/Makefile.am b/Makefile.am index 74e0bd3..00c84b5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,6 +19,7 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SUBDIRS = src + MAINTAINERCLEANFILES = ChangeLog INSTALL EXTRA_DIST = autogen.sh @@ -1,39 +1,21 @@ xf86-video-geode -- AMD Geode GX and LX graphics driver for X.org ================================================================= -README last updated: 2011-03-13 +README last updated: 2011-11-24 -GIT repository: - git://anongit.freedesktop.org/git/xorg/driver/xf86-video-geode - -Gitweb browser: - http://cgit.freedesktop.org/xorg/driver/xf86-video-geode - -Project homepage: - http://www.x.org/wiki/GeodeDriver - -IRC channel: - #geode on the Freenode network. - -= Introduction = +1.INTRODUCTION This is the X graphics driver for the AMD Geode GX and LX processors. -The GX driver features XAA and EXA support for graphics acceleration, -and the LX driver supports EXA (including compositing). Both drivers -support Xv overlay supprot and dynamic rotation with XRandR. +The GX component supports both XAA and EXA for graphics acceleration. +The LX component supports EXA, including compositing. Both support Xv +overlay and dynamic rotation with XRandR. Additionally, a V4L2 driver +for the LX's video input port (VIP) feature is provided as "ztv". -= Dependencies = +2.DEPENDENCIES -As of version 2.9.0, this driver depends on X server 1.3 or newer, +Since version 2.9.0, this driver depends on X server 1.3 or greater, because it utilizes the new common DDC probing libraries from X.Org. - If necessary, it might be possible to create autoconf macros to make - this driver compile against older X servers, following this example: - - http://lists.freedesktop.org/archives/xorg-commit/2007-February/010341.html - - Patches accomplishing the same trick for the Geode driver are welcome. - -= Roadmap = +3.ROADMAP Support for old GX1 Geodes by Cyrix and NSC will be reintroduced soon, at which point xf86-video-cyrix and xf86-video-nsc will be retired. @@ -42,7 +24,7 @@ Until then, the current situation for Geode coverage is as follow: xf86-video-geode * Geode LX (a.k.a. GX3) PCI ID 0x1022:0x2081 - * Geode GX (a.k.a. GX2) PCI ID 0x100B:0x0030 (rebranded GX2) + * Geode GX (a.k.a. GX2) PCI ID 0x100B:0x0030 (re-branded GX2) xf86-video-nsc * Geode GX2 (a.k.a. GX2) PCI ID 0x100B:0x0030 (a.k.a. "Red Cloud") @@ -55,15 +37,48 @@ xf86-video-cyrix Please note that both NSC and GEODE support GX2. This is indeed correct. However, only GEODE has up-to-date code, while NSC is deprecated. -= Maximum Resolutions = +4.MAXIMUM RESOLUTIONS -The driver suppports all maximum resolutions advertized by AMD, namely: +The driver supports all maximum resolutions advertised by AMD, namely: LX: 1920x1440 (CRT) and 1600x1200 (TFT) GX: 1600x1200 (CRT) and 1280x1024 (TFT) -SC: 1280x1024 (CRT/TFT) - Currently unsupported by this driver - +SC: 1280x1024 (CRT/TFT) *** Currently unsupported by this driver *** + +5.CONFIGURATION OPTIONS + +You can specify driver options in /etc/X11/xorg.conf in the usual fashion: + +Section "Device" + Identifier "AMD Geode" + Driver "geode" + Option "OptionName" "value" + ... +EndSection + +The following options may be added to such a Device section: + +5.1.COMMON OPTIONS + +FBSize: Specify the size of the video space (in bytes) +NoAccel: Disable hardware assisted acceleration +NoCompression: Disable video bandwidth compression +NoPanel: Disable panel support +Rotate: Select an initial orientation - LEFT, INVERT, CCW +SWCursor: Enable software cursors (essentially disabling HW cursor support) + +5.2.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) + +5.3.LX-SPECIFIC OPTIONS + +ExaScratch: Specify the amount of extra EXA scratch buffer (in bytes) -= FAQ = +6.FREQUENTLY ASKED QUESTIONS (FAQ) Q: Why doesn't the GEODE driver work at WXGA (wide screen) resolutions? @@ -72,17 +87,68 @@ A: Make sure that TFT Panel support is disabled in the BIOS settings, The GEODE offers a choice between CRT-only, CRT+TFT, TFT-only for output device and selecting CRT-only removes the VGA restriction. +Q: How can these hardcoded modes be expanded to support a WXGA laptop? + +A: By adding the desired modes to /etc/X11/xorg.conf as follow: + + 1) Use either the "cvt" or "gtf" command to determine the modeline: + + cvt 1024 600 60 + + Where 1024x600 is the resolution and 60 the refresh rate. + The resulting modeline using "gtf" is: + +Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -hsync +vsync + + 2) Add it to the bottom of the "Monitor" section in /etc/X11/xorg.conf. + In this example, we created entries for two modes and configured the + larger resolution to be our preferred choice. + +############################################################# +# /etc/X11/xorg.conf for 1024x600 and 800x480 laptop panels # +############################################################# +#### By J.KASPER and B.HIBRY #### for Hercules eCafe 800 #### +############################################################# +Section "Module" + Load "ztv" +EndSection +Section "Device" + Identifier "card0" + Driver "geode" + BusID "PCI:0:1:1" + Option "PanelMode" "33450 800 840 968 1056 480 490 492 525" +EndSection +Section "Monitor" + Identifier "monitor0" + Modeline "1024x768" 64.56 1024 1056 1296 1328 768 783 791 807 -hsync +vsync + Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -hsync +vsync + Modeline "800x480" 33.45 800 840 968 1056 480 490 492 525 -hsync +vsync + Option "dpms" +EndSection +Section "Screen" + Identifier "Default Screen" + Monitor "monitor0" + Device "card0" + DefaultDepth 24 + Subsection "Display" + Depth 24 + Modes "1024x600" "1024x768" "800x480" + EndSubsection +EndSection +### EOF ### + 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: How do I produce useful information whenever submiting a bug report? +Q: How do I produce useful information whenever submitting a bug report? A: See http://www.x.org/wiki/Development/Documentation/ServerDebugging - and follow the instructions. + and follow the instructions found there. Q: How do I test development snapshots from the upstream GIT repository? @@ -100,40 +166,27 @@ A: Run the following commands from a command line interpreter shell: Q: What is the preferred method for submitting patches to this driver? A: See http://www.x.org/wiki/Development/Documentation/SubmittingPatches - and submit the patches as attachments to the Geode X.org mailing list - or to the X.org Bugzilla against component "Driver/geode". - -= Configuration options = + and submit the patches to the Geode X.org mailing list or to Bugzilla + against product "xorg" component "Driver/geode". -You can specify driver options in /etc/xorg.conf in the usual fashion: +7.PROJECT CONTACTS -Section "Device" - Identifier "AMD Geode" - Driver "geode" - Option "OptionName" "value" - ... -EndSection - -The following options may be added to such a Device section: - -== Common options == +Project homepage: +http://www.x.org/wiki/GeodeDriver -FBSize: Specify the size of the video space (in bytes) -NoAccel: Disable hardware assisted acceleration -NoCompression: Disable video bandwidth compression -NoPanel: Disable panel support -Rotate: Select an initial orientation - LEFT, INVERT, CCW -SWCursor: Enable software cursors (essentially disabling HW cursor support) +Mailing list: +http://lists.freedesktop.org/mailman/listinfo/xorg-driver-geode -== GX-specific options == +Bug reports: +https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode -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) +Code browser: +http://cgit.freedesktop.org/xorg/driver/xf86-video-geode -== LX-specific options == +Code repository: +git://anongit.freedesktop.org/git/xorg/driver/xf86-video-geode -ExaScratch: Specify the amount of extra EXA scratch buffer (in bytes) +IRC channel: +#geode on the Freenode network. -= EOF = +.EOF. diff --git a/configure.ac b/configure.ac index 483caff..2c810a2 100644 --- a/configure.ac +++ b/configure.ac @@ -20,81 +20,115 @@ # # Process this file with autoconf to produce a configure script +# Initialize Autoconf AC_PREREQ(2.59) AC_INIT([xf86-video-geode], - [2.11.12], + [2.11.13], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode], [xf86-video-geode], [http://www.x.org/wiki/GeodeDriver]) AC_CONFIG_SRCDIR([Makefile.am]) -AM_CONFIG_HEADER([config.h]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR(.) +# Initialize Automake +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Initialize libtool +AC_DISABLE_STATIC +AC_PROG_LIBTOOL + # Require xorg-macros: XORG_DEFAULT_OPTIONS m4_ifndef([XORG_MACROS_VERSION], [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])]) XORG_MACROS_VERSION(1.4) XORG_DEFAULT_OPTIONS -AM_INIT_AUTOMAKE([foreign dist-bzip2]) - -AM_MAINTAINER_MODE - # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL -AC_PROG_CC -AM_PROG_AS AH_TOP([#include "xorg-server.h"]) +# ----------------------------------------------------------------------------- +# Configuration options +# ----------------------------------------------------------------------------- +# Define a configure option for an alternate input module directory AC_ARG_WITH(xorg-module-dir, - AC_HELP_STRING([--with-xorg-module-dir=DIR], + AS_HELP_STRING([--with-xorg-module-dir=DIR], [Default xorg module directory [[default=$libdir/xorg/modules]]]), [moduledir="$withval"], [moduledir="$libdir/xorg/modules"]) +AC_SUBST([moduledir]) +# Define a configure option to enable/disable lcd panel support AC_ARG_ENABLE(geodegx-panel, - AC_HELP_STRING([--disable-geodegx-panel], + AS_HELP_STRING([--disable-geodegx-panel], [Disable support for flatpanels with the Geode GX]), [ ], - [ AMD_CFLAGS="-DPNL_SUP $AMD_CFLAGS" ]) - -AC_ARG_ENABLE(werror, AC_HELP_STRING([--enable-werror], - [Treat warnings as errors (default: disabled)]), - [WERROR=$enableval], [WERROR=no]) -AC_ARG_ENABLE(visibility, - AC_HELP_STRING([--enable-visibility], - [Enable GCC visibility optimizations]), - [ AMD_CFLAGS="$AMD_CFLAGS -fvisibility=hidden" ], - [ : ]) - -if test "x$GCC" = "xyes"; then - GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes" - GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations" - GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing" - GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3" - if test "x$WERROR" = "xyes"; then - GCC_WARNINGS="${GCC_WARNINGS} -Werror" - fi - AMD_CFLAGS="$GCC_WARNINGS $AMD_CFLAGS" + [ PANEL_CPPFLAGS=-DPNL_SUP ]) +AC_SUBST(PANEL_CPPFLAGS) + +# Define a configure option to enable/disable ztv +AC_ARG_ENABLE(ztv, + AS_HELP_STRING([--enable-ztv], + [Enable Video For Linux based ZTV driver (default: auto-detected)]), + [ztv=$enableval], + [ztv=auto]) + +# Check for Video4Linux Version 2 (V4L2) availability +AC_CHECK_HEADERS([linux/videodev2.h],[v4l2=yes],[v4l2=no]) +if test "x$ztv" != "xno" ; then + if test "x$v4l2" = "xno" ; then + if test "x$ztv" = "xyes" ; then + # User really wants ztv but V4L2 is not found + AC_MSG_ERROR([ZTV driver requested, but videodev2.h not found.]) + fi + else + BUILD_ZTV=yes + fi fi +AM_CONDITIONAL(BUILD_ZTV, [test "x$BUILD_ZTV" = xyes]) -# Checks for extensions +# Check if GCC supports compiling in 32 bit mode for 64 bit computers +case $host_cpu in + x86_64*|amd64*) + if test "x$GCC" = xyes ; then + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -m32" + AC_MSG_CHECKING([if $CC supports the -m32 Intel/AMD option]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#include <unistd.h> +int +main () +{ + ; + return 0; +}]])], + [m32_support=yes; M32_CFLAGS=-m32], + [m32_support=no]) + AC_MSG_RESULT([$m32_support]) + CFLAGS="$SAVE_CFLAGS" + fi + ;; +esac +AC_SUBST([M32_CFLAGS]) + +# Store the list of server defined optional extensions in REQUIRED_MODULES XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(RENDER, renderproto) XORG_DRIVER_CHECK_EXT(XV, videoproto) XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) -# Checks for pkg-config packages +# Obtain compiler/linker options for the Geode driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES]) PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), HAVE_XEXTPROTO_71="no") -AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ]) -# Checks for libraries. +# Checks for libpciaccess support. SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" AC_CHECK_DECL(XSERVER_LIBPCIACCESS, @@ -102,37 +136,13 @@ AC_CHECK_DECL(XSERVER_LIBPCIACCESS, [#include "xorg-server.h"]) CPPFLAGS="$SAVE_CPPFLAGS" -# Checks for header files. -AC_HEADER_STDC - if test "x$XSERVER_LIBPCIACCESS" = xyes; then PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" fi -AC_SUBST([XORG_CFLAGS]) -AC_SUBST([moduledir]) -AC_SUBST([AMD_CFLAGS]) - -is386=false - -case $host_cpu in - i*86) - is386=true - ;; -esac - -# Unset is386 if compiling for AMD64/EM64T -if test $is386 = true ; then - AC_CHECK_DECLS([_LP64, __amd64__, amd64], [is386=false]) -fi - -AM_CONDITIONAL([I386ARCH], [test $is386 = true]) - -DRIVER_NAME=geode -AC_SUBST([DRIVER_NAME]) - -AC_OUTPUT([ +AC_CONFIG_FILES([ Makefile src/Makefile ]) +AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index 4077d72..a45a094 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,123 +24,121 @@ # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. -AM_CPPFLAGS = \ - -I$(top_srcdir)/src/cim \ - -I$(top_srcdir)/src/gfx \ - -I$(top_srcdir)/src/panel \ - -I$(top_srcdir)/linux_v26 +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/cim \ + -I$(top_srcdir)/src/gfx \ + -I$(top_srcdir)/src/panel \ + $(PANEL_CPPFLAGS) \ + -DHAVE_GX \ + -DHAVE_LX \ + -DOPT_ACCEL -# -DPNL_SUP is now provided by AMD_CFLAGS -# -AM_CFLAGS = @XORG_CFLAGS@ \ - -DHAVE_GX -DHAVE_LX -DOPT_ACCEL \ - -DLINUX_2_6 @AMD_CFLAGS@ +AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) $(M32_CFLAGS) -AM_CCASFLAGS = @XORG_CFLAGS@ geode_drv_la_LTLIBRARIES = geode_drv.la geode_drv_la_LDFLAGS = -module -avoid-version -geode_drv_ladir = @moduledir@/drivers +geode_drv_ladir = $(moduledir)/drivers -geode_drv_la_SOURCES = \ - geode.h \ - geode_blend.h \ - geode_fourcc.h \ - cim_dev.h \ - geode_driver.c \ - geode_common.c \ - geode_dcon.c \ - geode_ddc.c \ - geode_msr.c \ - gx_driver.c\ - gx_accel.c \ - gx_cursor.c \ - gx_video.c \ - gx_regacc.c \ - gx_rotate.c \ - gx_randr.c \ - durango.c \ - panel.c \ - lx_driver.c \ - lx_cursor.c \ - lx_memory.c \ - lx_panel.c \ - lx_output.c \ - lx_display.c \ - lx_video.c \ - lx_exa.c \ - cimarron.c \ - geode_pcirename.h +geode_drv_la_SOURCES = \ + cimarron.c \ + cim_dev.h \ + durango.c \ + geode_blend.h \ + geode_common.c \ + geode_dcon.c \ + geode_ddc.c \ + geode_driver.c \ + geode_fourcc.h \ + geode.h \ + geode_msr.c \ + geode_pcirename.h \ + gx_accel.c \ + gx_cursor.c \ + gx_driver.c \ + gx_randr.c \ + gx_regacc.c \ + gx_rotate.c \ + gx_video.c \ + lx_cursor.c \ + lx_display.c \ + lx_driver.c \ + lx_exa.c \ + lx_memory.c \ + lx_output.c \ + lx_panel.c \ + lx_video.c \ + panel.c -EXTRA_DIST = \ - cim/cim_defs.h \ - cim/cim_df.c \ - cim/cim_filter.c \ - cim/cim_gp.c \ - cim/cim_init.c \ - cim/cim_modes.c \ - cim/cim_msr.c \ - cim/cim_parm.h \ - cim/cim_regs.h \ - cim/cim_rtns.h \ - cim/cim_version.h \ - cim/cim_vg.c \ - cim/cim_vip.c \ - cim/cim_vop.c \ - cim/doc/release.txt \ - \ - gfx/disp_gu1.c \ - gfx/disp_gu2.c \ - gfx/gfx_dcdr.c \ - gfx/gfx_defs.h \ - gfx/gfx_disp.c \ - gfx/gfx_i2c.c \ - gfx/gfx_init.c \ - gfx/gfx_mode.h \ - gfx/gfx_msr.c \ - gfx/gfx_priv.h \ - gfx/gfx_regs.h \ - gfx/gfx_rndr.c \ - gfx/gfx_rtns.h \ - gfx/gfx_tv.c \ - gfx/gfx_type.h \ - gfx/gfx_vga.c \ - gfx/gfx_vid.c \ - gfx/gfx_vip.c \ - gfx/history.h \ - gfx/i2c_acc.c \ - gfx/i2c_gpio.c \ - gfx/init_gu1.c \ - gfx/init_gu2.c \ - gfx/msr_rdcl.c \ - gfx/release.txt \ - gfx/rndr_gu1.c \ - gfx/rndr_gu2.c \ - gfx/saa7114.c \ - gfx/tv_1200.c \ - gfx/tv_fs450.c \ - gfx/tv_fs450.h \ - gfx/vga_gu1.c \ - gfx/vid_1200.c \ - gfx/vid_5530.c \ - gfx/vid_rdcl.c \ - gfx/vip_1200.c \ - \ - panel/92xx.h \ - panel/cen9211.c \ - panel/cen9211.h \ - panel/dora9211.c \ - panel/dora9211.h \ - panel/drac9210.c \ - panel/drac9210.h \ - panel/gx2_9211.c \ - panel/gx2_9211.h \ - panel/panel.c \ - panel/panel.h \ - panel/platform.c \ - panel/pnl_bios.c \ - panel/pnl_defs.h \ - panel/pnl_init.c \ - panel/readme.txt \ - \ - gx_vga.c \ +EXTRA_DIST = \ + cim/cim_defs.h \ + cim/cim_df.c \ + cim/cim_filter.c \ + cim/cim_gp.c \ + cim/cim_init.c \ + cim/cim_modes.c \ + cim/cim_msr.c \ + cim/cim_parm.h \ + cim/cim_regs.h \ + cim/cim_rtns.h \ + cim/cim_version.h \ + cim/cim_vg.c \ + cim/cim_vip.c \ + cim/cim_vop.c \ + cim/doc/release.txt \ + \ + gfx/disp_gu1.c \ + gfx/disp_gu2.c \ + gfx/gfx_dcdr.c \ + gfx/gfx_defs.h \ + gfx/gfx_disp.c \ + gfx/gfx_i2c.c \ + gfx/gfx_init.c \ + gfx/gfx_mode.h \ + gfx/gfx_msr.c \ + gfx/gfx_priv.h \ + gfx/gfx_regs.h \ + gfx/gfx_rndr.c \ + gfx/gfx_rtns.h \ + gfx/gfx_tv.c \ + gfx/gfx_type.h \ + gfx/gfx_vga.c \ + gfx/gfx_vid.c \ + gfx/gfx_vip.c \ + gfx/history.h \ + gfx/i2c_acc.c \ + gfx/i2c_gpio.c \ + gfx/init_gu1.c \ + gfx/init_gu2.c \ + gfx/msr_rdcl.c \ + gfx/release.txt \ + gfx/rndr_gu1.c \ + gfx/rndr_gu2.c \ + gfx/saa7114.c \ + gfx/tv_1200.c \ + gfx/tv_fs450.c \ + gfx/tv_fs450.h \ + gfx/vga_gu1.c \ + gfx/vid_1200.c \ + gfx/vid_5530.c \ + gfx/vid_rdcl.c \ + gfx/vip_1200.c \ + \ + panel/92xx.h \ + panel/cen9211.c \ + panel/cen9211.h \ + panel/dora9211.c \ + panel/dora9211.h \ + panel/drac9210.c \ + panel/drac9210.h \ + panel/gx2_9211.c \ + panel/gx2_9211.h \ + panel/panel.c \ + panel/panel.h \ + panel/platform.c \ + panel/pnl_bios.c \ + panel/pnl_defs.h \ + panel/pnl_init.c \ + panel/readme.txt \ + \ + gx_vga.c \ lx_vga.c diff --git a/src/durango.c b/src/durango.c index 9d6970b..8795d41 100644 --- a/src/durango.c +++ b/src/durango.c @@ -32,8 +32,6 @@ #include "config.h" #endif -#define _LARGEFILE64_SOURCE - #include <unistd.h> #include <errno.h> #include <compiler.h> diff --git a/src/geode_dcon.c b/src/geode_dcon.c index 56f05ed..9009293 100644 --- a/src/geode_dcon.c +++ b/src/geode_dcon.c @@ -101,9 +101,14 @@ DCONDPMSSet(ScrnInfoPtr pScrni, int mode) break; } - write(fd, value, sizeof(value)); + ret = write(fd, value, sizeof(value)); close(fd); + if (ret < 0) { + failed = 1; + return 0; + } + return 1; } diff --git a/src/geode_msr.c b/src/geode_msr.c index 463c979..d3e7a53 100644 --- a/src/geode_msr.c +++ b/src/geode_msr.c @@ -1,4 +1,6 @@ -#define _LARGEFILE64_SOURCE +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <sys/types.h> #include <sys/ioctl.h> @@ -63,7 +65,7 @@ GeodeReadMSR(unsigned long addr, unsigned long *lo, unsigned long *hi) if (fd == -1) return -1; - ret = lseek64(fd, (off64_t) addr, SEEK_SET); + ret = lseek(fd, (off_t) addr, SEEK_SET); if (ret == -1) return -1; @@ -100,7 +102,7 @@ GeodeWriteMSR(unsigned long addr, unsigned long lo, unsigned long hi) if (fd == -1) return -1; - if (lseek64(fd, (off64_t) addr, SEEK_SET) == -1) + if (lseek(fd, (off_t) addr, SEEK_SET) == -1) return -1; data[0] = lo; diff --git a/src/gx_driver.c b/src/gx_driver.c index 47c20d2..b9904d1 100644 --- a/src/gx_driver.c +++ b/src/gx_driver.c @@ -445,6 +445,8 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) if (pGeode->useVGA) { if (!xf86LoadSubModule(pScrni, "vgahw") || !vgaHWGetHWRec(pScrni)) pGeode->useVGA = FALSE; + else + vgaHWSetStdFuncs(VGAHWPTR(pScrni)); #if INT10_SUPPORT pGeode->vesa = calloc(1, sizeof(VESARec)); diff --git a/src/lx_display.c b/src/lx_display.c index 1f240f5..b46fa17 100644 --- a/src/lx_display.c +++ b/src/lx_display.c @@ -354,10 +354,11 @@ lx_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green, */ for (i = 0; i < 256; i++) { + unsigned int val; (*red) &= 0xff00; (*green) &= 0xff00; (*blue) &= 0xff00; - unsigned int val = (*(red++) << 8) | *(green++) | (*(blue++) >> 8); + val = (*(red++) << 8) | *(green++) | (*(blue++) >> 8); df_set_video_palette_entry(i, val); } diff --git a/src/lx_driver.c b/src/lx_driver.c index a17854c..146d7c3 100644 --- a/src/lx_driver.c +++ b/src/lx_driver.c @@ -312,6 +312,8 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) if (pGeode->useVGA) { if (!xf86LoadSubModule(pScrni, "vgahw") || !vgaHWGetHWRec(pScrni)) pGeode->useVGA = FALSE; + else + vgaHWSetStdFuncs(VGAHWPTR(pScrni)); pGeode->vesa = calloc(1, sizeof(VESARec)); } @@ -190,7 +190,6 @@ IoCtl(int fd, unsigned int fn, void *arg, int flag) static void z4l_ovly_unmap(Z4lPortPrivRec * pPriv) { -#ifdef LINUX_2_6 int i, nbfrs; nbfrs = pPriv->nbfrs; @@ -200,12 +199,6 @@ z4l_ovly_unmap(Z4lPortPrivRec * pPriv) pPriv->bfrs[i].start = NULL; } } -#else - if (pPriv->bfrs[0].start != NULL) { - munmap((void *)pPriv->bfrs[0].start, pPriv->bufsz); - pPriv->bfrs[0].start = NULL; - } -#endif pPriv->nbfrs = -1; pPriv->bufsz = -1; pPriv->last = -1; @@ -252,27 +245,12 @@ z4l_ovly_map(Z4lPortPrivRec * pPriv, int dir) pPriv->bufsz = bsz; } -#ifdef LINUX_2_6 for (i = 0; i < pPriv->nbfrs; ++i) { pPriv->bfrs[i].start = mmap(NULL, bfr.length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, pPriv->bfrs[i].offset); if (pPriv->bfrs[i].start == MAP_FAILED) goto xit; } -#else - pPriv->bfrs[0].offset = 0; - pPriv->bfrs[0].start = - mmap(NULL, pPriv->bufsz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); - - if (pPriv->bfrs[0].start == MAP_FAILED) { - pPriv->bfrs[0].start = NULL; - goto xit; - } - - offset = (unsigned long)pPriv->bfrs[0].start; - for (i = 1; i < pPriv->nbfrs; ++i) - pPriv->bfrs[i].start = (void *)(offset + pPriv->bfrs[i].offset); -#endif for (i = 0; i < pPriv->nbfrs; ++i) { DBLOG(3, "bfr %d ofs %#lx adr %p sz %lu\n", i, pPriv->bfrs[i].offset, |