Hello community, here is the log from the commit of package xf86-video-r128 for openSUSE:Factory checked in at 2012-09-15 17:30:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xf86-video-r128 (Old) and /work/SRC/openSUSE:Factory/.xf86-video-r128.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xf86-video-r128", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/xf86-video-r128/xf86-video-r128.changes 2012-05-08 12:04:46.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.xf86-video-r128.new/xf86-video-r128.changes 2012-09-15 17:30:45.000000000 +0200 @@ -1,0 +2,8 @@ +Sun Sep 2 21:29:57 UTC 2012 - zai...@opensuse.org + +- Update to version 6.8.4: + + Drop XAA support. This just makes XAA conditional. +- Changes since 6.8.3: + + Port to new compat API. + +------------------------------------------------------------------- Old: ---- xf86-video-r128-6.8.2.tar.bz2 New: ---- xf86-video-r128-6.8.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xf86-video-r128.spec ++++++ --- /var/tmp/diff_new_pack.fK8KdA/_old 2012-09-15 17:30:46.000000000 +0200 +++ /var/tmp/diff_new_pack.fK8KdA/_new 2012-09-15 17:30:46.000000000 +0200 @@ -15,18 +15,19 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: xf86-video-r128 -Version: 6.8.2 +Version: 6.8.4 Release: 0 -License: MIT Summary: ATI Rage 128 video driver for the Xorg X server -Url: http://xorg.freedesktop.org/ +License: MIT Group: System/X11/Servers/XF86_4 +Url: http://xorg.freedesktop.org/ Source0: http://xorg.freedesktop.org/releases/individual/driver/%{name}-%{version}.tar.bz2 BuildRequires: Mesa-devel BuildRequires: pkg-config -BuildRequires: pkgconfig(libdrm) >= 2.2 BuildRequires: pkgconfig(fontsproto) +BuildRequires: pkgconfig(libdrm) >= 2.2 BuildRequires: pkgconfig(pciaccess) >= 0.8.0 BuildRequires: pkgconfig(randrproto) BuildRequires: pkgconfig(renderproto) ++++++ xf86-video-r128-6.8.2.tar.bz2 -> xf86-video-r128-6.8.4.tar.bz2 ++++++ ++++ 26686 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/ChangeLog new/xf86-video-r128-6.8.4/ChangeLog --- old/xf86-video-r128-6.8.2/ChangeLog 2012-03-24 03:24:50.000000000 +0100 +++ new/xf86-video-r128-6.8.4/ChangeLog 2012-07-17 08:24:58.000000000 +0200 @@ -1,3 +1,37 @@ +commit a4231073010096f689df72c1f8f1453852f28d81 +Author: Dave Airlie <airl...@redhat.com> +Date: Tue Jul 17 16:05:09 2012 +1000 + + xf86-video-r128: bump to version 6.8.4 + + Signed-off-by: Dave Airlie <airl...@redhat.com> + +commit 16df5622c550c64711a25a9d8ece9152c3047a94 +Author: Dave Airlie <airl...@gmail.com> +Date: Sun Jul 15 17:14:10 2012 +1000 + + r128: drop XAA support. + + this just makes XAA conditional. + + Signed-off-by: Dave Airlie <airl...@redhat.com> + +commit 734e9ff97b81af732ab7065761212e8eb8f6aa3c +Author: Dave Airlie <airl...@redhat.com> +Date: Mon Jul 2 12:26:11 2012 +0100 + + r128: bump 6.8.3 release + + Signed-off-by: Dave Airlie <airl...@redhat.com> + +commit b027633fcfc0e226b78036e27c66ccd76542e43f +Author: Dave Airlie <airl...@redhat.com> +Date: Wed Jun 6 11:02:27 2012 +0100 + + r128: port to new compat API. + + Signed-off-by: Dave Airlie <airl...@redhat.com> + commit 1ac4cd4b41d0e8232660df78ff136df1214f3907 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Fri Mar 23 19:23:54 2012 -0700 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/config.h.in new/xf86-video-r128-6.8.4/config.h.in --- old/xf86-video-r128-6.8.2/config.h.in 2012-03-24 03:24:19.000000000 +0100 +++ new/xf86-video-r128-6.8.4/config.h.in 2012-07-17 08:24:58.000000000 +0200 @@ -32,6 +32,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the <xaa.h> header file. */ +#undef HAVE_XAA_H + /* xextproto 7.1 available */ #undef HAVE_XEXTPROTO_71 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/configure.ac new/xf86-video-r128-6.8.4/configure.ac --- old/xf86-video-r128-6.8.2/configure.ac 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/configure.ac 2012-07-17 08:00:16.000000000 +0200 @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-r128], - [6.8.2], + [6.8.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-r128]) AC_CONFIG_SRCDIR([Makefile.am]) @@ -117,6 +117,24 @@ [#include "xorg-server.h"]) CPPFLAGS="$SAVE_CPPFLAGS" +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]) + AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes) if test "x$XSERVER_LIBPCIACCESS" = xyes; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/missing new/xf86-video-r128-6.8.4/missing --- old/xf86-video-r128-6.8.2/missing 2012-03-24 03:24:19.000000000 +0100 +++ new/xf86-video-r128-6.8.4/missing 2012-06-06 11:48:33.000000000 +0200 @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ # Not GNU programs, they don't have --version. ;; - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. @@ -226,7 +216,7 @@ \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ touch $file ;; - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/Makefile.am new/xf86-video-r128-6.8.4/src/Makefile.am --- old/xf86-video-r128-6.8.2/src/Makefile.am 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/Makefile.am 2012-06-06 11:49:46.000000000 +0200 @@ -40,6 +40,7 @@ r128_video.c r128_misc.c r128_probe.c $(R128_DRI_SRCS) EXTRA_DIST = \ + compat-api.h \ r128_common.h \ r128_dri.h \ r128_dripriv.h \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/compat-api.h new/xf86-video-r128-6.8.4/src/compat-api.h --- old/xf86-video-r128-6.8.2/src/compat-api.h 1970-01-01 01:00:00.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/compat-api.h 2012-06-06 12:02:41.000000000 +0200 @@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/r128.h new/xf86-video-r128-6.8.4/src/r128.h --- old/xf86-video-r128-6.8.2/src/r128.h 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/r128.h 2012-07-17 07:21:16.000000000 +0200 @@ -44,7 +44,10 @@ #include "xf86Pci.h" /* XAA and Cursor Support */ +#ifdef HAVE_XAA_H #include "xaa.h" +#endif +#include "xf86fbman.h" #include "xf86Cursor.h" /* DDC support */ @@ -53,8 +56,6 @@ /* Xv support */ #include "xf86xv.h" -#include "r128_probe.h" - /* DRI support */ #ifndef XF86DRI #undef R128DRI @@ -67,8 +68,13 @@ #include "GL/glxint.h" #endif +#include "fb.h" + +#include "compat-api.h" #include "atipcirename.h" +#include "r128_probe.h" + #define R128_DEBUG 0 /* Turn off debugging output */ #define R128_IDLE_RETRY 32 /* Fall out of idle loops after this count */ #define R128_TIMEOUT 2000000 /* Fall out of wait loops after this count */ @@ -270,12 +276,14 @@ R128SaveRec SavedReg; /* Original (text) mode */ R128SaveRec ModeReg; /* Current mode */ - Bool (*CloseScreen)(int, ScreenPtr); - void (*BlockHandler)(int, pointer, pointer, pointer); + Bool (*CloseScreen)(CLOSE_SCREEN_ARGS_DECL); + void (*BlockHandler)(BLOCKHANDLER_ARGS_DECL); Bool PaletteSavedOnVT; /* Palette saved on last VT switch */ +#ifdef HAVE_XAA_H XAAInfoRecPtr accel; +#endif Bool accelOn; xf86CursorInfoPtr cursor; unsigned long cursor_start; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/r128_accel.c new/xf86-video-r128-6.8.4/src/r128_accel.c --- old/xf86-video-r128-6.8.2/src/r128_accel.c 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/r128_accel.c 2012-07-17 07:21:16.000000000 +0200 @@ -101,6 +101,7 @@ /* X and server generic header files */ #include "xf86.h" +#ifdef HAVE_XAA_H static struct { int rop; int pattern; @@ -122,6 +123,7 @@ { R128_ROP3_DSan, R128_ROP3_DPan }, /* GXnand */ { R128_ROP3_ONE, R128_ROP3_ONE } /* GXset */ }; +#endif extern int getR128EntityIndex(void); @@ -317,6 +319,7 @@ #endif +#ifdef HAVE_XAA_H /* Setup for XAA SolidFill. */ static void R128SetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop, unsigned int planemask) @@ -1006,6 +1009,7 @@ } } } +#endif /* Initialize the acceleration hardware. */ void R128EngineInit(ScrnInfoPtr pScrn) @@ -1098,6 +1102,8 @@ #ifdef R128DRI +#ifdef HAVE_XAA_H + /* Setup for XAA SolidFill. */ static void R128CCESetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop, @@ -1540,6 +1546,7 @@ ADVANCE_RING(); } +#endif /* Get an indirect buffer for the CCE 2D acceleration commands. */ @@ -1634,6 +1641,7 @@ info->indirectStart = buffer->used; } +#ifdef HAVE_XAA_H /* Flush and release the indirect buffer. */ void R128CCEReleaseIndirect( ScrnInfoPtr pScrn ) @@ -1743,7 +1751,9 @@ } #endif +#endif +#ifdef HAVE_XAA_H /* This callback is required for multihead cards using XAA */ static void R128RestoreAccelState(ScrnInfoPtr pScrn) @@ -1857,12 +1867,16 @@ } } +#endif /* Initialize XAA for supported acceleration and also initialize the graphics hardware for acceleration. */ Bool R128AccelInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; +#ifndef HAVE_XAA_H + return FALSE; +#else + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); XAAInfoRecPtr a; @@ -1880,4 +1894,5 @@ R128EngineInit(pScrn); return XAAInit(pScreen, a); +#endif } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/r128_cursor.c new/xf86-video-r128-6.8.4/src/r128_cursor.c --- old/xf86-video-r128-6.8.2/src/r128_cursor.c 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/r128_cursor.c 2012-06-06 12:02:41.000000000 +0200 @@ -241,7 +241,7 @@ /* Determine if hardware cursor is in use. */ static Bool R128UseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); return info->cursor_start ? TRUE : FALSE; @@ -250,7 +250,7 @@ /* Initialize hardware cursor support. */ Bool R128CursorInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); xf86CursorInfoPtr cursor; FBAreaPtr fbarea; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/r128_dga.c new/xf86-video-r128-6.8.4/src/r128_dga.c --- old/xf86-video-r128-6.8.2/src/r128_dga.c 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/r128_dga.c 2012-07-17 07:21:16.000000000 +0200 @@ -29,10 +29,12 @@ static Bool R128_SetMode(ScrnInfoPtr, DGAModePtr); static int R128_GetViewport(ScrnInfoPtr); static void R128_SetViewport(ScrnInfoPtr, int, int, int); +#ifdef HAVE_XAA_H static void R128_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long); static void R128_BlitRect(ScrnInfoPtr, int, int, int, int, int, int); static void R128_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int, unsigned long); +#endif static DGAModePtr R128SetupDGAMode(ScrnInfoPtr pScrn, DGAModePtr modes, @@ -81,6 +83,7 @@ if (pixmap) currentMode->flags |= DGA_PIXMAP_AVAILABLE; +#ifdef HAVE_XAA_H if (info->accel) { if (info->accel->SetupForSolidFill && info->accel->SubsequentSolidFillRect) @@ -93,6 +96,7 @@ DGA_BLIT_RECT | DGA_BLIT_RECT_TRANS)) currentMode->flags &= ~DGA_CONCURRENT_ACCESS; } +#endif if (pMode->Flags & V_DBLSCAN) currentMode->flags |= DGA_DOUBLESCAN; if (pMode->Flags & V_INTERLACE) @@ -142,7 +146,7 @@ Bool R128DGAInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); DGAModePtr modes = NULL; int num = 0; @@ -211,6 +215,7 @@ info->DGAFuncs.BlitRect = NULL; info->DGAFuncs.BlitTransRect = NULL; +#ifdef HAVE_XAA_H if (info->accel) { info->DGAFuncs.Sync = info->accel->Sync; if (info->accel->SetupForSolidFill && @@ -222,6 +227,7 @@ info->DGAFuncs.BlitTransRect = R128_BlitTransRect; } } +#endif return DGAInit(pScreen, &(info->DGAFuncs), modes, num); } @@ -243,7 +249,7 @@ pScrn->currentMode = info->CurrentLayout.mode; - pScrn->SwitchMode(indx, pScrn->currentMode, 0); + pScrn->SwitchMode(SWITCH_MODE_ARGS(pScrn, pScrn->currentMode)); #ifdef R128DRI if (info->directRenderingEnabled) { R128CCE_STOP(pScrn, info); @@ -256,7 +262,7 @@ R128CCE_START(pScrn, info); } #endif - pScrn->AdjustFrame(indx, 0, 0, 0); + pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, 0, 0)); info->DGAactive = FALSE; } else { if(!info->DGAactive) { /* save the old parameters */ @@ -274,7 +280,7 @@ : pMode->depth); /* R128ModeInit() will set the mode field */ - pScrn->SwitchMode(indx, pMode->mode, 0); + pScrn->SwitchMode(SWITCH_MODE_ARGS(pScrn, pMode->mode)); #ifdef R128DRI if (info->directRenderingEnabled) { @@ -313,11 +319,11 @@ ){ R128InfoPtr info = R128PTR(pScrn); - pScrn->AdjustFrame(pScrn->pScreen->myNum, x, y, flags); + pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, x, y)); info->DGAViewportStatus = 0; /* FIXME */ } - +#ifdef HAVE_XAA_H static void R128_FillRect ( ScrnInfoPtr pScrn, @@ -379,7 +385,7 @@ if (pScrn->bitsPerPixel == info->CurrentLayout.bitsPerPixel) SET_SYNC_FLAG(info->accel); } - +#endif static Bool R128_OpenFramebuffer( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/r128_dri.c new/xf86-video-r128-6.8.4/src/r128_dri.c --- old/xf86-video-r128-6.8.2/src/r128_dri.c 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/r128_dri.c 2012-07-17 07:21:16.000000000 +0200 @@ -77,7 +77,7 @@ client. */ static Bool R128InitVisualConfigs(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); int numConfigs = 0; __GLXvisualConfig *pConfigs = NULL; @@ -279,7 +279,7 @@ drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); info->drmCtx = hwContext; @@ -301,10 +301,11 @@ can start/stop the engine. */ static void R128EnterServer(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; +#ifdef HAVE_XAA_H + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); - if (info->accel) info->accel->NeedToSync = TRUE; +#endif } /* Called when the X server goes to sleep to allow the X server's @@ -315,7 +316,7 @@ can start/stop the engine. */ static void R128LeaveServer(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); unsigned char *R128MMIO = info->MMIO; @@ -356,11 +357,13 @@ { /* FIXME: This routine needs to have acceleration turned on */ ScreenPtr pScreen = pWin->drawable.pScreen; - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); +#ifdef HAVE_XAA_H BoxPtr pbox, pboxSave; int nbox, nboxSave; int depth; +#endif /* FIXME: Use accel when CCE 2D code is written * EA: What is this code kept for? Radeon doesn't have it and @@ -369,7 +372,7 @@ */ if (info->directRenderingEnabled) return; - +#ifdef HAVE_XAA_H /* FIXME: This should be based on the __GLXvisualConfig info */ switch (pScrn->bitsPerPixel) { case 8: depth = 0x000000ff; break; @@ -413,6 +416,7 @@ pbox->y2 - pbox->y1); info->accel->NeedToSync = TRUE; +#endif } /* Copy the back and depth buffers when the X server moves a window. */ @@ -420,7 +424,7 @@ RegionPtr prgnSrc, CARD32 indx) { ScreenPtr pScreen = pWin->drawable.pScreen; - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); /* FIXME: This routine needs to have acceleration turned on */ @@ -905,7 +909,7 @@ static void R128DRIIrqInit(R128InfoPtr info, ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); if (!info->irq) { info->irq = drmGetInterruptFromBusID( @@ -969,7 +973,7 @@ create the DRI data structures and initialize the DRI state. */ Bool R128DRIScreenInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); DRIInfoPtr pDRIInfo; R128DRIPtr pR128DRI; @@ -1206,7 +1210,7 @@ initialization. */ Bool R128DRIFinishScreenInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); R128SAREAPrivPtr pSAREAPriv; R128DRIPtr pR128DRI; @@ -1291,7 +1295,7 @@ resources used by the DRI. */ void R128DRICloseScreen(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); drmR128Init drmInfo; @@ -1386,8 +1390,10 @@ static void R128DRIRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox) { +#ifdef HAVE_XAA_H R128InfoPtr info = R128PTR(pScrn); int i; +#endif R128SAREAPrivPtr pSAREAPriv = DRIGetSAREAPrivate(pScrn->pScreen); /* Don't want to do this when no 3d is active and pages are @@ -1396,6 +1402,7 @@ if (!pSAREAPriv->pfAllowPageFlip && pSAREAPriv->pfCurrentPage == 0) return; +#ifdef HAVE_XAA_H (*info->accel->SetupForScreenToScreenCopy)(pScrn, 1, 1, GXcopy, (CARD32)(-1), -1); @@ -1412,11 +1419,13 @@ yb - ya + 1); } } +#endif } static void R128EnablePageFlip(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; +#ifdef HAVE_XAA_H + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); R128SAREAPrivPtr pSAREAPriv = DRIGetSAREAPrivate(pScreen); @@ -1436,6 +1445,7 @@ pSAREAPriv->pfAllowPageFlip = 1; } +#endif } static void R128DisablePageFlip(ScreenPtr pScreen) @@ -1462,7 +1472,7 @@ static void R128DRITransitionTo3d(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); R128EnablePageFlip(pScreen); @@ -1475,7 +1485,7 @@ static void R128DRITransitionTo2d(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); R128SAREAPrivPtr pSAREAPriv = DRIGetSAREAPrivate(pScreen); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/r128_driver.c new/xf86-video-r128-6.8.4/src/r128_driver.c --- old/xf86-video-r128-6.8.2/src/r128_driver.c 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/r128_driver.c 2012-07-17 07:21:16.000000000 +0200 @@ -78,8 +78,6 @@ #include "r128_sarea.h" #endif -#include "fb.h" - /* colormap initialization */ #include "micmap.h" @@ -118,7 +116,7 @@ #define USE_CRT_ONLY 0 /* Forward definitions for driver functions */ -static Bool R128CloseScreen(int scrnIndex, ScreenPtr pScreen); +static Bool R128CloseScreen(CLOSE_SCREEN_ARGS_DECL); static Bool R128SaveScreen(ScreenPtr pScreen, int mode); static void R128Save(ScrnInfoPtr pScrn); static void R128Restore(ScrnInfoPtr pScrn); @@ -1357,7 +1355,7 @@ OUTREG(info->DDCReg, INREG(info->DDCReg) & ~(CARD32)(R128_GPIO_MONID_A_0 | R128_GPIO_MONID_A_3)); - MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, info->pI2CBus); + MonInfo = xf86DoEDID_DDC2(XF86_SCRN_ARG(pScrn), info->pI2CBus); if(!MonInfo) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No DFP detected\n"); @@ -2165,10 +2163,10 @@ } static void -R128BlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask) +R128BlockHandler(BLOCKHANDLER_ARGS_DECL) { - ScreenPtr pScreen = screenInfo.screens[i]; - ScrnInfoPtr pScrn = xf86Screens[i]; + SCREEN_PTR(arg); + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); #ifdef R128DRI @@ -2177,7 +2175,7 @@ #endif pScreen->BlockHandler = info->BlockHandler; - (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask); + (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); pScreen->BlockHandler = R128BlockHandler; if(info->VideoTimerCallback) { @@ -2186,10 +2184,9 @@ } /* Called at the start of each server generation. */ -Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, - int argc, char **argv) +Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); BoxRec MemBox; int y2; @@ -2223,7 +2220,7 @@ } R128SaveScreen(pScreen, SCREEN_SAVER_ON); - pScrn->AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); + pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0)); /* Visual setup */ miClearVisualTypes(); @@ -2250,11 +2247,11 @@ int maxy = info->FbMapSize / width_bytes; if (noAccel) { - xf86DrvMsg(scrnIndex, X_WARNING, + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Acceleration disabled, not initializing the DRI\n"); info->directRenderingEnabled = FALSE; } else if (maxy <= pScrn->virtualY * 3) { - xf86DrvMsg(scrnIndex, X_WARNING, + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Static buffer allocation failed -- " "need at least %d kB video memory\n", (pScrn->displayWidth * pScrn->virtualY * @@ -2269,7 +2266,7 @@ if(xf86IsEntityShared(pScrn->entityList[0])) { info->directRenderingEnabled = FALSE; - xf86DrvMsg(scrnIndex, X_WARNING, + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Direct Rendering Disabled -- " "Dual-head configuration is not working with DRI " "at present.\nPlease use only one Device/Screen " @@ -2403,29 +2400,29 @@ MemBox.y2 = scanlines; if (!xf86InitFBManager(pScreen, &MemBox)) { - xf86DrvMsg(scrnIndex, X_ERROR, + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Memory manager initialization to (%d,%d) (%d,%d) failed\n", MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2); return FALSE; } else { int width, height; - xf86DrvMsg(scrnIndex, X_INFO, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Memory manager initialized to (%d,%d) (%d,%d)\n", MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2); if ((fbarea = xf86AllocateOffscreenArea(pScreen, pScrn->displayWidth, 2, 0, NULL, NULL, NULL))) { - xf86DrvMsg(scrnIndex, X_INFO, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Reserved area from (%d,%d) to (%d,%d)\n", fbarea->box.x1, fbarea->box.y1, fbarea->box.x2, fbarea->box.y2); } else { - xf86DrvMsg(scrnIndex, X_ERROR, "Unable to reserve area\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to reserve area\n"); } if (xf86QueryLargestOffscreenArea(pScreen, &width, &height, 0, 0, 0)) { - xf86DrvMsg(scrnIndex, X_INFO, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Largest offscreen area available: %d x %d\n", width, height); } @@ -2436,7 +2433,7 @@ pScrn->virtualX, pScrn->virtualY, 32, NULL, NULL, NULL))) { - xf86DrvMsg(scrnIndex, X_INFO, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Reserved back buffer from (%d,%d) to (%d,%d)\n", fbarea->box.x1, fbarea->box.y1, fbarea->box.x2, fbarea->box.y2); @@ -2447,7 +2444,7 @@ fbarea->box.x1 * cpp); info->backPitch = pScrn->displayWidth; } else { - xf86DrvMsg(scrnIndex, X_ERROR, "Unable to reserve back buffer\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to reserve back buffer\n"); info->backX = -1; info->backY = -1; info->backOffset = -1; @@ -2459,7 +2456,7 @@ pScrn->virtualX, pScrn->virtualY + 1, 32, NULL, NULL, NULL))) { - xf86DrvMsg(scrnIndex, X_INFO, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Reserved depth buffer from (%d,%d) to (%d,%d)\n", fbarea->box.x1, fbarea->box.y1, fbarea->box.x2, fbarea->box.y2); @@ -2471,11 +2468,11 @@ info->depthPitch = pScrn->displayWidth; info->spanOffset = ((fbarea->box.y2 - 1) * width_bytes + fbarea->box.x1 * cpp); - xf86DrvMsg(scrnIndex, X_INFO, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Reserved depth span from (%d,%d) offset 0x%x\n", fbarea->box.x1, fbarea->box.y2 - 1, info->spanOffset); } else { - xf86DrvMsg(scrnIndex, X_ERROR, "Unable to reserve depth buffer\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to reserve depth buffer\n"); info->depthX = -1; info->depthY = -1; info->depthOffset = -1; @@ -2483,7 +2480,7 @@ info->spanOffset = -1; } - xf86DrvMsg(scrnIndex, X_INFO, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Reserved %d kb for textures at offset 0x%x\n", info->textureSize/1024, info->textureOffset); } @@ -2503,7 +2500,7 @@ MemBox.y2 = y2; if (!xf86InitFBManager(pScreen, &MemBox)) { - xf86DrvMsg(scrnIndex, X_ERROR, + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Memory manager initialization to (%d,%d) (%d,%d) failed\n", MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2); return FALSE; @@ -2511,21 +2508,21 @@ int width, height; FBAreaPtr fbarea; - xf86DrvMsg(scrnIndex, X_INFO, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Memory manager initialized to (%d,%d) (%d,%d)\n", MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2); if ((fbarea = xf86AllocateOffscreenArea(pScreen, pScrn->displayWidth, 2, 0, NULL, NULL, NULL))) { - xf86DrvMsg(scrnIndex, X_INFO, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Reserved area from (%d,%d) to (%d,%d)\n", fbarea->box.x1, fbarea->box.y1, fbarea->box.x2, fbarea->box.y2); } else { - xf86DrvMsg(scrnIndex, X_ERROR, "Unable to reserve area\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to reserve area\n"); } if (xf86QueryLargestOffscreenArea(pScreen, &width, &height, 0, 0, 0)) { - xf86DrvMsg(scrnIndex, X_INFO, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Largest offscreen area available: %d x %d\n", width, height); } @@ -2535,16 +2532,16 @@ /* Acceleration setup */ if (!noAccel) { if (R128AccelInit(pScreen)) { - xf86DrvMsg(scrnIndex, X_INFO, "Acceleration enabled\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration enabled\n"); info->accelOn = TRUE; } else { - xf86DrvMsg(scrnIndex, X_ERROR, + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Acceleration initialization failed\n"); - xf86DrvMsg(scrnIndex, X_INFO, "Acceleration disabled\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration disabled\n"); info->accelOn = FALSE; } } else { - xf86DrvMsg(scrnIndex, X_INFO, "Acceleration disabled\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration disabled\n"); info->accelOn = FALSE; } @@ -2571,18 +2568,18 @@ info->cursor_start / pScrn->displayWidth); if (xf86QueryLargestOffscreenArea(pScreen, &width, &height, 0, 0, 0)) { - xf86DrvMsg(scrnIndex, X_INFO, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Largest offscreen area available: %d x %d\n", width, height); } } else { - xf86DrvMsg(scrnIndex, X_ERROR, + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Hardware cursor initialization failed\n"); - xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using software cursor\n"); } } else { info->cursor_start = 0; - xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using software cursor\n"); } /* Colormap setup */ @@ -4072,7 +4069,7 @@ static Bool R128SaveScreen(ScreenPtr pScreen, int mode) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); Bool unblank; unblank = xf86IsUnblank(mode); @@ -4093,23 +4090,23 @@ * The workaround is to switch the mode, then switch to another VT, then * switch back. --AGD */ -Bool R128SwitchMode(int scrnIndex, DisplayModePtr mode, int flags) +Bool R128SwitchMode(SWITCH_MODE_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); R128InfoPtr info = R128PTR(pScrn); Bool ret; info->SwitchingMode = TRUE; - ret = R128ModeInit(xf86Screens[scrnIndex], mode); + ret = R128ModeInit(pScrn, mode); info->SwitchingMode = FALSE; return ret; } /* Used to disallow modes that are not supported by the hardware. */ -ModeStatus R128ValidMode(int scrnIndex, DisplayModePtr mode, +ModeStatus R128ValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); R128InfoPtr info = R128PTR(pScrn); if (info->BIOSDisplay == R128_BIOS_DISPLAY_CRT) @@ -4185,9 +4182,9 @@ /* Adjust viewport into virtual desktop such that (0,0) in viewport space is (x,y) in virtual space. */ -void R128AdjustFrame(int scrnIndex, int x, int y, int flags) +void R128AdjustFrame(ADJUST_FRAME_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); R128InfoPtr info = R128PTR(pScrn); unsigned char *R128MMIO = info->MMIO; int Base; @@ -4221,14 +4218,14 @@ /* Called when VT switching back to the X server. Reinitialize the video mode. */ -Bool R128EnterVT(int scrnIndex, int flags) +Bool R128EnterVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); R128InfoPtr info = R128PTR(pScrn); R128TRACE(("R128EnterVT\n")); if (info->FBDev) { - if (!fbdevHWEnterVT(scrnIndex,flags)) return FALSE; + if (!fbdevHWEnterVT(VT_FUNC_ARGS)) return FALSE; } else if (!R128ModeInit(pScrn, pScrn->currentMode)) return FALSE; if (info->accelOn) @@ -4247,16 +4244,16 @@ #endif info->PaletteSavedOnVT = FALSE; - pScrn->AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); + pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0)); return TRUE; } /* Called when VT switching away from the X server. Restore the original text mode. */ -void R128LeaveVT(int scrnIndex, int flags) +void R128LeaveVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); R128InfoPtr info = R128PTR(pScrn); R128SavePtr save = &info->ModeReg; @@ -4270,7 +4267,7 @@ R128SavePalette(pScrn, save); info->PaletteSavedOnVT = TRUE; if (info->FBDev) - fbdevHWLeaveVT(scrnIndex,flags); + fbdevHWLeaveVT(VT_FUNC_ARGS); else R128Restore(pScrn); } @@ -4279,9 +4276,9 @@ /* Called at the end of each server generation. Restore the original text mode, unmap video memory, and unwrap and call the saved CloseScreen function. */ -static Bool R128CloseScreen(int scrnIndex, ScreenPtr pScreen) +static Bool R128CloseScreen(CLOSE_SCREEN_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); R128TRACE(("R128CloseScreen\n")); @@ -4299,8 +4296,10 @@ R128UnmapMem(pScrn); } +#ifdef HAVE_XAA_H if (info->accel) XAADestroyInfoRec(info->accel); info->accel = NULL; +#endif if (info->scratch_save) free(info->scratch_save); info->scratch_save = NULL; @@ -4321,12 +4320,12 @@ pScreen->BlockHandler = info->BlockHandler; pScreen->CloseScreen = info->CloseScreen; - return (*pScreen->CloseScreen)(scrnIndex, pScreen); + return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); } -void R128FreeScreen(int scrnIndex, int flags) +void R128FreeScreen(FREE_SCREEN_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); R128InfoPtr info = R128PTR(pScrn); R128TRACE(("R128FreeScreen\n")); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/r128_misc.c new/xf86-video-r128-6.8.4/src/r128_misc.c --- old/xf86-video-r128-6.8.2/src/r128_misc.c 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/r128_misc.c 2012-06-06 12:02:41.000000000 +0200 @@ -24,10 +24,11 @@ #include "config.h" #endif -#include "r128_probe.h" #include "r128_version.h" #include "xf86.h" +#include "r128.h" +#include "r128_probe.h" /* Module loader interface for subsidiary driver module */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/r128_probe.c new/xf86-video-r128-6.8.4/src/r128_probe.c --- old/xf86-video-r128-6.8.2/src/r128_probe.c 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/r128_probe.c 2012-06-06 12:02:41.000000000 +0200 @@ -39,7 +39,6 @@ * Kevin E. Martin <mar...@valinux.com> */ -#include "r128_probe.h" #include "r128_version.h" #include "atipcirename.h" @@ -51,6 +50,9 @@ #include "xf86Resources.h" #endif +#include "compat-api.h" +#include "r128_probe.h" + #ifndef XSERVER_LIBPCIACCESS static Bool R128Probe(DriverPtr drv, int flags); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/r128_probe.h new/xf86-video-r128-6.8.4/src/r128_probe.h --- old/xf86-video-r128-6.8.2/src/r128_probe.h 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/r128_probe.h 2012-06-06 12:02:41.000000000 +0200 @@ -60,13 +60,13 @@ /* r128_driver.c */ extern Bool R128PreInit(ScrnInfoPtr, int); -extern Bool R128ScreenInit(int, ScreenPtr, int, char **); -extern Bool R128SwitchMode(int, DisplayModePtr, int); -extern void R128AdjustFrame(int, int, int, int); -extern Bool R128EnterVT(int, int); -extern void R128LeaveVT(int, int); -extern void R128FreeScreen(int, int); -extern ModeStatus R128ValidMode(int, DisplayModePtr, Bool, int); +extern Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL); +extern Bool R128SwitchMode(SWITCH_MODE_ARGS_DECL); +extern void R128AdjustFrame(ADJUST_FRAME_ARGS_DECL); +extern Bool R128EnterVT(VT_FUNC_ARGS_DECL); +extern void R128LeaveVT(VT_FUNC_ARGS_DECL); +extern void R128FreeScreen(FREE_SCREEN_ARGS_DECL); +extern ModeStatus R128ValidMode(SCRN_ARG_TYPE, DisplayModePtr, Bool, int); extern const OptionInfoRec * R128OptionsWeak(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-r128-6.8.2/src/r128_video.c new/xf86-video-r128-6.8.4/src/r128_video.c --- old/xf86-video-r128-6.8.2/src/r128_video.c 2012-03-24 03:24:11.000000000 +0100 +++ new/xf86-video-r128-6.8.4/src/r128_video.c 2012-06-06 12:02:41.000000000 +0200 @@ -80,7 +80,7 @@ void R128InitVideo(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; XF86VideoAdaptorPtr newAdaptor = NULL; int num_adaptors; @@ -216,7 +216,7 @@ static XF86VideoAdaptorPtr R128SetupImageVideo(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); R128PortPrivPtr pPriv; XF86VideoAdaptorPtr adapt; @@ -583,7 +583,7 @@ xf86FreeOffscreenLinear(linear); } - pScreen = screenInfo.screens[pScrn->scrnIndex]; + pScreen = xf86ScrnToScreen(pScrn); new_linear = xf86AllocateOffscreenLinear(pScreen, size, 8, NULL, NULL, NULL); -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org