xserver-xorg-video-rendition: Changes to 'upstream-experimental'
configure.ac | 57 ++++++++++++++-------
man/Makefile.am | 22 +-------
man/rendition.man | 1
src/Makefile.am | 5 +
src/accelX.c | 16 +++---
src/compat-api.h | 99 ++++++++++++++++++++++++++++++++++++++
src/hwcursor.c | 4 -
src/hwcursor.h | 2
src/rendition.c | 127 ++++++++++++++++++-------------------------------
src/rendition.h | 3 +
src/rendition_shadow.c | 6 +-
src/rendition_shadow.h | 2
src/v1krisc.c | 62 +++++++++++------------
src/vboard.c | 4 -
src/vgafont-std.data | 1
src/vgafont-vrx.data | 1
src/vgapalette.data | 1
src/vloaduc.c | 12 ++--
src/vmodes.c | 11 ++--
src/vos.h | 12 ++--
src/vramdac.c | 36 ++++++-------
src/vtypes.h | 9 +--
22 files changed, 281 insertions(+), 212 deletions(-)
New commits:
commit 07026400300a985ea19346a6745685bb8dfea56f
Author: Dave Airlie <airlied@redhat.com>
Date: Tue Jul 17 16:05:09 2012 +1000
xf86-video-rendition: bump to version 4.2.5
Signed-off-by: Dave Airlie <airlied@redhat.com>
diff --git a/configure.ac b/configure.ac
index eecfd16..4adf280 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-rendition],
- [4.2.4],
+ [4.2.5],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-video-rendition])
AC_CONFIG_SRCDIR([Makefile.am])
commit dcba90a3398321b2e24a5db54defa516efa4c817
Author: Dave Airlie <airlied@redhat.com>
Date: Tue Jul 17 15:32:56 2012 +1000
rendition: fix build against older X servers.
Signed-off-by: Dave Airlie <airlied@redhat.com>
diff --git a/src/rendition.c b/src/rendition.c
index 5fa5eca..7c74f76 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -1075,6 +1075,7 @@ renditionScreenInit(SCREEN_INIT_ARGS_DECL)
VisualPtr visual;
vgaHWPtr pvgaHW;
int displayWidth,width,height;
+ int scrnIndex = pScreenInfo->scrnIndex;
#ifdef DEBUG
ErrorF("RENDITION: renditionScreenInit() called\n");
commit 23a14278543eaa1cd37709eb8ccad2ab2babc81b
Author: Dave Airlie <airlied@redhat.com>
Date: Mon Jul 16 03:44:40 2012 +0100
rendition: port to non-XAA server
even though rendition never actually had working XAA support, ah well.
Signed-off-by: Dave Airlie <airlied@redhat.com>
diff --git a/configure.ac b/configure.ac
index f74b912..eecfd16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,24 @@ AC_CHECK_HEADER(xf1bpp.h,[AC_DEFINE(HAVE_XF1BPP, 1, [Have 1bpp support])],[])
AC_CHECK_HEADER(xf4bpp.h,[AC_DEFINE(HAVE_XF4BPP, 1, [Have 4bpp support])],[])
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])
+
if test "x$XSERVER_LIBPCIACCESS" = xyes; then
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
diff --git a/src/rendition.h b/src/rendition.h
index 7d104a8..f7f13d4 100644
--- a/src/rendition.h
+++ b/src/rendition.h
@@ -53,8 +53,10 @@
#include "fb.h"
/* Drivers using the XAA interface ... */
+#ifdef HAVE_XAA_H
#include "xaa.h"
#include "xaalocal.h"
+#endif
#include "xf86fbman.h"
/* HW-cursor definitions */
diff --git a/src/vtypes.h b/src/vtypes.h
index 5e0abf1..b221aa3 100644
--- a/src/vtypes.h
+++ b/src/vtypes.h
@@ -185,7 +185,9 @@ typedef struct _renditionRec
EntityInfoPtr pEnt; /* entity information */
CloseScreenProcPtr CloseScreen; /* wrap CloseScreen */
xf86CursorInfoPtr CursorInfoRec; /* Cursor data */
+#ifdef HAVE_XAA_H
XAAInfoRecPtr AccelInfoRec; /* Needed for XAA */
+#endif
OptionInfoPtr Options;
RenditionRegRec saveRegs;
} renditionRec, *renditionPtr;
commit effa2938ee2b576b8eb6cd7f774d8b1656c50e82
Author: Dave Airlie <airlied@redhat.com>
Date: Wed Jun 6 14:13:48 2012 +0100
rendition: port to new compat API.
Signed-off-by: Dave Airlie <airlied@redhat.com>
diff --git a/src/Makefile.am b/src/Makefile.am
index 6770629..0666377 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,6 +31,7 @@ rendition_drv_ladir = @moduledir@/drivers
rendition_drv_la_SOURCES = \
cmd2d.h \
commonregs.h \
+ compat-api.h \
cscode.h \
hwcursor.c \
hwcursor.h \
diff --git a/src/accelX.c b/src/accelX.c
index ed4964e..bd237b3 100644
--- a/src/accelX.c
+++ b/src/accelX.c
@@ -133,7 +133,7 @@ RENDITIONAccelPreInit(ScrnInfoPtr pScreenInfo)
void
RENDITIONAccelXAAInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen);
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
XAAInfoRecPtr pXAAinfo;
diff --git a/src/compat-api.h b/src/compat-api.h
new file mode 100644
index 0000000..e4f03d2
--- /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 <airlied@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 pScreenInfo = 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 pScreenInfo->scrnIndex, 0
+
+#define XF86_SCRN_ARG(x) ((x)->scrnIndex)
+#else
+#define SCRN_ARG_TYPE ScrnInfoPtr
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScreenInfo = (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 pScreenInfo
+
+#define XF86_SCRN_ARG(x) (x)
+
+#endif
+
+#endif
diff --git a/src/hwcursor.c b/src/hwcursor.c
index c3b5ee8..609417a 100644
--- a/src/hwcursor.c
+++ b/src/hwcursor.c
@@ -75,9 +75,9 @@ RenditionHWCursorRelease (ScrnInfoPtr pScreenInfo)
Bool
-RenditionHWCursorInit(int scrnIndex, ScreenPtr pScreen)
+RenditionHWCursorInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScreenInfo = xf86Screens[scrnIndex];
+ ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen);
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
xf86CursorInfoPtr infoPtr;
diff --git a/src/hwcursor.h b/src/hwcursor.h
index e0d742b..cfe24d3 100644
--- a/src/hwcursor.h
+++ b/src/hwcursor.h
@@ -10,7 +10,7 @@
*/
void RenditionHWCursorPreInit(ScrnInfoPtr pScreenInfo);
-Bool RenditionHWCursorInit(int scrnIndex, ScreenPtr pScreen);
+Bool RenditionHWCursorInit(ScreenPtr pScreen);
void RenditionHWCursorRelease (ScrnInfoPtr pScreenInfo);
#define HC_SIZE (64*64*2)/8 /* 1024 */
diff --git a/src/rendition.c b/src/rendition.c
index 8da5e13..5fa5eca 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -106,14 +106,14 @@ static Bool renditionPciProbe(DriverPtr drv, int entity_num,
static Bool renditionProbe(DriverPtr, int);
#endif
static Bool renditionPreInit(ScrnInfoPtr, int);
-static Bool renditionScreenInit(int, ScreenPtr, int, char **);
-static Bool renditionSwitchMode(int, DisplayModePtr, int);
-static void renditionAdjustFrame(int, int, int, int);
-static Bool renditionEnterVT(int, int);
-static void renditionLeaveVT(int, int);
-static void renditionFreeScreen(int, int);
-
-static ModeStatus renditionValidMode(int, DisplayModePtr, Bool, int);
+static Bool renditionScreenInit(SCREEN_INIT_ARGS_DECL);
+static Bool renditionSwitchMode(SWITCH_MODE_ARGS_DECL);
+static void renditionAdjustFrame(ADJUST_FRAME_ARGS_DECL);
+static Bool renditionEnterVT(VT_FUNC_ARGS_DECL);
+static void renditionLeaveVT(VT_FUNC_ARGS_DECL);
+static void renditionFreeScreen(FREE_SCREEN_ARGS_DECL);
+
+static ModeStatus renditionValidMode(SCRN_ARG_TYPE, DisplayModePtr, Bool, int);
static Bool renditionMapMem(ScrnInfoPtr pScreenInfo);
static Bool renditionUnmapMem(ScrnInfoPtr pScreenInfo);
#if 0
@@ -1022,9 +1022,9 @@ renditionLeaveGraphics(ScrnInfoPtr pScreenInfo)
/* Unravel the screen */
static Bool
-renditionCloseScreen(int scrnIndex, ScreenPtr pScreen)
+renditionCloseScreen(CLOSE_SCREEN_ARGS_DECL)
{
- ScrnInfoPtr pScreenInfo = xf86Screens[scrnIndex];
+ ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen);
renditionPtr prenditionPriv=renditionGetRec(pScreenInfo);
Bool Closed = TRUE;
@@ -1044,7 +1044,7 @@ renditionCloseScreen(int scrnIndex, ScreenPtr pScreen)
if (prenditionPriv
&& (pScreen->CloseScreen = prenditionPriv->CloseScreen)) {
prenditionPriv->CloseScreen = NULL;
- Closed = (*pScreen->CloseScreen)(scrnIndex, pScreen);
+ Closed = (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
}
#ifdef DEBUG
@@ -1066,9 +1066,9 @@ renditionDPMSSet(ScrnInfoPtr pScreen, int mode, int flags)
}
static Bool
-renditionScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+renditionScreenInit(SCREEN_INIT_ARGS_DECL)
{
- ScrnInfoPtr pScreenInfo = xf86Screens[scrnIndex];
+ ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen);
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
Bool Inited = FALSE;
unsigned char *FBBase;
@@ -1109,8 +1109,8 @@ renditionScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
/* blank the screen */
renditionSaveScreen(pScreen, SCREEN_SAVER_ON);
- (*pScreenInfo->AdjustFrame)(pScreenInfo->scrnIndex,
- pScreenInfo->frameX0, pScreenInfo->frameY0, 0);
+ (*pScreenInfo->AdjustFrame)(ADJUST_FRAME_ARGS(pScreenInfo,
+ pScreenInfo->frameX0, pScreenInfo->frameY0));
miClearVisualTypes();
@@ -1186,7 +1186,7 @@ renditionScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if(!xf86ReturnOptValBool(pRendition->Options, OPTION_SW_CURSOR,0)&&
!pRendition->board.rotate){
/* Initialise HW cursor */
- if(!RenditionHWCursorInit(scrnIndex, pScreen)){
+ if(!RenditionHWCursorInit(pScreen)){
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
"Hardware Cursor initalization failed!!\n");
}
@@ -1238,7 +1238,7 @@ renditionScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
pScreen->SaveScreen = renditionSaveScreen;
if (!Inited)
- renditionCloseScreen(scrnIndex, pScreen);
+ renditionCloseScreen(CLOSE_SCREEN_ARGS);
if (serverGeneration == 1)
xf86ShowUnusedOptions(pScreenInfo->scrnIndex, pScreenInfo->options);
@@ -1251,19 +1251,20 @@ renditionScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
static Bool
-renditionSwitchMode(int scrnIndex, DisplayModePtr pMode, int flags)
+renditionSwitchMode(SWITCH_MODE_ARGS_DECL)
{
+ SCRN_INFO_PTR(arg);
#ifdef DEBUG
ErrorF("RENDITION: renditionSwitchMode() called\n");
#endif
- return renditionSetMode(xf86Screens[scrnIndex], pMode);
+ return renditionSetMode(pScreenInfo, mode);
}
static void
-renditionAdjustFrame(int scrnIndex, int x, int y, int flags)
+renditionAdjustFrame(ADJUST_FRAME_ARGS_DECL)
{
- ScrnInfoPtr pScreenInfo=xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
int offset, virtualwidth, bitsPerPixel;
@@ -1285,9 +1286,9 @@ renditionAdjustFrame(int scrnIndex, int x, int y, int flags)
static Bool
-renditionEnterVT(int scrnIndex, int flags)
+renditionEnterVT(VT_FUNC_ARGS_DECL)
{
- ScrnInfoPtr pScreenInfo = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
vgaHWPtr pvgaHW = VGAHWPTR(pScreenInfo);
#ifdef DEBUG
@@ -1304,32 +1305,34 @@ renditionEnterVT(int scrnIndex, int flags)
if (!renditionSetMode(pScreenInfo, pScreenInfo->currentMode))
return FALSE;
- (*pScreenInfo->AdjustFrame)(pScreenInfo->scrnIndex,
- pScreenInfo->frameX0, pScreenInfo->frameY0, 0);
+ (*pScreenInfo->AdjustFrame)(ADJUST_FRAME_ARGS(pScreenInfo,
+ pScreenInfo->frameX0, pScreenInfo->frameY0));
return TRUE;
}
static void
-renditionLeaveVT(int scrnIndex, int flags)
+renditionLeaveVT(VT_FUNC_ARGS_DECL)
{
+ SCRN_INFO_PTR(arg);
#ifdef DEBUG
ErrorF("RENDITION: renditionLeaveVT() called\n");
#endif
- renditionLeaveGraphics(xf86Screens[scrnIndex]);
+ renditionLeaveGraphics(pScreenInfo);
}
static void
-renditionFreeScreen(int scrnIndex, int flags)
+renditionFreeScreen(FREE_SCREEN_ARGS_DECL)
{
- renditionFreeRec(xf86Screens[scrnIndex]);
+ SCRN_INFO_PTR(arg);
+ renditionFreeRec(pScreenInfo);
}
static ModeStatus
-renditionValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose,
+renditionValidMode(SCRN_ARG_TYPE arg, DisplayModePtr pMode, Bool Verbose,
int flags)
{
if (pMode->Flags & V_INTERLACE)
diff --git a/src/rendition.h b/src/rendition.h
index 0ea5cca..7d104a8 100644
--- a/src/rendition.h
+++ b/src/rendition.h
@@ -65,5 +65,6 @@
#include "commonregs.h"
+#include "compat-api.h"
/* end of __RENDITION_H__ */
#endif
diff --git a/src/rendition_shadow.c b/src/rendition_shadow.c
index 5f7a5f5..b5e4ef6 100644
--- a/src/rendition_shadow.c
+++ b/src/rendition_shadow.c
@@ -48,9 +48,9 @@ renditionRefreshArea(ScrnInfoPtr pScreenInfo, int num, BoxPtr pbox)
}
void
-renditionPointerMoved(int index, int x, int y)
+renditionPointerMoved(SCRN_ARG_TYPE arg, int x, int y)
{
- ScrnInfoPtr pScreenInfo = xf86Screens[index];
+ SCRN_INFO_PTR(arg);
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
int newX, newY;
@@ -62,7 +62,7 @@ renditionPointerMoved(int index, int x, int y)
newY = pScreenInfo->pScreen->width - x - 1;
}
- (*pRendition->board.PointerMoved)(index, newX, newY);
+ (*pRendition->board.PointerMoved)(arg, newX, newY);
}
void
diff --git a/src/rendition_shadow.h b/src/rendition_shadow.h
index 5d9634f..d4527a8 100644
--- a/src/rendition_shadow.h
+++ b/src/rendition_shadow.h
@@ -12,7 +12,7 @@ void renditionRefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
void renditionRefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
void renditionRefreshArea24(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
void renditionRefreshArea32(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
-void renditionPointerMoved(int index, int x, int y);
+void renditionPointerMoved(SCRN_ARG_TYPE arg, int x, int y);
#endif
diff --git a/src/vmodes.c b/src/vmodes.c
index f2dae0b..ba91d1a 100644
--- a/src/vmodes.c
+++ b/src/vmodes.c
@@ -301,8 +301,8 @@ verite_setmode(ScrnInfoPtr pScreenInfo, struct verite_modeinfo_t *mode)
pRendition->board.mode.virtualwidth=pRendition->board.mode.screenwidth;
pRendition->board.init=1;
- (*pScreenInfo->AdjustFrame)(pScreenInfo->scrnIndex,
- pScreenInfo->frameX0, pScreenInfo->frameY0, 0);
+ (*pScreenInfo->AdjustFrame)(ADJUST_FRAME_ARGS(pScreenInfo,
+ pScreenInfo->frameX0, pScreenInfo->frameY0));
/* Need to fix up syncs */
diff --git a/src/vtypes.h b/src/vtypes.h
index 3a701f4..5e0abf1 100644
--- a/src/vtypes.h
+++ b/src/vtypes.h
@@ -161,7 +161,7 @@ struct verite_board_t {
Bool shadowfb; /* Use ShadowFB ? */
vu8 *shadowPtr;
vu32 shadowPitch;
- void (*PointerMoved)(int index, int x, int y);
+ void (*PointerMoved)(SCRN_ARG_TYPE arg, int x, int y);
int rotate; /* Rotate clockwise or counterclockwise */
commit 7b26793ba2572c412f03e9a4acf83237fbec71bd
Author: Adam Jackson <ajax@redhat.com>
Date: Mon Dec 19 17:13:29 2011 -0500
Fix for new vgahw ABI
Signed-off-by: Adam Jackson <ajax@redhat.com>
diff --git a/src/rendition.c b/src/rendition.c
index 3d4afef..8da5e13 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -651,6 +651,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
pvgaHW = VGAHWPTR(pScreenInfo);
pvgaHW->MapSize = 0x00010000; /* Standard 64kB VGA window */
+ vgaHWSetStdFuncs(pvgaHW);
vgaHWGetIOBase(pvgaHW); /* Get VGA I/O base */
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
commit b08572f7b60481eb3b7ab6058b74a56fd646d133
Author: Adam Jackson <ajax@redhat.com>
Date: Mon Dec 19 17:11:45 2011 -0500
Unhook the pretense of XAA support
This has never shipped enabled in any Xorg release. I'm pretty sure the
same is true of XFree86 4.x releases.
Signed-off-by: Adam Jackson <ajax@redhat.com>
diff --git a/src/Makefile.am b/src/Makefile.am
index 5194089..6770629 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,8 +29,6 @@ rendition_drv_la_LDFLAGS = -module -avoid-version
rendition_drv_ladir = @moduledir@/drivers
rendition_drv_la_SOURCES = \
- accel.h \
- accelX.c \
cmd2d.h \
commonregs.h \
cscode.h \
@@ -64,6 +62,8 @@ dist_driver_DATA = \
v20002d.uc
EXTRA_DIST = \
+ accel.h \
+ accelX.c \
README.uc \
vgafont-std.data \
vgafont-vrx.data \
diff --git a/src/rendition.c b/src/rendition.c
index 3202b49..3d4afef 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -38,14 +38,6 @@
#endif
/*
- * Activate acceleration code or not.
- *
- * WARNING BUGGY !!!
- * Yes, you activate it on your own risk.
- */
-#define USE_ACCEL 0
-
-/*
* includes
*/
@@ -58,7 +50,6 @@
#include "vtypes.h"
#include "vboard.h"
#include "vmodes.h"
-#include "accel.h"
#include "vramdac.h"
#include "rendition_shadow.h"
#include "vbe.h"
@@ -662,7 +653,6 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
pvgaHW->MapSize = 0x00010000; /* Standard 64kB VGA window */
vgaHWGetIOBase(pvgaHW); /* Get VGA I/O base */
- pRendition->board.accel=0;
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
pRendition->board.vgaio_base = pvgaHW->PIOOffset;
#else
@@ -868,31 +858,6 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
xf86DrvMsg(pScreenInfo->scrnIndex, X_CONFIG,
"Software cursor selected\n");
- /* Unmapping delayed until after micrcode loading */
- /****************************************/
- /* Reserve memory and load the microcode */
- /****************************************/
-#if USE_ACCEL
- if (!xf86ReturnOptValBool(pRendition->Options, OPTION_NOACCEL,0) &&
- !pRendition->board.shadowfb) {
- /* Load XAA if needed */
- if (xf86LoadSubModule(pScreenInfo, "xaa")) {
- renditionMapMem(pScreenInfo);
- RENDITIONAccelPreInit (pScreenInfo);
- renditionUnmapMem(pScreenInfo);
- pRendition->board.accel = TRUE;
- } else xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
- ("XAA module not found: "
- "Skipping acceleration\n"));
- }
- else
- xf86DrvMsg(pScreenInfo->scrnIndex, X_CONFIG,
- ("Skipping acceleration on users request\n"));
-#else
- xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
- ("Skipping acceleration\n"));
-#endif
-
#ifdef DEBUG
ErrorF("PreInit OK...!!!!\n");
sleep(2);
@@ -1070,9 +1035,6 @@ renditionCloseScreen(int scrnIndex, ScreenPtr pScreen)
if (prenditionPriv->board.hwcursor_used)
RenditionHWCursorRelease(pScreenInfo);
- if (prenditionPriv->board.accel)
- RENDITIONAccelNone(pScreenInfo);
-
if (pScreenInfo->vtSema)
renditionLeaveGraphics(pScreenInfo);
@@ -1215,10 +1177,6 @@ renditionScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
/* The actual setup of the driver-specific code */
/* has to be after fbScreenInit and before cursor init */
/*********************************************************/
-#if USE_ACCEL
- if (pRendition->board.accel)
- RENDITIONAccelXAAInit (pScreen);
-#endif
/* Initialise cursor functions */
xf86SetSilkenMouse(pScreen);
diff --git a/src/vtypes.h b/src/vtypes.h
index e4ad468..3a701f4 100644
--- a/src/vtypes.h
+++ b/src/vtypes.h
@@ -132,9 +132,6 @@ struct verite_board_t {
Bool init;
/* */
- Bool accel;
-
- /* */
vu32 csucode_base;
vu32 ucode_base;
vu32 ucode_entry;
commit 810c279e9106a96aa6c6d395610ade3cd1b61fba
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date: Wed Oct 19 00:31:41 2011 -0700
Include <unistd.h> for usleep
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
diff --git a/src/vmodes.c b/src/vmodes.c
index 5357fa5..f2dae0b 100644
--- a/src/vmodes.c
+++ b/src/vmodes.c
@@ -20,6 +20,7 @@
#include "v1kregs.h"
#include "v2kregs.h"
+#include <unistd.h>
#undef DEBUG
commit 99d960880e3aedc35238e26841e13e12f317395d
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date: Wed Oct 19 00:31:05 2011 -0700
Build fix for ABI Version 12
ABI Version 12 removes support for multiple PCI domains. If you need to
use this driver on a system with more than one PCI domain, you should
either port this driver to using libpciaccess directly or stick with an
older server.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
diff --git a/src/rendition.c b/src/rendition.c
index f8c1df4..3202b49 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -663,7 +663,11 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
vgaHWGetIOBase(pvgaHW); /* Get VGA I/O base */
pRendition->board.accel=0;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
pRendition->board.vgaio_base = pvgaHW->PIOOffset;
+#else
+ pRendition->board.vgaio_base = 0;
+#endif
pRendition->board.io_base = pRendition->board.vgaio_base
#ifdef XSERVER_LIBPCIACCESS
+ pRendition->PciInfo->regions[1].base_addr;
commit efcd0f31433ddbcf04ca040f8474f6cb8a080271
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date: Wed Oct 19 00:29:28 2011 -0700
Use unsigned long rather than deprecated IOADDRESS
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
diff --git a/src/accelX.c b/src/accelX.c
index a499c56..ed4964e 100644
--- a/src/accelX.c
+++ b/src/accelX.c
@@ -289,7 +289,7 @@ int
RENDITIONInitUcode(ScrnInfoPtr pScreenInfo)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
- IOADDRESS iob = pRendition->board.io_base;
+ unsigned long iob = pRendition->board.io_base;
if (0 == verite_getstride(pScreenInfo, NULL,
&pRendition->board.mode.stride0,
@@ -367,7 +367,7 @@ void
RENDITIONRestoreUcode(ScrnInfoPtr pScreenInfo)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
- IOADDRESS iob = pRendition->board.io_base;
+ unsigned long iob = pRendition->board.io_base;
vu8 memend;
@@ -410,7 +410,7 @@ void
RENDITIONSaveUcode(ScrnInfoPtr pScreenInfo)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
- IOADDRESS iob = pRendition->board.io_base;
+ unsigned long iob = pRendition->board.io_base;
vu8 memend;
#ifdef DEBUG
@@ -445,7 +445,7 @@ void
RENDITIONSyncV1000(ScrnInfoPtr pScreenInfo)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
- IOADDRESS iob = pRendition->board.io_base;
+ unsigned long iob = pRendition->board.io_base;
int c;
@@ -555,7 +555,7 @@ RENDITIONSubsequentScreenToScreenCopy(ScrnInfoPtr pScreenInfo,
int w, int h)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
- IOADDRESS iob = pRendition->board.io_base;
+ unsigned long iob = pRendition->board.io_base;
#ifdef DEBUG
@@ -607,7 +607,7 @@ RENDITIONSubsequentSolidFillRect(ScrnInfoPtr pScreenInfo,
int x, int y, int w, int h)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
- IOADDRESS iob = pRendition->board.io_base;
+ unsigned long iob = pRendition->board.io_base;
#ifdef DEBUG
@@ -639,7 +639,7 @@ RENDITIONSubsequentTwoPointLine(ScrnInfoPtr pScreenInfo,
int bias)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
- IOADDRESS iob = pRendition->board.io_base;
+ unsigned long iob = pRendition->board.io_base;
#ifdef DEBUG
diff --git a/src/rendition.c b/src/rendition.c
index 2d9c4c4..f8c1df4 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -1484,7 +1484,7 @@ static xf86MonPtr
renditionDDC (ScrnInfoPtr pScreenInfo)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
- IOADDRESS iob=pRendition->board.io_base;
+ unsigned long iob=pRendition->board.io_base;
vu32 temp;
xf86MonPtr MonInfo = NULL;
@@ -1517,7 +1517,7 @@ static unsigned int
renditionDDC1Read (ScrnInfoPtr pScreenInfo)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
- IOADDRESS iob=pRendition->board.io_base;
+ unsigned long iob=pRendition->board.io_base;
vu32 value = 0;
/* wait for Vsync */
diff --git a/src/v1krisc.c b/src/v1krisc.c
index 2554263..9b7b4e2 100644
--- a/src/v1krisc.c
+++ b/src/v1krisc.c
@@ -83,20 +83,20 @@
* local function prototypes
*/
-static void verite_iopoll(IOADDRESS port, vu32 data, vu32 mask);
-static void verite_iopoll8(IOADDRESS port, vu8 data, vu8 mask);
+static void verite_iopoll(unsigned long port, vu32 data, vu32 mask);
+static void verite_iopoll8(unsigned long port, vu8 data, vu8 mask);
-static vu32 readRF(IOADDRESS io_base, vu8 index);
-static void writeRF(IOADDRESS io_base, vu8 index, vu32 data);
+static vu32 readRF(unsigned long io_base, vu8 index);
+static void writeRF(unsigned long io_base, vu8 index, vu32 data);
-static vu32 risc_readmem(IOADDRESS io_base, vu32 addr, vu8 read_type);
-static void risc_writemem(IOADDRESS io_base, vu32 addr, vu32 data, vu8 write_type);
+static vu32 risc_readmem(unsigned long io_base, vu32 addr, vu8 read_type);
+static void risc_writemem(unsigned long io_base, vu32 addr, vu32 data, vu8 write_type);
#if 0
-static void risc_step(IOADDRESS io_base, vu32 count);
+static void risc_step(unsigned long io_base, vu32 count);
#endif
-static void risc_forcestep(IOADDRESS io_base, vu32 instruction);
-static void risc_continue(IOADDRESS io_base);
+static void risc_forcestep(unsigned long io_base, vu32 instruction);
+static void risc_continue(unsigned long io_base);
@@ -113,7 +113,7 @@ void
v1k_start(ScrnInfoPtr pScreenInfo, vu32 pc)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
- IOADDRESS io_base=pRendition->board.io_base;
+ unsigned long io_base=pRendition->board.io_base;
v1k_stop(pScreenInfo);
risc_forcestep(io_base, NOP_INSTR);
@@ -152,7 +152,7 @@ v1k_stop(ScrnInfoPtr pScreenInfo)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
vu8 debugreg, statusreg;
- IOADDRESS io_base=pRendition->board.io_base;
+ unsigned long io_base=pRendition->board.io_base;
vu16 STATUS = 0x4A; /* v2x00 io register offset */
int c;
@@ -207,7 +207,7 @@ v1k_flushicache(ScrnInfoPtr pScreenInfo)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
vu32 c, p1, p2;
- IOADDRESS io_base=pRendition->board.io_base;
+ unsigned long io_base=pRendition->board.io_base;
/* first flush store accumulation buffers so data is all in memory */
p1=risc_readmem(io_base, 0, READ_WORD);
@@ -255,7 +255,7 @@ void
v1k_softreset(ScrnInfoPtr pScreenInfo)
{
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
- IOADDRESS io_base=pRendition->board.io_base;
+ unsigned long io_base=pRendition->board.io_base;
verite_out8(io_base+DEBUGREG, SOFTRESET|HOLDRISC);
verite_out8(io_base+STATEINDEX, STATEINDEX_PC);
@@ -300,12 +300,12 @@ v1k_getriscprocs(verite_board_desc *boardDesc)
*/
/*
- * static void verite_iopoll(IOADDRESS port, vu32 data, vu32 mask)
+ * static void verite_iopoll(unsigned long port, vu32 data, vu32 mask)
*
* Loop on IO read until expected data is read or VERITE_MAX_POLLS is reached.
*/
static void
-verite_iopoll(IOADDRESS port, vu32 data, vu32 mask)
+verite_iopoll(unsigned long port, vu32 data, vu32 mask)
{
vu32 c;
@@ -320,12 +320,12 @@ verite_iopoll(IOADDRESS port, vu32 data, vu32 mask)
/*
- * static void verite_iopoll8(IOADDRESS port, vu8 data, vu8 mask)
+ * static void verite_iopoll8(unsigned long port, vu8 data, vu8 mask)
*
* Loop on IO read until expected data is read or VERITE_MAX_POLLS is reached.
*/
static void
-verite_iopoll8(IOADDRESS port, vu8 data, vu8 mask)
+verite_iopoll8(unsigned long port, vu8 data, vu8 mask)
{
vu32 c;
@@ -340,12 +340,12 @@ verite_iopoll8(IOADDRESS port, vu8 data, vu8 mask)
/*
- * static vu32 readRF(IOADDRESS io_base, vu8 index)
+ * static vu32 readRF(unsigned long io_base, vu8 index)
*
* Reads data from register file.
*/
static vu32
-readRF(IOADDRESS io_base, vu8 index)
+readRF(unsigned long io_base, vu8 index)
{
vu32 data, instr;
vu8 debug, stateindex;
@@ -378,12 +378,12 @@ readRF(IOADDRESS io_base, vu8 index)
/*
- * static void writeRF(IOADDRESS io_base, vu8 index, vu32 data)
+ * static void writeRF(unsigned long io_base, vu8 index, vu32 data)
*
* Set RF register, being careful on how to set regs below 64.
*/
static void
-writeRF(IOADDRESS io_base, vu8 index, vu32 data)
+writeRF(unsigned long io_base, vu8 index, vu32 data)
{
vu8 special=0;
@@ -417,12 +417,12 @@ writeRF(IOADDRESS io_base, vu8 index, vu32 data)
/*
- * static vu32 risc_readmem(IOADDRESS io_base, vu32 addr, vu8 read_type)
+ * static vu32 risc_readmem(unsigned long io_base, vu32 addr, vu8 read_type)
*
* NOTE: Assumes RISC is in hold mode.
*/
static vu32
-risc_readmem(IOADDRESS io_base, vu32 addr, vu8 read_type)
+risc_readmem(unsigned long io_base, vu32 addr, vu8 read_type)
{
vu32 data;
Reply to: