.gitignore | 70 +++++ COPYING | 74 +++++ ChangeLog | 312 ++++++++++++++++++++++++ Makefile.am | 12 configure.ac | 70 +++-- debian/README.source | 24 - debian/changelog | 22 + debian/compat | 2 debian/control | 23 - debian/patches/series | 1 debian/rules | 103 -------- debian/watch | 1 debian/xsfbs/repack.sh | 32 -- debian/xsfbs/xsfbs.mk | 285 ---------------------- debian/xsfbs/xsfbs.sh | 622 ------------------------------------------------- man/Makefile.am | 59 +--- src/.cvsignore | 6 src/Makefile.am | 1 src/compat-api.h | 99 +++++++ src/s3.h | 15 - src/s3_IBMRGB.c | 4 src/s3_Ti.c | 6 src/s3_accel.c | 8 src/s3_bios.c | 4 src/s3_cursor.c | 4 src/s3_dga.c | 28 +- src/s3_driver.c | 86 +++--- src/s3_shadow.c | 6 src/s3_video.c | 15 - 29 files changed, 766 insertions(+), 1228 deletions(-)
New commits: commit 2afac3a9ffcecebc413a42497ea84be4a042876a Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Wed Jul 18 15:06:23 2012 +0200 Bump Standards-Version to 3.9.1 (no changes needed). diff --git a/debian/control b/debian/control index 6723682..6eb83e4 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Build-Depends: x11proto-render-dev, x11proto-xext-dev, xutils-dev -Standards-Version: 3.9.1 +Standards-Version: 3.9.3 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-s3 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-s3.git commit 7b3975de65bc26c0e546129e16158278a802b7e9 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Wed Jul 18 15:05:45 2012 +0200 New upstream release. diff --git a/debian/changelog b/debian/changelog index 21c41d0..d11c916 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xserver-xorg-video-s3 (1:0.6.5-1) UNRELEASED; urgency=low + + * New upstream release. + + -- Maarten Lankhorst <maarten.lankho...@canonical.com> Wed, 18 Jul 2012 15:05:26 +0200 + xserver-xorg-video-s3 (1:0.6.3-4) unstable; urgency=low * Switch to dh: commit 82107448d4635b924014ce7df4438aff01dda4ad Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Wed Jul 18 15:03:55 2012 +0200 Bump changelog diff --git a/ChangeLog b/ChangeLog index 72a1a89..30fe8fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,315 @@ +commit 73304078ffd138ba642587af1131a80720bfe65c +Author: Dave Airlie <airl...@redhat.com> +Date: Tue Jul 17 16:05:09 2012 +1000 + + xf86-video-s3: bump to version 0.6.5 + + Signed-off-by: Dave Airlie <airl...@redhat.com> + +commit 8f35d7311ee74e8eb8c4c957e793bf230941a7b5 +Author: Dave Airlie <airl...@redhat.com> +Date: Tue Jul 17 14:50:10 2012 +1000 + + s3: fixup scrn/screen conversion. + + Signed-off-by: Dave Airlie <airl...@redhat.com> + +commit 2c02712a860abb0a8584290a197071b8c0aa3fed +Author: Dave Airlie <airl...@redhat.com> +Date: Tue Jul 17 14:33:15 2012 +1000 + + s3: port to new X server compat API + + Signed-off-by: Dave Airlie <airl...@redhat.com> + +commit 09c3c15aa3bfb44e35325c3beee1de08f9366734 +Author: Dave Airlie <airl...@redhat.com> +Date: Tue Jul 17 14:24:57 2012 +1000 + + s3: convert to XAA-less server world. + + Signed-off-by: Dave Airlie <airl...@redhat.com> + +commit ba2e11464f17ba17d65214e0344422a5b00b1acb +Author: Julien Cristau <jcris...@debian.org> +Date: Sat May 12 13:50:32 2012 +0200 + + xf86-video-s3 0.6.4 + +commit 6a8cead012e36c9e709f0198af17a94dfae17048 +Author: Julien Cristau <jcris...@debian.org> +Date: Sat May 12 13:47:36 2012 +0200 + + Include unistd.h for usleep + + Signed-off-by: Julien Cristau <jcris...@debian.org> + +commit db87c42485f7748a7a5ccdc94f4fc6065766bd0f +Author: Julien Cristau <jcris...@debian.org> +Date: Sat May 12 13:44:58 2012 +0200 + + Use standard allocation functions + + Signed-off-by: Julien Cristau <jcris...@debian.org> + +commit fb368727b9251b23f937a6432946dd376a153e27 +Author: Alan Coopersmith <alan.coopersm...@oracle.com> +Date: Wed Dec 28 20:04:22 2011 -0800 + + If it couldn't allocate memory, don't attempt to write a bunch of values + to the NULL pointer before returning it, but just pass the NULL along + right away. + + Resolves parfait warnings of the form: + + Error: Null pointer dereference (CWE 476) + Write to null pointer 'adapt' + at line 248 of driver/xf86-video-s3/src/s3_video.c in function 'S3SetupImageVideoOverlay'. + Function 'S3AllocAdaptor' may return constant 'NULL' at line 218, called at line 246. + Null pointer introduced at line 218 in function 'S3AllocAdaptor'. + + repeated for every line writing to the adapt pointer in the function. + + [ This bug was found by the Parfait 0.4.2 bug checking tool. + For more information see http://labs.oracle.com/projects/parfait/ ] + + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + +commit e5c1c27b83e93d9cb2a74c7c4ee85b36eb1bbdef +Author: Adam Jackson <a...@redhat.com> +Date: Mon Dec 19 17:17:28 2011 -0500 + + Fix for new vgahw ABI + + Signed-off-by: Adam Jackson <a...@redhat.com> + +commit 1aa3e0413bcf89734083649c2057fc4065c8348d +Author: Adam Jackson <a...@redhat.com> +Date: Mon Dec 19 17:16:44 2011 -0500 + + Fall back to shadowfb if XAA is unavailable + + Signed-off-by: Adam Jackson <a...@redhat.com> + +commit 381ace93a17da291d4149fe0f98ee4b7386f67ee +Author: Matt Turner <matts...@gmail.com> +Date: Thu Dec 2 17:09:46 2010 -0500 + + Add missing call to vbeFree (bug 4417) + + Reviewed-by: Adam Jackson <a...@redhat.com> + Signed-off-by: Matt Turner <matts...@gmail.com> + +commit bc10d3acae50db1303a5255c9211a9963a7f60ff +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Fri Jul 23 20:54:56 2010 -0400 + + config: add AM_PROG_CC_C_O for per-target compilation flags + + The use of per-target compilation flags with C sources requires + that the macro AM_PROG_CC_C_O be called from configure.ac + + If the C compiler does not accept the -c and -o options simultaneously, + define NO_MINUS_C_MINUS_O. This macro actually tests both the compiler + found by AC_PROG_CC, and, if different, the first cc in the path. + The test fails if one fails. This macro was created for GNU Make + to choose the default C compilation rule. + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit eb2677eaa2880e99f3b731d45dab5274bda4cb99 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Wed Jul 21 16:49:04 2010 -0400 + + config: add comments for main statements + +commit edd93140a9330c886761b2207bdb2ca1d5c6a170 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Wed Jul 21 16:07:00 2010 -0400 + + config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit 4fd39e6c68fe735d0a16a66267461472d78c15a7 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Wed Jul 21 14:37:41 2010 -0400 + + config: replace deprecated AC_HELP_STRING with AS_HELP_STRING + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit 9e7e206334067b708d0c0d31f218309da9dbbb1e +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Wed Jul 21 14:05:23 2010 -0400 + + config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit 2852a8d1c587a473f1ba341458c0f97a2d494cb7 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Wed Jul 21 09:27:42 2010 -0400 + + config: complete AC_INIT m4 quoting + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit d96305aee294efafb98cab1bf087791c1f87de20 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Tue Jul 20 21:44:58 2010 -0400 + + config: remove unrequired AC_SUBST([XORG_CFLAGS]) + + This macro is called by PKG_CHECK_MODULES + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit bfa6c1607bab7d04aba747fc964608bc97ca43b4 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Tue Jul 20 20:24:42 2010 -0400 + + config: remove unrequired AC_HEADER_STDC + + Autoconf says: + "This macro is obsolescent, as current systems have conforming + header files. New programs need not use this macro". + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit 651282bbe144e094ce342a2433d8e2e0d2f96277 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Tue Jul 20 19:41:31 2010 -0400 + + config: remove AC_PROG_CC as it overrides AC_PROG_C_C99 + + XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls + AC_PROG_C_C99. This sets gcc with -std=gnu99. + If AC_PROG_CC macro is called afterwards, it resets CC to gcc. + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit 0021ca4e9594eaf6cf7843bbbe34caedc5d66989 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Tue Jul 20 18:45:19 2010 -0400 + + config: update AC_PREREQ statement to 2.60 + + Unrelated to the previous patches, the new value simply reflects + the reality that the minimum level for autoconf to configure + all x.org modules is 2.60 dated June 2006. + + ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit 51294ed2c413c6d64e88b099324e6027832fbe21 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Tue Jul 20 16:15:29 2010 -0400 + + config: upgrade to util-macros 1.8 for additional man page support + + Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS + The value of MAN_SUBST is the same for all X.Org packages. + +commit 798a0017ebd8078a9e0be0c4571675c8056f1100 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Sun Jun 13 10:18:36 2010 -0400 + + COPYING: replace stub file with actual Copyright notices. + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit 36776d8ab030d2c139a099ea6f7d39d1005faef3 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Fri Jan 29 16:11:25 2010 -0500 + + config: remove dead LINUXDOC macro usage + + This module does not generate LINUXDOC documentation. + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit 9d61ff1212e0ddaf89d9ce10f738f42fa08c5e9b +Author: Alan Coopersmith <alan.coopersm...@sun.com> +Date: Fri Jan 15 13:55:12 2010 -0800 + + Update Sun license notices to current X.Org standard form + + Signed-off-by: Alan Coopersmith <alan.coopersm...@sun.com> + +commit 5d147f161c47e8eab97a6b4e9973000739dec7ef +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Tue Dec 15 22:01:02 2009 -0500 + + configure.ac: remove unused sdkdir=$(pkg-config...) statement + + The sdkdir variable isn't use, so remove the statement. + + Acked-by: Dan Nicholson <dbn.li...@gmail.com> + + Signed-off-by: Gaetan Nadon <mems...@videotron.ca> + +commit cf940ced9d927d811c5d6babfc8e8f290d30c28c +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Mon Nov 23 09:25:05 2009 -0500 + + Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES + + Now that the INSTALL file is generated. + Allows running make maintainer-clean. + +commit 2585a89902107be3bae5c38c9c8f5b0c18a46866 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Wed Oct 28 17:10:47 2009 -0400 + + Remove .cvsignore #23776 + + X.Org no longer use CVS + +commit a54a582f68477386f01e67c0753fce1b93cdc777 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Wed Oct 28 14:41:41 2009 -0400 + + INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 + + Automake 'foreign' option is specified in configure.ac. + Remove from Makefile.am + +commit 43e7114b140a97279d556cb6ec0a631df488dae1 +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Wed Oct 28 14:09:09 2009 -0400 + + INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 + + Add missing INSTALL file. Use standard GNU file on building tarball + README may have been updated + Remove AUTHORS file as it is empty and no content available yet. + Remove NEWS file as it is empty and no content available yet. + +commit 152368af1ed13e566a91880e8b123803fdef040d +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Mon Oct 26 12:54:22 2009 -0400 + + Several driver modules do not have a ChangeLog target in Makefile.am #23814 + + The git generated ChangeLog replaces the hand written one. + Update configure.ac to xorg-macros level 1.3. + Use XORG_DEFAULT_OPTIONS which replaces four XORG_* macros + Update Makefile.am to add ChangeLog target if missing + Remove ChangeLog from EXTRA_DIST or *CLEAN variables + This is a pre-req for the INSTALL_CMD + +commit b3bcda3cc69641a216f32fb764c61c242423d00c +Author: Gaetan Nadon <mems...@videotron.ca> +Date: Thu Oct 22 12:34:18 2009 -0400 + + .gitignore: use common defaults with custom section # 24239 + + Using common defaults will reduce errors and maintenance. + Only the very small or inexistent custom section need periodic maintenance + when the structure of the component changes. Do not edit defaults. + commit d096fd94d8064a08895d34f978830240bfdc9616 Author: Dave Airlie <airl...@redhat.com> Date: Thu Jul 30 12:04:29 2009 +1000 commit 73304078ffd138ba642587af1131a80720bfe65c Author: Dave Airlie <airl...@redhat.com> Date: Tue Jul 17 16:05:09 2012 +1000 xf86-video-s3: bump to version 0.6.5 Signed-off-by: Dave Airlie <airl...@redhat.com> diff --git a/configure.ac b/configure.ac index c469706..6ba9870 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-s3], - [0.6.4], + [0.6.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-s3]) AC_CONFIG_SRCDIR([Makefile.am]) commit 8f35d7311ee74e8eb8c4c957e793bf230941a7b5 Author: Dave Airlie <airl...@redhat.com> Date: Tue Jul 17 14:50:10 2012 +1000 s3: fixup scrn/screen conversion. Signed-off-by: Dave Airlie <airl...@redhat.com> diff --git a/src/s3_IBMRGB.c b/src/s3_IBMRGB.c index a9f8a20..bc1cd1c 100644 --- a/src/s3_IBMRGB.c +++ b/src/s3_IBMRGB.c @@ -511,7 +511,7 @@ static void S3IBMRGBLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *image) static Bool S3IBMRGBUseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); return (pS3->hwCursor); } @@ -519,7 +519,7 @@ static Bool S3IBMRGBUseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) Bool S3IBMRGB_CursorInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); xf86CursorInfoPtr pCurs; diff --git a/src/s3_Ti.c b/src/s3_Ti.c index fd83bfb..bb0ce51 100644 --- a/src/s3_Ti.c +++ b/src/s3_Ti.c @@ -725,7 +725,7 @@ static void S3TiLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *image) static Bool S3TiUseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); return (pS3->hwCursor); } @@ -734,7 +734,7 @@ static Bool S3TiUseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) Bool S3Ti_CursorInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); xf86CursorInfoPtr pCurs; diff --git a/src/s3_accel.c b/src/s3_accel.c index a9cb9c9..5d11ac4 100644 --- a/src/s3_accel.c +++ b/src/s3_accel.c @@ -549,7 +549,7 @@ Bool S3AccelInitPIO(ScreenPtr pScreen) #endif { #ifdef HAVE_XAA_H - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); XAAInfoRecPtr pXAA; diff --git a/src/s3_cursor.c b/src/s3_cursor.c index 1cb1c65..dec5f43 100644 --- a/src/s3_cursor.c +++ b/src/s3_cursor.c @@ -197,7 +197,7 @@ static void S3LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *image) static Bool S3UseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); return (pS3->hwCursor); } @@ -205,7 +205,7 @@ static Bool S3UseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) Bool S3_CursorInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); xf86CursorInfoPtr pCurs; diff --git a/src/s3_dga.c b/src/s3_dga.c index 5b61d1c..e384c45 100644 --- a/src/s3_dga.c +++ b/src/s3_dga.c @@ -176,7 +176,7 @@ SECOND_PASS: Bool S3DGAInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); DGAModePtr modes = NULL; int num = 0; diff --git a/src/s3_video.c b/src/s3_video.c index f47bf20..998ce74 100644 --- a/src/s3_video.c +++ b/src/s3_video.c @@ -62,7 +62,7 @@ static FBLinearPtr S3XVMemAlloc(ScrnInfoPtr pScrn, pointer pVideo, int size); void S3InitVideo(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; XF86VideoAdaptorPtr newAdaptor = NULL; @@ -238,7 +238,7 @@ static XF86VideoAdaptorPtr S3AllocAdaptor(ScrnInfoPtr pScrn) static XF86VideoAdaptorPtr S3SetupImageVideoOverlay(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); XF86VideoAdaptorPtr adapt; commit 2c02712a860abb0a8584290a197071b8c0aa3fed Author: Dave Airlie <airl...@redhat.com> Date: Tue Jul 17 14:33:15 2012 +1000 s3: port to new X server compat API Signed-off-by: Dave Airlie <airl...@redhat.com> diff --git a/src/Makefile.am b/src/Makefile.am index 84f926c..bd8d4b2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -29,6 +29,7 @@ s3_drv_la_LDFLAGS = -module -avoid-version s3_drv_ladir = @moduledir@/drivers s3_drv_la_SOURCES = \ + compat-api.h \ newmmio.h \ s3_bios.c \ s3_cursor.c \ diff --git a/src/compat-api.h b/src/compat-api.h new file mode 100644 index 0000000..6bc946f --- /dev/null +++ b/src/compat-api.h @@ -0,0 +1,99 @@ +/* + * Copyright 2012 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Dave Airlie <airl...@redhat.com> + */ + +/* this file provides API compat between server post 1.13 and pre it, + it should be reused inside as many drivers as possible */ +#ifndef COMPAT_API_H +#define COMPAT_API_H + +#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR +#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] +#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p +#endif + +#ifndef XF86_HAS_SCRN_CONV +#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] +#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] +#endif + +#ifndef XF86_SCRN_INTERFACE + +#define SCRN_ARG_TYPE int +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] + +#define SCREEN_ARG_TYPE int +#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] + +#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv + +#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask +#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask + +#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen +#define CLOSE_SCREEN_ARGS scrnIndex, pScreen + +#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags +#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0 + +#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags +#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0 + +#define FREE_SCREEN_ARGS_DECL int arg, int flags + +#define VT_FUNC_ARGS_DECL int arg, int flags +#define VT_FUNC_ARGS pScrn->scrnIndex, 0 + +#define XF86_SCRN_ARG(x) ((x)->scrnIndex) +#else +#define SCRN_ARG_TYPE ScrnInfoPtr +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) + +#define SCREEN_ARG_TYPE ScreenPtr +#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) + +#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv + +#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask +#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask + +#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen +#define CLOSE_SCREEN_ARGS pScreen + +#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y +#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y + +#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode +#define SWITCH_MODE_ARGS(arg, m) arg, m + +#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg + +#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg +#define VT_FUNC_ARGS pScrn + +#define XF86_SCRN_ARG(x) (x) + +#endif + +#endif diff --git a/src/s3.h b/src/s3.h index 769bc3d..1609b18 100644 --- a/src/s3.h +++ b/src/s3.h @@ -48,6 +48,7 @@ #include <X11/extensions/Xv.h> #include "fourcc.h" +#include "compat-api.h" typedef struct _S3RegRec { unsigned char cr31, cr32, cr33, cr34, cr3a, cr3b, cr3c; @@ -161,7 +162,7 @@ typedef struct _S3Rec { int *indicies, LOCO *colors, VisualPtr pVisual); - Bool (*CloseScreen)(int, ScreenPtr); + Bool (*CloseScreen)(CLOSE_SCREEN_ARGS_DECL); unsigned char *imageBuffer; int imageWidth; @@ -172,7 +173,7 @@ typedef struct _S3Rec { int rotate; unsigned char * ShadowPtr; int ShadowPitch; - void (*PointerMoved)(int index, int x, int y); + void (*PointerMoved)(SCRN_ARG_TYPE arg, int x, int y); } S3Rec, *S3Ptr; @@ -198,7 +199,7 @@ Bool S3AccelInit(ScreenPtr pScreen); Bool S3AccelInitNewMMIO(ScreenPtr pScreen); Bool S3AccelInitPIO(ScreenPtr pScreen); Bool S3DGAInit(ScreenPtr pScreen); -Bool S3SwitchMode(int scrnIndex, DisplayModePtr mode, int flags); +Bool S3SwitchMode(SWITCH_MODE_ARGS_DECL); int S3GetRefClock(ScrnInfoPtr pScrn); void S3InitVideo(ScreenPtr pScreen); @@ -236,7 +237,7 @@ void S3OutTiIndReg(ScrnInfoPtr pScrn, CARD32 reg, unsigned char mask, Bool S3_CursorInit(ScreenPtr pScreen); /* in s3_shadow.c */ -void S3PointerMoved(int index, int x, int y); +void S3PointerMoved(SCRN_ARG_TYPE arg, int x, int y); void S3RefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox); void S3RefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox); void S3RefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox); diff --git a/src/s3_dga.c b/src/s3_dga.c index a1fa86b..5b61d1c 100644 --- a/src/s3_dga.c +++ b/src/s3_dga.c @@ -251,7 +251,7 @@ static Bool S3_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode) pMode->bitsPerPixel : pMode->depth); - S3SwitchMode(indx, pMode->mode, 0); + S3SwitchMode(SWITCH_MODE_ARGS(pScrn, pMode->mode)); } return TRUE; @@ -270,7 +270,7 @@ static void S3_SetViewport(ScrnInfoPtr pScrn, int x, int y, int flags) { S3Ptr pS3 = S3PTR(pScrn); - pScrn->AdjustFrame(pScrn->pScreen->myNum, x, y, flags); + pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, x, y)); pS3->DGAViewportStatus = 0; } diff --git a/src/s3_driver.c b/src/s3_driver.c index 01250ba..61242ad 100644 --- a/src/s3_driver.c +++ b/src/s3_driver.c @@ -93,18 +93,17 @@ static const OptionInfoRec * S3AvailableOptions(int chipid, int busid); static void S3Identify(int flags); static Bool S3Probe(DriverPtr drv, int flags); static Bool S3PreInit(ScrnInfoPtr pScrn, int flags); -static Bool S3EnterVT(int scrnIndex, int flags); -static void S3LeaveVT(int scrnIndex, int flags); +static Bool S3EnterVT(VT_FUNC_ARGS_DECL); +static void S3LeaveVT(VT_FUNC_ARGS_DECL); static void S3Save(ScrnInfoPtr pScrn); -static Bool S3ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, - char **argv); +static Bool S3ScreenInit(SCREEN_INIT_ARGS_DECL); static Bool S3MapMem(ScrnInfoPtr pScrn); static void S3UnmapMem(ScrnInfoPtr pScrn); static Bool S3ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); -static void S3AdjustFrame(int scrnIndex, int x, int y, int flags); -Bool S3CloseScreen(int scrnIndex, ScreenPtr pScreen); +static void S3AdjustFrame(ADJUST_FRAME_ARGS_DECL); +Bool S3CloseScreen(CLOSE_SCREEN_ARGS_DECL); Bool S3SaveScreen(ScreenPtr pScreen, int mode); -static void S3FreeScreen(int scrnIndex, int flags); +static void S3FreeScreen(FREE_SCREEN_ARGS_DECL); static void S3GenericLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indicies, LOCO *colors, VisualPtr pVisual); @@ -738,10 +737,9 @@ static Bool S3PreInit(ScrnInfoPtr pScrn, int flags) } -static Bool S3ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, - char **argv) +static Bool S3ScreenInit(SCREEN_INIT_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); BoxRec ScreenArea; int width, height, displayWidth; @@ -1078,9 +1076,9 @@ Bool S3SaveScreen(ScreenPtr pScreen, int mode) } -static void S3FreeScreen(int scrnIndex, int flags) +static void S3FreeScreen(FREE_SCREEN_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); vgaHWFreeHWRec(pScrn); @@ -1088,9 +1086,9 @@ static void S3FreeScreen(int scrnIndex, int flags) } -Bool S3CloseScreen(int scrnIndex, ScreenPtr pScreen) +Bool S3CloseScreen(CLOSE_SCREEN_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3Ptr pS3 = S3PTR(pScrn); vgaHWPtr hwp = VGAHWPTR(pScrn); @@ -1107,14 +1105,14 @@ Bool S3CloseScreen(int scrnIndex, ScreenPtr pScreen) pScrn->vtSema = FALSE; pScreen->CloseScreen = pS3->CloseScreen; - return (*pScreen->CloseScreen)(scrnIndex, pScreen); + return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); } -Bool S3SwitchMode(int scrnIndex, DisplayModePtr mode, int flags) +Bool S3SwitchMode(SWITCH_MODE_ARGS_DECL) { - return S3ModeInit(xf86Screens[scrnIndex], mode); - + SCRN_INFO_PTR(arg); + return S3ModeInit(pScrn, mode); } @@ -1742,7 +1740,7 @@ static Bool S3ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) outb(0x3c5, 0x00); } - pScrn->AdjustFrame(pScrn->scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); + pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0)); vgaHWProtect(pScrn, FALSE); @@ -1794,9 +1792,9 @@ static Bool S3ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) } -static Bool S3EnterVT(int scrnIndex, int flags) +static Bool S3EnterVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); vgaHWPtr hwp = VGAHWPTR(pScrn); vgaHWUnlock(hwp); @@ -1879,9 +1877,9 @@ static void S3Restore(ScrnInfoPtr pScrn) } -static void S3LeaveVT(int scrnIndex, int flags) +static void S3LeaveVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); vgaHWPtr hwp = VGAHWPTR(pScrn); S3Restore(pScrn); @@ -1891,9 +1889,9 @@ static void S3LeaveVT(int scrnIndex, int flags) } -static void S3AdjustFrame(int scrnIndex, int x, int y, int flags) +static void S3AdjustFrame(ADJUST_FRAME_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); S3Ptr pS3 = S3PTR(pScrn); S3RegPtr regs = &pS3->ModeRegs; int vgaCRIndex = pS3->vgaCRIndex, vgaCRReg = pS3->vgaCRReg; diff --git a/src/s3_shadow.c b/src/s3_shadow.c index f4fbbb3..36406dd 100644 --- a/src/s3_shadow.c +++ b/src/s3_shadow.c @@ -69,9 +69,9 @@ S3RefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox) } void -S3PointerMoved(int index, int x, int y) +S3PointerMoved(SCRN_ARG_TYPE arg, int x, int y) { - ScrnInfoPtr pScrn = xf86Screens[index]; + SCRN_INFO_PTR(arg); S3Ptr pS3 = S3PTR(pScrn); int newX, newY; @@ -83,7 +83,7 @@ S3PointerMoved(int index, int x, int y) newY = pScrn->pScreen->width - x - 1; } - (*pS3->PointerMoved)(index, newX, newY); + (*pS3->PointerMoved)(arg, newX, newY); } void commit 09c3c15aa3bfb44e35325c3beee1de08f9366734 Author: Dave Airlie <airl...@redhat.com> Date: Tue Jul 17 14:24:57 2012 +1000 s3: convert to XAA-less server world. Signed-off-by: Dave Airlie <airl...@redhat.com> diff --git a/configure.ac b/configure.ac index 7bce533..c469706 100644 --- a/configure.ac +++ b/configure.ac @@ -79,6 +79,24 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then fi AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) +AC_ARG_ENABLE(xaa, + AS_HELP_STRING([--enable-xaa], + [Enable legacy X Acceleration Architecture (XAA) [default=auto]]), + [XAA="$enableval"], + [XAA=auto]) +if test "x$XAA" != xno; then + save_CFLAGS=$CFLAGS + save_CPPFLAGS=$CPPFLAGS + CFLAGS=$XORG_CFLAGS + CPPFLAGS="$XORG_CFLAGS" + AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no) + CFLAGS=$save_CFLAGS + CPPFLAGS=$save_CPPFLAGS +fi +AC_MSG_CHECKING([whether to include XAA support]) +AM_CONDITIONAL(XAA, test "x$XAA" = xyes) +AC_MSG_RESULT([$XAA]) + AC_SUBST([moduledir]) DRIVER_NAME=s3 diff --git a/src/s3.h b/src/s3.h index 0875fc9..769bc3d 100644 --- a/src/s3.h +++ b/src/s3.h @@ -36,7 +36,10 @@ #include "xf86Pci.h" #include "xf86PciInfo.h" #include "xf86RamDac.h" +#ifdef HAVE_XAA_H #include "xaa.h" +#endif +#include "xf86fbman.h" #include "vbe.h" #include "vgaHW.h" @@ -110,7 +113,9 @@ typedef struct _S3Rec { Bool PCIRetry; Bool ColorExpandBug; +#ifdef HAVE_XAA_H XAAInfoRecPtr pXAA; +#endif xf86CursorInfoPtr pCurs; xf86Int10InfoPtr pInt10; XF86VideoAdaptorPtr adaptor; diff --git a/src/s3_accel.c b/src/s3_accel.c index 78db3b1..a9cb9c9 100644 --- a/src/s3_accel.c +++ b/src/s3_accel.c @@ -36,6 +36,7 @@ #include "s3.h" #include "s3_reg.h" +#ifdef HAVE_XAA_H #if 0 static Bool NicePattern; @@ -539,6 +540,7 @@ static void S3SubsequentDashedBresenhamLine32(ScrnInfoPtr pScrn, } #endif +#endif #ifdef S3_NEWMMIO Bool S3AccelInitNewMMIO(ScreenPtr pScreen) @@ -546,6 +548,7 @@ Bool S3AccelInitNewMMIO(ScreenPtr pScreen) Bool S3AccelInitPIO(ScreenPtr pScreen) #endif { +#ifdef HAVE_XAA_H ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; S3Ptr pS3 = S3PTR(pScrn); XAAInfoRecPtr pXAA; @@ -625,4 +628,7 @@ Bool S3AccelInitPIO(ScreenPtr pScreen) #endif return XAAInit(pScreen, pXAA); +#else + return FALSE; +#endif } diff --git a/src/s3_dga.c b/src/s3_dga.c index d585ba8..a1fa86b 100644 --- a/src/s3_dga.c +++ b/src/s3_dga.c @@ -41,14 +41,16 @@ static Bool S3_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode); -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1srtxo-000223...@vasks.debian.org