rpms/xorg-x11-drv-geode/devel geode-2.11.4.1-d8baf45eb.patch, NONE, 1.1 xorg-x11-drv-geode.spec, 1.17, 1.18

Dave Airlie airlied at fedoraproject.org
Mon Jul 5 05:08:11 UTC 2010


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-drv-geode/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv24724

Modified Files:
	xorg-x11-drv-geode.spec 
Added Files:
	geode-2.11.4.1-d8baf45eb.patch 
Log Message:
* Mon Jul 05 2010 Dave Airlie <airlied at redhat.com> 2.11.4.1-4
- update to geode git for latest server API


geode-2.11.4.1-d8baf45eb.patch:
 .gitignore          |   78 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 COPYING             |   45 +++++++++++++++++-------------
 Makefile.am         |   12 ++++----
 README              |   75 ++++++++++++++++++++++++++++++++++----------------
 configure.ac        |   23 ++++++---------
 src/Makefile.am     |    9 ++++--
 src/cim/cim_modes.c |    4 ++
 src/geode.h         |    2 -
 src/geode_driver.c  |    9 ------
 src/gfx/gfx_disp.c  |    2 +
 src/gx_driver.c     |   35 ++++++++++++-----------
 src/gx_randr.c      |   36 +++++++++++++++---------
 src/lx_exa.c        |   63 ++++++++++++++++++++++++------------------
 src/lx_output.c     |   33 +++++++++++++++++-----
 src/lx_panel.c      |    3 +-
 15 files changed, 290 insertions(+), 139 deletions(-)

--- NEW FILE geode-2.11.4.1-d8baf45eb.patch ---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7d325b7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,78 @@
+#
+#		X.Org module default exclusion patterns
+#		The next section if for module specific patterns
+#
+#	Do not edit the following section
+# 	GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+#	Do not edit the following section
+# 	Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+#		Add & Override patterns for xf86-video-geode 
+#
+#		Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+# 
diff --git a/COPYING b/COPYING
index 6c05f4f..5558790 100644
--- a/COPYING
+++ b/COPYING
@@ -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:
+LICENSE:
+
+   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 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.
+   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.
+   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.
diff --git a/Makefile.am b/Makefile.am
index 0642345..74e0bd3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,16 +18,16 @@
 #  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.
 
-AUTOMAKE_OPTIONS = foreign
 SUBDIRS = src
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+EXTRA_DIST = autogen.sh
 
-EXTRA_DIST = autogen.sh ChangeLog
+.PHONY: ChangeLog INSTALL
 
-MAINTAINERCLEANFILES = ChangeLog
-
-.PHONY: ChangeLog
+INSTALL:
+	$(INSTALL_CMD)
 
 ChangeLog:
 	$(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
diff --git a/README b/README
index 8ae3ce7..7c49fa7 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
-AMD Geode GX and LX graphics driver for X.Org
-=============================================
-README last updated: 2009-08-04
+xf86-video-geode -- AMD Geode GX and LX graphics driver for X.org
+=================================================================
+README last updated: 2009-09-09
 
 GIT repository:
         git://anongit.freedesktop.org/git/xorg/driver/xf86-video-geode
@@ -9,7 +9,7 @@ Gitweb browser:
         http://cgit.freedesktop.org/xorg/driver/xf86-video-geode
 
 Project homepage:
-	http://wiki.x.org/wiki/GeodeDriver
+	http://www.x.org/wiki/GeodeDriver
 
 = Introduction =
 
@@ -27,20 +27,51 @@ them to get around it soon.
 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.
 
+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)
+
+xf86-video-nsc
+ * Geode GX2     (a.k.a. GX2) PCI ID 0x100B:0x0030 (a.k.a. "Red Cloud")
+ * Geode SCx200  (a.k.a. GX1) PCI ID 0x100B:0x0504 
+ * Geode SC1400  (a.k.a. GX1) PCI ID 0x100B:0x0104 
+
+xf86-video-cyrix
+ * Geode MediaGX (a.k.a. GX1) PCI ID 0x1078:0x0104 
+
+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. 
+
 = Dependencies =
 
-As of version 2.9.0, this driver depends on X.Org server 1.3 or newer,
+As of version 2.11.4, this driver depends upon X server 1.5 or newer,
+because the GX Randr code utilizes dixSetPrivate whose API was modified 
+in a non backward-compatible way.
+
+  #ifdef'ing the changes from f1268f3ba8404129d358db3bb1e66f3841f7018a 
+  and b28abde0276ddd7f687242f3886f98b0e49a7fc2 might make it possible
+  to build this driver against older X servers. Patches are welcome.
+
+As of version 2.9.0, this driver depends on X server 1.3 or newer,
 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:
+  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
+  http://lists.freedesktop.org/archives/xorg-commit/2007-February/010341.html
 
-Patches accomplishing the same trick for the Geode driver are welcome.
+  Patches accomplishing the same trick for the Geode driver are welcome.
 
 = FAQ =
 
+Q: Why doesn't screen rotation work?
+
+A: Make sure that at least 32MB of memory is reserved for video operation
+   (check the BIOS settings), otherwise rotation will fail and display an
+   "Out of memory" error message in the X.org log.
+
 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, 
@@ -85,28 +116,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)
-PanelGeometry: Specify the geometry of the attached panel ("<width>x<height>")
 
 = EOF =
diff --git a/configure.ac b/configure.ac
index 196c230..cd31a9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,21 +20,24 @@
 #
 # Process this file with autoconf to produce a configure script
 
-AC_PREREQ(2.57)
+AC_PREREQ(2.59)
 AC_INIT([xf86-video-geode],
-        2.11.4.1,
+        [2.11.8],
         [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])
 AM_CONFIG_HEADER([config.h])
 AC_CONFIG_AUX_DIR(.)
 
-# Require xorg-macros: XORG_CHANGELOG
-m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.2)
+# 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([dist-bzip2])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
 
 AM_MAINTAINER_MODE
 
@@ -83,7 +86,6 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
 XORG_DRIVER_CHECK_EXT(XV, videoproto)
 XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
-XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto)
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
@@ -91,7 +93,6 @@ 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" ])
-sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
 # Checks for libraries.
 SAVE_CPPFLAGS="$CPPFLAGS"
@@ -131,10 +132,6 @@ AM_CONDITIONAL([I386ARCH], [test $is386 = true])
 DRIVER_NAME=geode
 AC_SUBST([DRIVER_NAME])
 
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
-
 AC_OUTPUT([
 	Makefile
 	src/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index a162d26..6817ea4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,9 +23,12 @@
 # -avoid-version prevents gratuitous .0.0.0 version numbers on the end
 # _ladir passes a dummy rpath to libtool so the thing will actually link
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) \
-  -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 \
+	-I$(top_srcdir)/linux_v26
 
 # -DPNL_SUP is now provided by AMD_CFLAGS
 #
diff --git a/src/cim/cim_modes.c b/src/cim/cim_modes.c
index 0e51caa..04d7edd 100644
--- a/src/cim/cim_modes.c
+++ b/src/cim/cim_modes.c
@@ -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) / \
diff --git a/src/geode.h b/src/geode.h
index 4f0b467..8fe67b5 100644
--- a/src/geode.h
+++ b/src/geode.h
@@ -60,7 +60,7 @@
 #define LX      0x20
 
 #define PCI_VENDOR_ID_CYRIX  0x1078
-#define PCI_VENDOR_ID_NS     0x100B
+#define PCI_VENDOR_ID_NS     0x100b
 #define PCI_VENDOR_ID_AMD    0x1022
 
 #define PCI_CHIP_5530     0x0104
diff --git a/src/geode_driver.c b/src/geode_driver.c
index 13635da..43e9506 100644
--- a/src/geode_driver.c
+++ b/src/geode_driver.c
@@ -58,19 +58,12 @@
 
 /* Machine independent stuff */
 #include "mipointer.h"
-#include "mibank.h"
 #include "micmap.h"
 /* All drivers implementing backing store need this */
 #include "mibstore.h"
 #include "vgaHW.h"
 #include "vbe.h"
 
-/* Check for some extensions */
-#ifdef XFreeXDGA
-#define _XF86_DGA_SERVER_
-#include <X11/extensions/xf86dgastr.h>
-#endif /* XFreeXDGA */
-
 #ifdef DPMSExtension
 #include "globals.h"
 #include "opaque.h"
@@ -429,7 +422,7 @@ AmdPciProbe(DriverPtr driver,
  *
  * Returns	:TRUE on success and FALSE on failure.
  *
- * Comments     :This should ne minimal probe and it should under no
+ * Comments     :This should be minimal probe and it should under no
  *               circumstances change the state of the hardware.Don't do
  *               any intiallizations other than the required
  *               ScreenInforec.
diff --git a/src/gfx/gfx_disp.c b/src/gfx/gfx_disp.c
index 6d32a35..a1cd78f 100644
--- a/src/gfx/gfx_disp.c
+++ b/src/gfx/gfx_disp.c
@@ -31,6 +31,7 @@
   *     gfx_get_display_mode_count
   *     gfx_get_display_mode
   *     gfx_is_display_mode_supported
+  *     gfx_is_panel_mode_supported
   *     gfx_get_display_details
   *     gfx_set_display_mode
   *     gfx_set_display_bpp
@@ -51,6 +52,7 @@
   *     gfx_set_compression_pitch
   *     gfx_set_compression_size
   *     gfx_set_display_priority_high
+  *     gfx_set_panel_present
   *     gfx_test_timing_active
   *     gfx_test_vertical_active
   *     gfx_wait_vertical_blank
diff --git a/src/gx_driver.c b/src/gx_driver.c
index 7ff5418..1c25e1a 100644
--- a/src/gx_driver.c
+++ b/src/gx_driver.c
@@ -1412,7 +1412,7 @@ GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags)
 {
     ScrnInfoPtr pScrni = xf86Screens[scrnIndex];
     GeodeRec *pGeode = GEODEPTR(pScrni);
-    int p, ret;
+    int p;
     int custom = 0;
 
     if (pGeode->Panel)
@@ -1422,23 +1422,24 @@ GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags)
 
     /* Use the durango lookup for !custom modes */
 
-    if (!custom) {
-	if (pGeode->Panel) {
-	    if (pMode->CrtcHDisplay > pGeode->PanelX ||
-		pMode->CrtcVDisplay > pGeode->PanelY ||
-		gfx_is_panel_mode_supported(pGeode->PanelX, pGeode->PanelY,
-		    pMode->CrtcHDisplay, pMode->CrtcVDisplay,
-		    pScrni->bitsPerPixel) < 0) {
-
-		return MODE_BAD;
-	    }
-	}
+    if (!custom && pGeode->Panel) {
+        if (pMode->CrtcHDisplay > pGeode->PanelX ||
+            pMode->CrtcVDisplay > pGeode->PanelY ||
+            gfx_is_panel_mode_supported(pGeode->PanelX,
+                                        pGeode->PanelY,
+                                        pMode->CrtcHDisplay,
+                                        pMode->CrtcVDisplay,
+                                        pScrni->bitsPerPixel) < 0) {
+
+            return MODE_BAD;
+        }
+    }
 
-	ret = gfx_is_display_mode_supported(pMode->CrtcHDisplay,
-	    pMode->CrtcVDisplay,
-	    pScrni->bitsPerPixel, GeodeGetRefreshRate(pMode));
-	if (ret < 0)
-	    return MODE_BAD;
+    if (gfx_is_display_mode_supported(pMode->CrtcHDisplay,
+                                      pMode->CrtcVDisplay,
+                                      pScrni->bitsPerPixel,
+                                      GeodeGetRefreshRate(pMode)) < 0) {
+        return MODE_BAD;
     }
 
     if (pMode->Flags & V_INTERLACE)
diff --git a/src/gx_randr.c b/src/gx_randr.c
index 2669912..a3aa5e4 100644
--- a/src/gx_randr.c
+++ b/src/gx_randr.c
@@ -28,7 +28,6 @@
 
 #include "xf86.h"
 #include "os.h"
-#include "mibank.h"
 #include "globals.h"
 #include "xf86.h"
 #include "xf86Priv.h"
@@ -56,15 +55,21 @@ typedef struct _GXRandRInfo
     Rotation supported_rotations;      /* driver supported */
 } XF86RandRInfoRec, *XF86RandRInfoPtr;
 
-#define AMD_OLDPRIV (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4)
-
+#if HAS_DEVPRIVATEKEYREC
+static DevPrivateKeyRec GXRandRIndex;
+#else
 static int GXRandRIndex;
+#endif
 
-#if AMD_OLDPRIV
-#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) (p)->devPrivates[GXRandRIndex].ptr)
+#define OLD_VIDEODRV_INTERFACE (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4)
+
+#if OLD_VIDEODRV_INTERFACE
+#define XF86RANDRINFO(p)   ((XF86RandRInfoPtr) (p)->devPrivates[GXRandRIndex].ptr)
+#define XF86RANDRSET(p, v) (p)->devPrivates[GXRandRIndex].ptr = v
 #else
-#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \
-			  dixLookupPrivate(&(p)->devPrivates, &GXRandRIndex));
+#define XF86RANDRINFO(p) ((XF86RandRInfoPtr)						\
+			  dixLookupPrivate(&(p)->devPrivates, &GXRandRIndex))
+#define XF86RANDRSET(p, v) dixSetPrivate(&(p)->devPrivates, &GXRandRIndex, v)
 #endif
 
 static int
@@ -159,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;
@@ -327,9 +336,13 @@ GXRandRInit(ScreenPtr pScreen, int rotation)
     if (GXRandRGeneration != serverGeneration) {
 	GXRandRGeneration = serverGeneration;
     }
-#if AMD_OLDPRIV
+#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)
@@ -354,10 +367,7 @@ GXRandRInit(ScreenPtr pScreen, int rotation)
     pRandr->supported_rotations = rotation;
     pRandr->maxX = pRandr->maxY = 0;
 
-#if AMD_OLDPRIV
-    pScreen->devPrivates[GXRandRIndex].ptr = pRandr;
-#else
-    dixSetPrivate(&pScreen->devPrivates, &GXRandRIndex, pRandr);
-#endif
+    XF86RANDRSET(pScreen, pRandr);
+
     return TRUE;
 }
diff --git a/src/lx_exa.c b/src/lx_exa.c
index 31f9b0e..14980ae 100644
--- a/src/lx_exa.c
+++ b/src/lx_exa.c
@@ -536,12 +536,15 @@ 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;
 
+    /* We need the off-screen buffer to do the multipass work */
+
     if (usesPasses(op)) {
 	if (pGeode->exaBfrOffset == 0 || !pMsk)
 	    return FALSE;
@@ -568,6 +571,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 */
 
@@ -582,15 +589,23 @@ lx_check_composite(int op, PicturePtr pSrc, PicturePtr pMsk, PicturePtr pDst)
     if (pSrc->format == PICT_a8 || pDst->format == PICT_a8)
 	return FALSE;
 
-    return TRUE;
-}
+    if (pMsk && op != PictOpClear) {
+	struct blend_ops_t *opPtr = &lx_alpha_ops[op * 2];
+	int direction = (opPtr->channel == CIMGP_CHANNEL_A_SOURCE) ? 0 : 1;
 
-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;
+	/* 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;
+    }
 
     /* Get the formats for the source and destination */
 
@@ -625,6 +640,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 */
 
@@ -638,19 +667,6 @@ lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk,
 	struct blend_ops_t *opPtr = &lx_alpha_ops[op * 2];
 	int direction = (opPtr->channel == CIMGP_CHANNEL_A_SOURCE) ? 0 : 1;
 
-	/* We can only do masks with a 8bpp or a 4bpp mask */
-
-	if (pMsk->format != PICT_a8 && pMsk->format != PICT_a4)
-	    return FALSE;
-
-	/* 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 (direction == 0)
@@ -660,11 +676,6 @@ lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk,
 	    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;
diff --git a/src/lx_output.c b/src/lx_output.c
index 5508477..beb1634 100644
--- a/src/lx_output.c
+++ b/src/lx_output.c
@@ -108,7 +108,7 @@ lx_output_set_property(xf86OutputPtr output, Atom property,
 
 	    if (!ret) {
 		xf86DrvMsg(pScrni->scrnIndex, X_ERROR,
-		    "Failed to set mode after propery change!\n");
+		    "Failed to set mode after property change!\n");
 
 		pGeode->Scale = scale;
 		return FALSE;
@@ -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 */
+    /* 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;
+    }
+
+    if (pGeode->Output & OUTPUT_PANEL &&
+        gfx_is_panel_mode_supported(pGeode->panelMode->HDisplay,
+                                    pGeode->panelMode->VDisplay,
+                                    pMode->HDisplay,
+                                    pMode->VDisplay,
+                                    pScrni->bitsPerPixel) != -1) {
 
-    if (pGeode->Output & OUTPUT_PANEL) {
-	if ((pMode->HDisplay != pGeode->panelMode->HDisplay) &&
-	    pMode->HDisplay > 1024)
-	    return MODE_BAD;
+        return MODE_OK;
     }
 
-    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
diff --git a/src/lx_panel.c b/src/lx_panel.c
index 3a0e363..f1d0686 100644
--- a/src/lx_panel.c
+++ b/src/lx_panel.c
@@ -68,7 +68,7 @@ DisplayModeRec lx_panel_modes[] = {
     ,				       /* 1280x1024 at 60 */
     {MODEPREFIX, 162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
 	V_NHSYNC | V_NVSYNC, MODESUFFIX}
-    ,				       /* 1600x100 at 60 */
+    ,				       /* 1600x1200 at 60 */
 };
 
 /* Get the legacy panel size from VSA, and return the associated mode rec */
@@ -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;


Index: xorg-x11-drv-geode.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-geode/devel/xorg-x11-drv-geode.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- xorg-x11-drv-geode.spec	5 Jul 2010 02:30:58 -0000	1.17
+++ xorg-x11-drv-geode.spec	5 Jul 2010 05:08:11 -0000	1.18
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 AMD Geode video driver
 Name:      xorg-x11-drv-geode
 Version:   2.11.4.1
-Release:   3%{?dist}
+Release:   4%{?dist}
 URL:       http://www.x.org/wiki/AMDGeodeDriver
 Source0:   http://xorg.freedesktop.org/releases/individual/driver/xf86-video-geode-%{version}.tar.bz2
 License:   MIT
@@ -14,6 +14,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version
 Provides:  xorg-x11-drv-amd = %{version}-%{release}
 Obsoletes: xorg-x11-drv-amd <= 2.7.7.7
 
+Patch0: geode-2.11.4.1-d8baf45eb.patch
+
 ExclusiveArch: %{ix86}
 
 BuildRequires: pkgconfig
@@ -32,6 +34,7 @@ X.Org X11 AMD Geode video driver.
 
 %prep
 %setup -q -n %{tarball}-%{version}
+%patch0 -p1 -b .git
 
 %build
 autoreconf -v --install
@@ -61,6 +64,9 @@ rm -rf $RPM_BUILD_ROOT
 %{driverdir}/ztv_drv.so
 
 %changelog
+* Mon Jul 05 2010 Dave Airlie <airlied at redhat.com> 2.11.4.1-4
+- update to geode git for latest server API
+
 * Mon Jul 05 2010 Peter Hutterer <peter.hutterer at redhat.com> - 2.11.4.1-3
 - rebuild for X Server 1.9
 



More information about the scm-commits mailing list