diff options
Diffstat (limited to 'hw')
129 files changed, 350 insertions, 4499 deletions
diff --git a/hw/Makefile.am b/hw/Makefile.am index 99df8e230..30662ccdd 100644 --- a/hw/Makefile.am +++ b/hw/Makefile.am @@ -1,5 +1,5 @@ if DMX -if BUILD_DARWIN +if XDARWIN # Darwin does not need the dmx subdir else DMX_SUBDIRS = dmx @@ -7,12 +7,8 @@ endif endif if XORG -if BUILD_DARWIN -# Darwin does not need the xfree86 subdir -else XORG_SUBDIRS = xfree86 endif -endif if XVFB XVFB_SUBDIRS = vfb @@ -38,15 +34,15 @@ if XPRINT XPRINT_SUBDIRS = xprint endif -if BUILD_DARWIN -DARWIN_SUBDIRS = darwin +if XDARWIN +XDARWIN_SUBDIRS = darwin endif SUBDIRS = \ $(XORG_SUBDIRS) \ $(XGL_SUBDIRS) \ $(XWIN_SUBDIRS) \ - $(DARWIN_SUBDIRS) \ + $(XDARWIN_SUBDIRS) \ $(XVFB_SUBDIRS) \ $(XNEST_SUBDIRS) \ $(DMX_SUBDIRS) \ diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index b773910fc..a6f84ee01 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -56,34 +56,29 @@ Xquartz_SOURCES = \ quartz/xpr/x-hook.c \ quartz/xpr/x-list.c -XDarwin_LDADD = \ - $(top_builddir)/dix/dixfonts.lo \ - $(top_builddir)/dix/libdix.la \ - $(top_builddir)/config/libconfig.a \ - ./libdarwinShared.a \ - ./iokit/libiokit.a \ - $(top_builddir)/miext/shadow/libshadow.la \ - $(top_builddir)/miext/cw/libcw.la \ - $(DARWIN_LIBS) \ - $(top_builddir)/miext/rootless/librootless.la \ - $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ - $(top_builddir)/miext/rootless/accel/librlAccel.la \ - @XORG_LIBS@ \ - $(XSERVER_LIBS) - -Xquartz_LDADD = \ - $(top_builddir)/dix/dixfonts.lo \ - $(top_builddir)/dix/libdix.la \ - $(top_builddir)/config/libconfig.a \ - ./libdarwinShared.a \ - $(top_builddir)/miext/shadow/libshadow.la \ - $(top_builddir)/miext/cw/libcw.la \ - $(DARWIN_LIBS) \ - $(top_builddir)/miext/rootless/librootless.la \ - $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ - $(top_builddir)/miext/rootless/accel/librlAccel.la \ - @XORG_LIBS@ \ - $(XSERVER_LIBS) -lXplugin +DARWIN_LIBS = \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/config/libconfig.a \ + $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/miext/cw/libcw.la \ + @DARWIN_LIBS@ \ + $(top_builddir)/miext/rootless/librootless.la \ + $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ + $(top_builddir)/miext/rootless/accel/librlAccel.la \ + ./libdarwinShared.a \ + $(XSERVER_LIBS) + +XDARWIN_LIBS = \ + $(DARWIN_LIBS) \ + ./iokit/libiokit.a +XQUARTZ_LIBS = \ + $(DARWIN_LIBS) + +XDarwin_DEPENDENCIES = $(XDARWIN_LIBS) +XDarwin_LDADD = $(XDARWIN_LIBS) $(XSERVER_SYS_LIBS) + +Xquartz_DEPENDENCIES = $(XQUARTZ_LIBS) +Xquartz_LDADD = $(XQUARTZ_LIBS) $(XSERVER_SYS_LIBS) -lXplugin XDarwin_LDFLAGS = \ -XCClinker -Objc \ @@ -95,6 +90,7 @@ Xquartz_LDFLAGS = \ -Wl,-u,_miDCInitialize \ -Wl,-framework,Carbon \ -Wl,-framework,OpenGL \ + -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib \ -Wl,-framework,Cocoa \ -Wl,-framework,CoreAudio \ -Wl,-framework,IOKit @@ -118,22 +114,15 @@ XDarwinApp_SOURCES = \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/Xi/stubs.c -XDarwinApp_LDADD = \ - $(top_builddir)/dix/dixfonts.lo \ - $(top_builddir)/dix/libdix.la \ - $(top_builddir)/config/libconfig.a \ - $(top_builddir)/os/libos.la \ - ./quartz/XApplication.o \ - ./libdarwinShared.a \ - ./quartz/libXQuartz.a \ - $(top_builddir)/miext/shadow/libshadow.la \ - $(top_builddir)/miext/cw/libcw.la \ - $(DARWIN_LIBS) \ - $(top_builddir)/miext/rootless/librootless.la \ - $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ - $(top_builddir)/miext/rootless/accel/librlAccel.la \ - @XORG_LIBS@ \ - $(XSERVER_LIBS) +XDARWINAPP_LIBS = \ + $(DARWIN_LIBS) \ + ./quartz/XApplication.o \ + ./libdarwinShared.a \ + ./quartz/libXQuartz.a \ + $(XSERVER_LIBS) + +XDarwinApp_DEPENDENCIES = $(XDARWINAPP_LIBS) +XDarwinApp_LDADD = $(XDARWINAPP_LIBS) $(XSERVER_SYS_LIBS) XDarwinApp_LDFLAGS = \ -XCClinker -Objc \ @@ -163,6 +152,7 @@ cr_la_LIBADD = \ $(top_builddir)/miext/rootless/accel/librlAccel.la cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ + -lpixman-1 \ -Wl,-framework,Cocoa \ -Wl,-framework,Carbon \ -XCClinker -ObjC \ @@ -201,7 +191,7 @@ glxMesa_la_DEPENDENCIES = XDarwinApp endif endif -if HAVE_X_PLUGIN +if HAVE_XPLUGIN xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS xprplugin_LTLIBRARIES = xpr.la @@ -222,6 +212,7 @@ xpr_la_LIBADD = \ $(top_builddir)/miext/rootless/accel/librlAccel.la xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ + -lpixman-1 \ -lXplugin \ -XCClinker -bundle_loader -XCClinker XDarwinApp \ -module -avoid-version -no-undefined diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m index 57795f452..2d2132102 100644 --- a/hw/darwin/apple/X11Application.m +++ b/hw/darwin/apple/X11Application.m @@ -41,7 +41,7 @@ # include "micmap.h" #undef BOOL -#include "xf86Version.h" +//#include "xf86Version.h" #include <mach/mach.h> #include <unistd.h> diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index 7b4836805..0b22141b5 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -6,6 +6,7 @@ **************************************************************/ /* * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved. + * Copyright (c) 2007 Apple Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -46,8 +47,6 @@ #include "fb.h" // fb framebuffer code #include "site.h" #include "globals.h" -#include "xorgVersion.h" -#include "xf86Date.h" #include "dix.h" #ifdef XINPUT @@ -83,7 +82,7 @@ int darwinScreenIndex = 0; io_connect_t darwinParamConnect = 0; int darwinEventReadFD = -1; int darwinEventWriteFD = -1; -int darwinMouseAccelChange = 1; +// int darwinMouseAccelChange = 1; int darwinFakeButtons = 0; // location of X11's (0,0) point in global screen coordinates @@ -127,86 +126,23 @@ const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]); #ifndef PRE_RELEASE #define PRE_RELEASE XORG_VERSION_SNAP #endif - -void -DarwinPrintBanner() -{ -#if PRE_RELEASE - ErrorF("\n" - "This is a pre-release version of the " XVENDORNAME " X11.\n" - "Portions of this release are based on XFree86 4.4RC2 and selected\n" - "files from XFree86 4.4RC3. It is not supported in any way.\n" - "Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n" - "Select the \"xorg\" product for bugs you find in this release.\n" - "Before reporting bugs in pre-release versions please check the\n" - "latest version in the " XVENDORNAME " \"monolithic tree\" CVS\n" - "repository hosted at http://www.freedesktop.org/Software/xorg/"); +#ifndef BUILD_DATE +#define BUILD_DATE "" #endif -#if XORG_VERSION_SNAP > 0 - ErrorF(".%d", XORG_VERSION_SNAP); +#ifndef XORG_RELEASE +#define XORG_RELEASE "?" #endif -#if XORG_VERSION_SNAP >= 900 - ErrorF(" (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR + 1, - XORG_VERSION_SNAP - 900); -#endif - -#ifdef XORG_CUSTOM_VERSION - ErrorF(" (%s)", XF86_CUSTOM_VERSION); -#endif - ErrorF("\nRelease Date: %s\n", XF86_DATE); - ErrorF("X Protocol Version %d, Revision %d, %s\n", - X_PROTOCOL, X_PROTOCOL_REVISION, XORG_RELEASE ); - ErrorF("Build Operating System: %s %s\n", OSNAME, OSVENDOR); -#ifdef HAS_UTSNAME - { - struct utsname name; - - if (uname(&name) == 0) { - ErrorF("Current Operating System: %s %s %s %s %s\n", - name.sysname, name.nodename, name.release, name.version, name.machine); - } - } -#endif -#if defined(BUILD_DATE) && (BUILD_DATE > 19000000) - { - struct tm t; - char buf[100]; - - bzero(&t, sizeof(t)); - bzero(buf, sizeof(buf)); - t.tm_mday = BUILD_DATE % 100; - t.tm_mon = (BUILD_DATE / 100) % 100 - 1; - t.tm_year = BUILD_DATE / 10000 - 1900; - if (strftime(buf, sizeof(buf), "%d %B %Y", &t)) - ErrorF("Build Date: %s\n", buf); - } -#endif -#if defined(CLOG_DATE) && (CLOG_DATE > 19000000) - { - struct tm t; - char buf[100]; - - bzero(&t, sizeof(t)); - bzero(buf, sizeof(buf)); - t.tm_mday = CLOG_DATE % 100; - t.tm_mon = (CLOG_DATE / 100) % 100 - 1; - t.tm_year = CLOG_DATE / 10000 - 1900; - if (strftime(buf, sizeof(buf), "%d %B %Y", &t)) - ErrorF("Changelog Date: %s\n", buf); - } -#endif -#if defined(BUILDERSTRING) - ErrorF("%s \n",BUILDERSTRING); -#endif - ErrorF("\tBefore reporting problems, check "__VENDORDWEBSUPPORT__"\n" - "\tto make sure that you have the latest version.\n"); +void DDXRingBell(int volume, int pitch, int duration) { + // FIXME -- make some noise, yo } - -void DDXRingBell(int volume, int pitch, int duration) -{ - // FIXME -- make some noise, yo +void +DarwinPrintBanner(void) +{ + // this should change depending on which specific server we are building + ErrorF("X11.app starting:\n"); + ErrorF("Xquartz server based on X.org %s, built on %s\n", XORG_RELEASE, BUILD_DATE ); } @@ -359,8 +295,8 @@ static Bool DarwinAddScreen( dixScreenOrigins[index].x = dfb->x; dixScreenOrigins[index].y = dfb->y; - ErrorF("Screen %d added: %dx%d @ (%d,%d)\n", - index, dfb->width, dfb->height, dfb->x, dfb->y); + /* ErrorF("Screen %d added: %dx%d @ (%d,%d)\n", + index, dfb->width, dfb->height, dfb->x, dfb->y); */ return TRUE; } @@ -373,6 +309,7 @@ static Bool DarwinAddScreen( ============================================================================= */ +#if 0 /* * DarwinChangePointerControl * Set mouse acceleration and thresholding @@ -393,7 +330,7 @@ static void DarwinChangePointerControl( if (kr != KERN_SUCCESS) ErrorF( "Could not set mouse acceleration with kernel return = 0x%x.\n", kr ); } - +#endif /* * DarwinMouseProc @@ -416,12 +353,11 @@ static int DarwinMouseProc( map[3] = 3; map[4] = 4; map[5] = 5; - InitPointerDeviceStruct( (DevicePtr)pPointer, - map, - 5, // numbuttons (4 & 5 are scroll wheel) - GetMotionHistory, - DarwinChangePointerControl, - GetMotionHistorySize(), 2 ); + InitPointerDeviceStruct( (DevicePtr)pPointer, map, 5, + GetMotionHistory, + (PtrCtrlProcPtr)NoopDDA, + GetMotionHistorySize(), 2); + #ifdef XINPUT InitValuatorAxisStruct( pPointer, 0, // X axis @@ -643,8 +579,8 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo) for (i = 0; i < pScreenInfo->numScreens; i++) { dixScreenOrigins[i].x -= darwinMainScreenX; dixScreenOrigins[i].y -= darwinMainScreenY; - ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n", - i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); + /* ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n", + i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); */ } } } @@ -725,10 +661,6 @@ void OsVendorInit(void) } darwinKeymapFile = tempStr; } - - if ( !darwinKeymapFile ) { - ErrorF("Reading keymap from the system.\n"); - } } @@ -926,7 +858,7 @@ void ddxUseMsg( void ) */ void ddxGiveUp( void ) { - ErrorF( "Quitting XDarwin...\n" ); + ErrorF( "Quitting XQuartz...\n" ); DarwinModeGiveUp(); } @@ -949,7 +881,6 @@ void AbortDDX( void ) } -#ifdef DPMSExtension /* * DPMS extension stubs */ @@ -966,8 +897,6 @@ int DPMSGet(int *level) { return -1; } -#endif - #include "mivalidate.h" // for union _Validate used by windowstr.h #include "windowstr.h" // for struct _Window diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index 70101eca5..20f45be93 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -48,7 +48,7 @@ typedef struct { // From darwin.c -void DarwinPrintBanner(); +void DarwinPrintBanner(void); int DarwinParseModifierList(const char *constmodifiers); void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo); void xf86SetRootClip (ScreenPtr pScreen, BOOL enable); diff --git a/hw/darwin/iokit/xfIOKit.c b/hw/darwin/iokit/xfIOKit.c index c7ebd1c18..9de33c064 100644 --- a/hw/darwin/iokit/xfIOKit.c +++ b/hw/darwin/iokit/xfIOKit.c @@ -62,8 +62,8 @@ #define NO_CFPLUGIN #include <IOKit/IOKitLib.h> #include <IOKit/hidsystem/IOHIDShared.h> +#include <IOKit/hidsystem/event_status_driver.h> #include <IOKit/graphics/IOGraphicsLib.h> -#include <drivers/event_status_driver.h> // Define this to work around bugs in the display drivers for // older PowerBook G3's. If the X server starts without this diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am index 993cdb0ec..f8dc16765 100644 --- a/hw/darwin/quartz/Makefile.am +++ b/hw/darwin/quartz/Makefile.am @@ -5,7 +5,7 @@ AM_OBJCFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ INCLUDES = -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@ AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API -if HAVE_X_PLUGIN +if HAVE_XPLUGIN AM_DEFS += -DBUILD_XPR endif DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\" diff --git a/hw/darwin/quartz/Preferences.m b/hw/darwin/quartz/Preferences.m index eb78fd32a..a79454b13 100644 --- a/hw/darwin/quartz/Preferences.m +++ b/hw/darwin/quartz/Preferences.m @@ -356,7 +356,7 @@ static NSString *X11EnableKeyEquivalentsKey = @"EnableKeyEquivalents"; [[NSUserDefaults standardUserDefaults] setBool:newMouseAccelChange forKey:@"AllowMouseAccelChange"]; // Update the setting used by the X server thread - darwinMouseAccelChange = newMouseAccelChange; + // darwinMouseAccelChange = newMouseAccelChange; } + (void)setUseQDCursor:(int)newUseQDCursor diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c index 7ba6d5a15..e65be69a0 100644 --- a/hw/darwin/quartz/pseudoramiX.c +++ b/hw/darwin/quartz/pseudoramiX.c @@ -43,6 +43,9 @@ Equipment Corporation. #include <X11/extensions/panoramiXproto.h> #include "globals.h" +extern int noPseudoramiXExtension; +extern int noPanoramiXExtension; + extern int ProcPanoramiXQueryVersion (ClientPtr client); static void PseudoramiXResetProc(ExtensionEntry *extEntry); diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index eac765257..0f0351652 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -209,7 +209,7 @@ static void QuartzUpdateScreens(void) pRoot = WindowTable[pScreen->myNum]; AppleWMSetScreenOrigin(pRoot); pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL); - pScreen->PaintWindowBackground(pRoot, &pRoot->borderClip, PW_BACKGROUND); + miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND); // QuartzIgnoreNextWarpCursor(); DefineInitialRootWindow(pRoot); diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m index c54c18acb..42eabcbae 100644 --- a/hw/darwin/quartz/quartzCocoa.m +++ b/hw/darwin/quartz/quartzCocoa.m @@ -66,7 +66,7 @@ void QuartzReadPreferences(void) darwinFakeButtons = [Preferences fakeButtons]; darwinFakeMouse2Mask = [Preferences button2Mask]; darwinFakeMouse3Mask = [Preferences button3Mask]; - darwinMouseAccelChange = [Preferences mouseAccelChange]; + // darwinMouseAccelChange = [Preferences mouseAccelChange]; quartzUseSysBeep = [Preferences systemBeep]; quartzEnableKeyEquivalents = [Preferences enableKeyEquivalents]; diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index 67a0737ef..034cbac6d 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -306,9 +306,6 @@ static Bool xprSetupScreen(int index, ScreenPtr pScreen) { // Add alpha protecting replacements for fb screen functions - pScreen->PaintWindowBackground = SafeAlphaPaintWindow; - pScreen->PaintWindowBorder = SafeAlphaPaintWindow; - #ifdef RENDER { PictureScreenPtr ps = GetPictureScreen(pScreen); diff --git a/hw/darwin/utils/dumpkeymap.c b/hw/darwin/utils/dumpkeymap.c index d2eeca5c2..0c8bdcd01 100644 --- a/hw/darwin/utils/dumpkeymap.c +++ b/hw/darwin/utils/dumpkeymap.c @@ -143,7 +143,7 @@ #include <string.h> #include <sys/stat.h> #if !defined(DUMPKEYMAP_FILE_ONLY) -#include <drivers/event_status_driver.h> +#include <IOKit/hidsystem/event_status_driver.h> #endif #define PROG_NAME "dumpkeymap" diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am index 002ea112a..8457aea60 100644 --- a/hw/dmx/Makefile.am +++ b/hw/dmx/Makefile.am @@ -81,13 +81,16 @@ Xdmx_SOURCES = dmx.c \ #Xdmx_SOURCES += fakecw.c #endif +XDMX_LIBS = \ + @XDMX_LIBS@ \ + $(GLX_LIBS) \ + input/libdmxinput.a \ + config/libdmxconfig.a \ + $(XSERVER_LIBS) + Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -Xdmx_LDADD = $(XORG_CORE_LIBS) \ - $(XDMX_LIBS) \ - $(GLX_LIBS) \ - input/libdmxinput.a \ - config/libdmxconfig.a \ - @DMXMODULES_LIBS@ +Xdmx_DEPENDENCIES= $(XDMX_LIBS) +Xdmx_LDADD = $(XDMX_LIBS) $(XDMX_SYS_LIBS) $(XSERVER_SYS_LIBS) # Man page appmandir = $(APP_MAN_DIR) diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h index 37f42a76f..4fef91537 100644 --- a/hw/dmx/dmx.h +++ b/hw/dmx/dmx.h @@ -209,8 +209,6 @@ typedef struct _DMXScreenInfo { UnrealizeWindowProcPtr UnrealizeWindow; RestackWindowProcPtr RestackWindow; WindowExposuresProcPtr WindowExposures; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; ResizeWindowProcPtr ResizeWindow; diff --git a/hw/dmx/dmxinput.c b/hw/dmx/dmxinput.c index d644b5d0d..83f8a4a90 100644 --- a/hw/dmx/dmxinput.c +++ b/hw/dmx/dmxinput.c @@ -105,3 +105,14 @@ void dmxUpdateWindowInfo(DMXUpdateType type, WindowPtr pWindow) if (!dmxInput->detached && dmxInput->updateWindowInfo) dmxInput->updateWindowInfo(dmxInput, type, pWindow); } + +int +NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) +{ + return BadRequest; +} + +void +DeleteInputDeviceRequest(DeviceIntPtr pDev) +{ +} diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c index 9b15bb38c..1d12ec32d 100644 --- a/hw/dmx/dmxscrinit.c +++ b/hw/dmx/dmxscrinit.c @@ -314,9 +314,6 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]) DMX_WRAP(UnrealizeWindow, dmxUnrealizeWindow, dmxScreen, pScreen); DMX_WRAP(RestackWindow, dmxRestackWindow, dmxScreen, pScreen); DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen); - DMX_WRAP(PaintWindowBackground, dmxPaintWindowBackground, dmxScreen, - pScreen); - DMX_WRAP(PaintWindowBorder, dmxPaintWindowBorder, dmxScreen, pScreen); DMX_WRAP(CopyWindow, dmxCopyWindow, dmxScreen, pScreen); DMX_WRAP(ResizeWindow, dmxResizeWindow, dmxScreen, pScreen); @@ -453,8 +450,6 @@ Bool dmxCloseScreen(int idx, ScreenPtr pScreen) DMX_UNWRAP(UnrealizeWindow, dmxScreen, pScreen); DMX_UNWRAP(RestackWindow, dmxScreen, pScreen); DMX_UNWRAP(WindowExposures, dmxScreen, pScreen); - DMX_UNWRAP(PaintWindowBackground, dmxScreen, pScreen); - DMX_UNWRAP(PaintWindowBorder, dmxScreen, pScreen); DMX_UNWRAP(CopyWindow, dmxScreen, pScreen); DMX_UNWRAP(ResizeWindow, dmxScreen, pScreen); diff --git a/hw/dmx/dmxwindow.c b/hw/dmx/dmxwindow.c index fa6b9a279..7494e6df2 100644 --- a/hw/dmx/dmxwindow.c +++ b/hw/dmx/dmxwindow.c @@ -795,57 +795,6 @@ void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen); } -/** Paint background of \a pWindow in \a pRegion. */ -void dmxPaintWindowBackground(WindowPtr pWindow, RegionPtr pRegion, int what) -{ - ScreenPtr pScreen = pWindow->drawable.pScreen; - DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; - dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow); - BoxPtr pBox; - int nBox; - - DMX_UNWRAP(PaintWindowBackground, dmxScreen, pScreen); -#if 0 - if (pScreen->PaintWindowBackground) - pScreen->PaintWindowBackground(pWindow, pRegion, what); -#endif - - if (pWinPriv->window) { - /* Paint window background on back-end server */ - pBox = REGION_RECTS(pRegion); - nBox = REGION_NUM_RECTS(pRegion); - while (nBox--) { - XClearArea(dmxScreen->beDisplay, pWinPriv->window, - pBox->x1 - pWindow->drawable.x, - pBox->y1 - pWindow->drawable.y, - pBox->x2 - pBox->x1, - pBox->y2 - pBox->y1, - False); - pBox++; - } - dmxSync(dmxScreen, False); - } - - DMX_WRAP(PaintWindowBackground, dmxPaintWindowBackground, dmxScreen, pScreen); -} - -/** Paint window border for \a pWindow in \a pRegion. */ -void dmxPaintWindowBorder(WindowPtr pWindow, RegionPtr pRegion, int what) -{ - ScreenPtr pScreen = pWindow->drawable.pScreen; - DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; - - DMX_UNWRAP(PaintWindowBorder, dmxScreen, pScreen); -#if 0 - if (pScreen->PaintWindowBorder) - pScreen->PaintWindowBorder(pWindow, pRegion, what); -#endif - - /* Paint window border on back-end server */ - - DMX_WRAP(PaintWindowBorder, dmxPaintWindowBorder, dmxScreen, pScreen); -} - /** Move \a pWindow on the back-end server. Determine whether or not it * is on or offscreen, and realize it if it is newly on screen and the * lazy window creation optimization is enabled. */ diff --git a/hw/dmx/dmxwindow.h b/hw/dmx/dmxwindow.h index 1a984331e..72c76aa3b 100644 --- a/hw/dmx/dmxwindow.h +++ b/hw/dmx/dmxwindow.h @@ -81,10 +81,6 @@ extern Bool dmxUnrealizeWindow(WindowPtr pWindow); extern void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib); extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, RegionPtr other_exposed); -extern void dmxPaintWindowBackground(WindowPtr pWindow, RegionPtr pRegion, - int what); -extern void dmxPaintWindowBorder(WindowPtr pWindow, RegionPtr pRegion, - int what); extern void dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc); diff --git a/hw/kdrive/Makefile.am b/hw/kdrive/Makefile.am index 267d772e2..5803644d5 100644 --- a/hw/kdrive/Makefile.am +++ b/hw/kdrive/Makefile.am @@ -1,5 +1,5 @@ if KDRIVEVESA -VESA_SUBDIRS = vesa ati chips epson i810 mach64 mga neomagic nvidia pm2 r128 \ +VESA_SUBDIRS = vesa ati chips epson i810 mach64 mga nvidia pm2 r128 \ smi via endif diff --git a/hw/kdrive/ati/ChangeLog b/hw/kdrive/ati/ChangeLog deleted file mode 100644 index a76712897..000000000 --- a/hw/kdrive/ati/ChangeLog +++ /dev/null @@ -1,622 +0,0 @@ -2006-02-15 Keith Packard <keithp@keithp.com> - - * Makefile.am: - * ati.c: (ATIMapReg): - * ati.h: - * ati_cursor.c: (ATIMoveCursor), (ClassicSetCursorColors), - (ClassicLoadCursor), (RadeonLoadCursor), (ATIUnloadCursor): - Fix kdrive pointer signed/unsigned types. - -2006-02-14 Eric Anholt <anholt@FreeBSD.org> - - * ati_draw.c: (ATIDrawDisable): - Remove the waitSync from KdDisableScreen and push it off to drivers' - disableAccel hook, which is more correct anyway. This makes kdrive.c - not have any knowledge of kaa, opening the way for using exa from - kdrive. - -2006-02-09 Keith Packard <keithp@keithp.com> - - reviewed by: Eric Anholt <anholt@FreeBSD.org> - - * ati_video.c: (RadeonDisplayVideo): - Replace TRI_FAN with RECT_LIST to eliminate tearing - -2005-08-07 Keith Packard <keithp@keithp.com> - - * ati_video.c: (RadeonDisplayVideo): - Build with modular X libraries and headers - -2005-06-09 Eric Anholt <anholt@FreeBSD.org> - - * ati.h: - * ati_video.c: - Axe a few dead fields from the port priv struct and add my name to - the "Copyright" line of the license to ati_video.c that already has my - name in the text. - -2005-06-09 Eric Anholt <anholt@FreeBSD.org> - - * ati_dri.c: - Perform a warnings sweep on hw/kdrive. A number of these were my fault, - but some come from others. - -2005-06-09 Eric Anholt <anholt@FreeBSD.org> - - * ati.c: - * ati.h: - * ati_draw.c: (ATIWaitMarker), (ATIGetOffsetPitch), - (ATIUploadToScreen), (ATIUploadToScratch), (ATIDrawInit), - (ATIDrawEnable): - * ati_dri.c: (ATIDRISwapContext): - * ati_video.c: (R128DisplayVideo), (RadeonDisplayVideo): - - Replace the syncAccel hook in the kdrive structure with a pair of - hooks in the kaa structure: markSync and waitMarker. The first, if - set, returns a hardware-dependent marker number which can then be - waited for with waitMarker. If markSync is absent (which is the case - on all drivers currently), waitMarker must wait for idle on any given - marker number. The intention is to allow for more parallelism when - we get downloading from framebuffer, or more fine-grained idling. - - Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and - kaaWaitSync. These will need to be refined when KAA starts being - smart about using them. Merge kpict.c into kasync.c since kasyn.c has - all the rest of these fallback funcs. - - Restructure all drivers to initialize a KaaInfo structure by hand - rather than statically in dubious order. - - Whack the i810 driver into shape in hopes that it'll work after this - change (it certainly wouldn't have before this). Doesn't support my - i845 though. - - Make a new KXV helper to avoid duplicated code to fill the region - with the necessary color key. Use it in i810 and mach64 (tested). - -2005-02-28 Keith Packard <keithp@keithp.com> - - * ati_reg.h: - Add macrovision register defines - -2005-01-24 19:37 anholt - - * ati_dma.c, ati_draw.c, ati_reg.h: Finish converting RB2D_DSTCACHE - to RB3D_DSTCACHE. Remove an extra pixel cache flush in the idle - function. Init an extra reg for r200, and annotate the - TCL_BYPASS better. Also, clean up some style nits from the last - commit. - -2005-01-24 18:39 keithp - - * ati.h, ati_draw.c, ati_reg.h, radeon_composite.c: Add tracing. - Hack Radeon cache registers to use 3D addresses. Works on M6 - -2005-01-24 17:38 anholt - - * ati_dri.c: Silence a warning about uninitialized variable (though - it would be). - -2005-01-20 08:22 anholt - - * ati_dma.c, ati_dma.h, ati_dri.c: Add a set of macros for dealing - with the repeated code to wait for a while reading a - register/attempting DMA. Now it'll wait for a certain number of - seconds rather than a certain number of times through the loop - before deciding that it's timed out and resetting the hardware. - Also, add more timeout handling, and reset the draw state after - resetting the engine. - -2005-01-19 23:28 anholt - - * radeon_composite.c: Use RadeonSwitchTo3D() instead of doing the - WAIT_UNTIL ourselves (RST3D() also does DC_FLUSH, which may be - important). - -2005-01-19 23:09 anholt - - * ati_video.c: Add R200 XV support, and make R100 (hopefully) use - linear filtering instead of nearest. Also, use RadeonSwitchTo3D - instead of doing the WAIT_UNTIL ourselves. - -2005-01-19 17:09 anholt - - * ati_dma.c, ati_reg.h: Make R200 PDMA work -- primary queue sizes - are now 9 bits, not 8. - -2004-12-22 10:39 anholt - - * ati_draw.c, ati_reg.h, radeon_composite.c: Back out the previous - day's broken R200 "fix" -- the same number of coords are always - emitted. Fix the real problem, which was not enough regs being - initialized in ati_draw.c. Fix a typo that was resulting in - alpha coming out as 0 * src or 0 * broken instead of src * 1 or - src * mask. Assign the blending results to R0, as appears to be - necessary. Unbreak the dst-alpha-blend-with-no-dst-alpha code. - Yow. And set the right DMA count for the r200 traps code. - -2004-12-21 01:51 anholt - - * ati_draw.c, radeon_composite.c: Fix r200 render (for real this - time?) by setting tex1_comp_cnt right for non-mask rendering. - Reenable it. Also, R200TexFormats was used instead of R100 in - one place. Harmless so far, because the formats were in the same - order. - -2004-12-21 01:49 anholt - - * ati_dri.c: Whitespace nit. - -2004-09-19 20:12 anholt - - * ati_draw.c, ati_reg.h, radeon_composite.c: Fix the R200 Render - code. Composite and Trapezoids are now supported just as well as - on R100. - -2004-09-19 03:57 anholt - - * ati_dri.c, ati_reg.h: Unbreak the AGP DRI case. That was quite a - pile of broken code. - -2004-09-13 23:26 anholt - - * ati.c, ati_reg.h: Add proper PCI/AGP detection, based on Mike - Harris's code for Radeon, but using the MMIO mirror of the bits - instead of config space. - -2004-09-12 16:22 anholt - - * ati_draw.c: - Fix a segfault on VT switch with DRI. Still dies - due to cursor allocation troubles. - Move the - RemoveBlockAndWakeupHandlers to match - RegisterBlockAndWakeupHandlers. - Enable R100 trapezoid - "acceleration" when DRI is working, so that it can be exposed - and worked on. - -2004-09-12 16:01 anholt - - * ati_dri.c: Fix a bad argument missed in the previous commit for - ATIDRIDMA* functions. - -2004-09-12 15:21 anholt - - * ati_draw.c: Move the RegisterBlockAndWakeupHandlers to before DRI - initialization. The change to use that instead of manual - wrapping made the DMA dispatch come after the lock had been - dropped, causing lots of pain. - -2004-09-12 13:31 anholt - - * ati.h, ati_dma.c, ati_dri.c: Reset the CCE/CP on engine reset, - and make the ATIDRIDMA functions take a more useful argument. - -2004-09-12 13:19 anholt - - * ati_draw.c: Add missing kaa.h include for kaaInitTrapOffsets. - -2004-09-12 13:02 anholt - - * ati_dri.c: Fix handling of is_agp. is_agp is whether the card is - actually AGP, while using_agp should say whether AGP is being - used as part of DMA/DRI. - -2004-09-12 12:52 anholt - - * ati_dma.c, ati_dma.h, ati_dri.c: Improve error handling, - especially in the DRI case. Do some FatalErrors instead of - ErrorFs for things that are really bad, and put limits on some - loops. Now, sometimes instead of hanging the entire system, we - (mostly-) cleanly drop to console when the card has hung. - -2004-09-11 02:28 anholt - - * ati.h, ati_dma.h, ati_draw.c, ati_draw.h, ati_reg.h, - r128_composite.c, radeon_composite.c: - Add disabled WIP - trapezoid code for R128 and R100. The R128 rendering is not - doing an add of 1 per triangle like I hoped, and instead seems - to be saturating all the pixels or something. The R100 - acceleration renders pretty well, with some gaps. Note that - both are slower than software due to lack of DMA to submit - vertices. - Mostly fix R128 and Radeon transform support, - including supporting bilinear filtering on R128. Subpixel - offsets are still probably an issue (reported by rendercheck), - but I want to make 100% sure about my understanding of the - protocol before changing everybody, including fb. - Add support - for dst formats without alpha to R128 Composite. - Remove the - R128 Blend code, which has long outlived its usefulness. (I - kept it around for one reason: It could be useful for the w/h - > 1024 case with no mask and a non-src op. That seems pretty - infrequent and not worth the trouble). - -2004-07-24 10:02 keithp - - * ati.c: Check for mmio before restoring crtc/crtc2 pitch registers - -2004-07-22 11:17 keithp - - * ati.c, ati.h, ati_cursor.c, ati_reg.h: 2004-07-22 Keith Packard - <keithp@keithp.com> - - reviewed by: <delete if not using a buddy> - - * hw/kdrive/ati/ati.c: (ATISetOffscreen), (ATISetPitch), - (ATIRandRSetConfig), (ATIPreserve), (ATIRestore), - (ATIEnable): - * hw/kdrive/ati/ati.h: - * hw/kdrive/ati/ati_cursor.c: (RadeonLoadCursor), - (ATIUnloadCursor), (ATICursorEnable): - * hw/kdrive/ati/ati_reg.h: - Correct pitch so that accelerator can run on 1400x1050 - screens. - Add a few more register sets for cursors. - -2004-07-19 05:07 anholt - - * radeon_composite.c: Add support for a8b8g8r8 and x8b8g8r8 - pictures, which showed up frequently with metacity usage. - -2004-07-19 04:42 anholt - - * ati_cursor.c: Breakage in last commit to this file: - pCurPriv->area isn't set up until Enable, these days. - -2004-07-19 04:19 anholt - - * ati_draw.c: Set the right number of texture coordinates for r200 - Render support (still disabled, needs to be tested). - -2004-07-19 04:16 anholt - - * r128_composite.c, radeon_composite.c: - Add Radeon picture - transform support. - On R128, don't refer to an old Composite's - mask transform when the current Composite doesn't have a mask. - - Staticize some global variables in r128_composite.c. - -2004-07-19 00:53 anholt - - * ati.c, ati.h, ati_cursor.c, ati_draw.c, ati_draw.h: Use the - offscreen memory manager as much as possible to do the - reservation of memory at startup. Do some drive-by cleanups - while I'm here (sorry!). - -2004-07-19 00:20 anholt - - * r128_composite.c: Add support for transforms of textures on R128. - -2004-07-03 03:23 anholt - - * r128_composite.c: Clean up Rage 128 composite code. Now it - composites more operations correctly and is simpler. - -2004-06-27 17:48 keithp - - * ati.c, ati.h, ati_cursor.c, ati_draw.c: 2004-06-27 Keith Packard - <keithp@keithp.com> - - * hw/kdrive/ati/ati.c: (ATICardInit), (ATISetOffscreen), - (ATIScreenInit), (ATIRandRSetConfig), (ATIRandRInit), - (ATIFinishInitScreen), (ATIEnable): - * hw/kdrive/ati/ati.h: - * hw/kdrive/ati/ati_cursor.c: (ATICursorInit): - * hw/kdrive/ati/ati_draw.c: (RadeonSwitchTo2D), - (RadeonSwitchTo3D), - (ATIBlockHandler), (ATIWakeupHandler), (ATIDrawEnable), - (ATIDrawDisable), (ATIDrawFini): - Separate out off-screen allocation from Init. - Fix Enable to update off-screen addresses. - Wrap RandR to update off-screen addresses. - - * hw/kdrive/fbdev/fbdev.c: (fbdevMapFramebuffer): - Set off_screen_base and memory_size fields correctly. - -2004-06-25 21:13 keithp - - * ati.c, ati_cursor.c, ati_draw.c, ati_reg.h: 2004-06-25 Keith - Packard <keithp@keithp.com> - - * hw/kdrive/ati/ati.c: (ATIScreenInit): - * hw/kdrive/ati/ati_cursor.c: (ATIMoveCursor), - (ClassicAllocCursorColors), (ClassicSetCursorColors), - (ClassicRecolorCursor), (ClassicLoadCursor), - (RadeonLoadCursor), - (ATIRealizeCursor), (ATISetCursor), (ATICursorEnable), - (ATIRecolorCursor): - * hw/kdrive/ati/ati_draw.c: (ATIDrawFini): - * hw/kdrive/ati/ati_reg.h: - Add ARGB cursor support for Radeon cards. - -2004-06-10 12:22 anholt - - * ati_draw.c: - Pass the right pixel mask (all ones) in to - PrepareSolid in the solid-fill-based composite acceleration. - - Use a real pixmap when doing an UploadToScratch (For - pDrawable->type == DRAWABLE_WINDOW, you need to get the backing - pixmap). - Pass back the x/y offsets from kaaGetOffscreenPixmap - unconditionally, because they'll be used in the scratch case. - - Turn on the Render acceleration for Rage 128 and Radeon - 100-series at last! - -2004-06-10 02:50 anholt - - * ati_draw.c: Align scratch area offsets to the offscreen byte - alignment. - -2004-06-10 01:37 anholt - - * ati_dma.c: Oops, testers reported that the last patch actually - didn't work (conflicts occurred), so the R300 PDMA doesn't work. - Disable. - -2004-06-09 22:57 anholt - - * ati_dma.c, ati_microcode.c: Bug #242: Fix setup of R300 cards, by - providing R300 CP code from volodya-project and initializing - PDMA. - -2004-05-17 13:18 anholt - - * Makefile.am, ati.c, ati.h, ati_cursor.c, ati_dma.c, ati_dma.h, - ati_draw.c, ati_draw.h, ati_dri.c, ati_microcode.c, ati_reg.h, - ati_video.c, r128_composite.c, radeon_composite.c: Overhaul of - the ATI driver: - Add monochrome hardware cursor support. - Try - to auto-detect AGP support for DRI on Radeons. And fail. - Detect it properly on R128. - Set up card for pseudo-DMA if - possible. Convert 2D rendering code to prepare DMA packets - only. Use generic code to decode DMA packets to MMIO if PDMA - is unavailable. Add WIP code to support "real" DMA without DRM - support. - Dispatch pending DMA commands when the server sleeps. - Otherwise some things, such as typing in an xterm, wouldn't - show up for a time. - Fix Radeon Composite acceleration in - many ways, and add Rage 128 Composite acceleration. Disable - them both due to still-not-understood issues they have. They - fail with In, Out, AtopReverse, and Xor, and text rendering is - strange. - Add textured XV support for R100 and Rage 128. No - brightness/sat controls, but it does support multiple ports, - and cooperates with Composite. - Add WIP code for hostdata - uploads. - Many cleanups and fixes. - -2004-01-24 21:31 anholt - - * ati_dri.c: Disable GLX visuals code on !GLXEXT, and remove a - useless prototype. - -2004-01-24 17:30 anholt - - * ati.c, ati.h, ati_dri.c, radeon_composite.c: - Add glx visuals - code based on XFree86's Radeon driver. - Reserve areas for - back/depth/span when USING_DRI && GLXEXT. This would be better - in a TransitionTo3d, but we'd need to work with the offscreen - memory manager for that. - Misc. fixes to ati_dri.c for DRI+GLX. - Needs more work still. - -2004-01-24 17:16 anholt - - * ati_draw.h: Oops, turn fallback output back off. - -2004-01-24 17:04 anholt - - * ati_dri.c: Whitespace cleanup. - -2004-01-10 16:10 anholt - - * ati_draw.c, r128_blendtmp.h: Support 1x1 repeat sources in R128's - Blend. - -2004-01-09 00:43 anholt - - * ati.c, ati.h, ati_draw.c, ati_draw.h, ati_dri.c: Change PCI ID - information field to be one of r128, r100, r200, r300. This is - all the information we need so far. Put that information into - atic, and use it correctly in the code (unlike before). - -2004-01-08 12:18 anholt - - * ati_draw.c, radeon_composite.c: Compile fixes for non-DRI case - and for non-C99 compiler. - -2004-01-08 00:25 anholt - - * ati.c: Forced commit: Previous commit included the removal of the - 8192 scanline limit on offscreen memory in the fbdev case. I - remember daenzer (who originally put that code in) saying he - wasn't sure of it, and there doesn't seem to be any reason for - that limit given how acceleration is done. - -2004-01-08 00:16 anholt - - * ati.c, ati.h, ati_draw.c: - Add a new UploadToScratch kaa hook - for putting the data for a single pixmap into temporary - offscreen storage. Subsequent UploadToScratch may clobber the - data of previous ones. This allows hardware acceleration of - composite operations on glyphs. - Add a new UploadToScreen kaa - hook for doing the actual moving of data to framebuffer. This - would allow us to do things like hostdata blits or memcpy to - agp and then blit. - Add an UploadToScreen on ATI which is just - memcpy, but which will be replaced with a hostdata blit soon. - - Add UploadToScratch on ATI and reserve 64k of scratch space. - This provided a 3x speedup of rgb24text on my Radeon. - -2004-01-06 18:30 anholt - - * radeon_composite.c: Speed things up slightly by removing Z values - from emitted vertices and by emitting as a tri fan rather than a - tri list. A rect list would save an additional vertex (out of 4) - per rectangle, but there's no measurable speed difference and the - tri fan may be useful when transforms come into play. - -2004-01-04 12:47 anholt - - * ati_draw.c, radeon_composite.c: - Correctly set the texture - coordinate set source for the second texture unit. - Re-enable - Radeon's Composite accel now that fonts work again. - -2004-01-03 03:46 anholt - - * ati_draw.c, radeon_composite.c: - Add more Composite operations, - including Saturate, to Radeon Composite accel. I don't 100% - trust that the math works for Saturate, but I can't tell from - existing information. - Fix texture pitch fallback checks. - - Fallback when src or mask have transforms. - Disable Radeon - Composite accel until the offset thing is fixed. - Set - offscreenPitch to 64 on Radeon thanks to new information and a - kaa fix. Fixes acceleration at width!=1024. - -2003-12-31 15:24 anholt - - * radeon_composite.c: Some strange \240 character snuck into the - original commit of this file. - -2003-12-30 00:45 anholt - - * ati_drawtmp.h: There's never a copy between different depths. - Remove the check. - -2003-12-30 00:23 anholt - - * Makefile.am, ati_draw.c, ati_draw.h, ati_drawtmp.h, ati_reg.h, - radeon_composite.c: - Add new Composite hook for kdrive drivers, - which only ensures that the pixmaps are offscreen and don't - have alpha maps. It is the last case checked before going to - software fallback - Use the new Composite hook in the ati driver - to implement acceleration of most Composites that get done in - an xcompmgr environment on r100 series cards. It is only - available when using the DRM. There are still some corruption - issues, but the DRI is still non-default and I need to get this - into version control. - -2003-12-29 01:04 anholt - - * Makefile.am: Add dependency lines so that servers are rebuilt - when server libraries are changed. - -2003-12-28 22:24 anholt - - * Makefile.am, ati.c, ati.h, ati_draw.c, ati_draw.h, ati_drawtmp.h, - ati_dri.c, ati_dri.h, ati_dripriv.h, ati_reg.h, ati_sarea.h, - ati_stub.c, r128_blendtmp.h, r128_common.h, r128_sarea.h, - radeon_common.h, radeon_sarea.h: Merge dri-0-1-branch to trunk. - Notable changes: - Add libdrm and libdri. Portions of the DRI - extension are stubbed out. - Use the DRM in the ATI driver - when available. This provides a minor performance improvement - in x11perf, and opens the possibility of using the 3d hardware - for acceleration in the future. - Implement solid fill - acceleration for Composite in KAA. - Implement Blend hook for - Composite and use it on r128. - Fix a bug of mine that resulted - in overuse of offscreen memory. - Fix many miscellaneous bugs in - ATI driver and add PCI IDs. - -2003-12-28 21:10 anholt - - * ati_drawtmp.h, r128_blendtmp.h: - Disable libdrm verbosity. It - isn't important enough yet to make a run-time flag for it. - - Fix the (void)atic; tricks to quiet unused variable warnings in - ATI template files. Mixing statements and variable defines works - in newer compilers, but not pdx's. - -2003-12-28 01:16 anholt - - * ati.h, ati_draw.c, ati_draw.h, ati_drawtmp.h, ati_dri.c, - r128_blendtmp.h: - Allow acceleration between same-depth pixmaps, - rather than between anything and a dst that matched the screen - depth (fixes corruption for non-screen-depth src and makes more - acceleration possible). - Add ATI_FALLBACK macro and use it to - allow verbose descriptions of why hardware acceleration fails. - - Check that src and dst alignment meet requirements of the card - before accelerating. The BIOS may set up screens that don't - meet the requirements. - Fix the R128 offset alignment (32 - bytes, not 8). - Enable Blend operation even if screen is 24bpp - (it will fail if the dest is 24bpp anyway). - -2003-12-27 02:46 anholt - - * ati_reg.h, r128_blendtmp.h: Properly initialize texture registers - in Blend. Fixes problems with blending code such as whiteness in - test-render, or no blending at all. - - Tested by: andersca - -2003-12-23 14:29 anholt - - * Makefile.am, ati_draw.c, ati_drawtmp.h, ati_reg.h, - r128_blendtmp.h: - Implement acceleration of Composite on R128 - when there is no mask, no transformation, no repeat, and only - certain ops are used. - Add debugging output for software - fallbacks for Composite. - Allow pixmaps in offscreen that don't - match root depth. - Clean up some mess in ati_reg.h. - - Many thanks to andersca for a lot of this code. - -2003-12-09 21:01 anholt - - * ati_draw.c: Add missing kaaDrawFini to ATI driver. - -2003-12-01 14:56 anholt - - * Makefile.am, ati.c, ati.h, ati_draw.c, ati_draw.h, ati_drawtmp.h, - ati_dri.c, ati_dri.h, ati_dripriv.h, ati_reg.h, ati_sarea.h, - ati_stub.c, r128_common.h, r128_sarea.h, radeon_common.h, - radeon_sarea.h: - Initial add of enough of the DRI to create a 2d - driver that uses the DRM for its acceleration. - Converted the - ATI driver to use the DRM to execute rendering commands using - DMA instead of MMIO when available. - -2003-11-30 20:33 anholt - - * Makefile.am, ati.c, ati.h, ati_stub.c: - Add fbdev mode-setting - backend to Xati. It and vesa are compiled in when available, - with fbdev being used by default. - Use depth 16 by default when - vesa backend is used. - Add MMIO defines for PowerPC (should be - in a common location). - - Many thanks for Michel Daenzer for much of this code. - -2003-11-30 19:15 anholt - - * ati.c: Add more RV250 PCI IDs. - -2003-11-30 17:46 anholt - - * ati_draw.c: Remove sys/io.h inclusion from some files that didn't - need it, and change asm/io.h to sys/io.h in vga.c, which newer - Linux complains about. - -2003-11-25 14:39 anholt - - * ati.c: Add new Radeon 9200 PCI IDs. - -2003-11-23 02:12 anholt - - * ati_draw.c: - Fix Radeon offscreen pixmap pitch alignment. - - Remove usleeps from idle and waitavail code, recommended by - keithp. - Add a workaround for apparent broken acceleration with - Rage 128 and offset alignment with 8-bit acceleration (24-hack - and plain 8-bit). - Minor cleanup of setup code. - -2003-11-22 18:08 anholt - - * ati.c: Add RV250 PCI IDs. - -2003-11-19 23:49 anholt - - * ati.c, ati.h, ati_draw.c, ati_reg.h: - Fix a bug in pitch - alignment for offscren pixmaps. - Add 24-bit acceleration for - Xati using the 8-bit trick from mach64. - Add offscreen pixmap - support to Xati. - -2003-11-19 16:05 anholt - - * ati.c, ati_draw.c: - Fix confusion of depth/bitsPerPixel in - ati_draw.c - Disable acceleration with 24bpp due to apparent - broken acceleration. Accel at 24bpp was the cause of the - crashes when people tried to use any depth over 16. XFree86 - doesn't support 24 either. - Disable at < 8bpp, too. - Add the - other Rage 128 PCI IDs. - Remove unnecessary setting of scissor - registers (only default scissor gets used). - -2003-11-19 00:32 anholt - - * .cvsignore, Makefile.am, ati.c, ati.h, ati_draw.c, ati_reg.h, - ati_stub.c: - Add PCI information (device/vendor id, bus - location) to KdCardAttr to help with ati, and future DRM - drivers. - Add new "ati" kdrive driver. It has ancestry in the - r128 driver from andersca, but took a detour through being the - WIP SiS 300 driver on the way. It supports Radeons (tested on - QD VIVO and 7500) and Rage 128. Current limitations include - that it requires depth 16 and that the other Rage 128 PCI IDs - aren't included yet. - diff --git a/hw/kdrive/ati/Makefile.am b/hw/kdrive/ati/Makefile.am index 9e1fc7f57..8429250f3 100644 --- a/hw/kdrive/ati/Makefile.am +++ b/hw/kdrive/ati/Makefile.am @@ -60,8 +60,7 @@ ATI_LIBS = \ Xati_LDADD = \ $(ATI_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xati_DEPENDENCIES = \ libati.a \ diff --git a/hw/kdrive/chips/Makefile.am b/hw/kdrive/chips/Makefile.am index 8188a8e7e..51b0edf31 100644 --- a/hw/kdrive/chips/Makefile.am +++ b/hw/kdrive/chips/Makefile.am @@ -22,8 +22,7 @@ CHIPS_LIBS = \ Xchips_LDADD = \ $(CHIPS_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xchips_DEPENDENCIES = \ libchips.a \ diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c index 84faecc00..93ef27ad3 100644 --- a/hw/kdrive/ephyr/ephyr_draw.c +++ b/hw/kdrive/ephyr/ephyr_draw.c @@ -520,6 +520,5 @@ exaDDXDriverInit(ScreenPtr pScreen) ExaScreenPriv(pScreen); pExaScr->migration = ExaMigrationSmart; - pExaScr->hideOffscreenPixmapData = TRUE; pExaScr->checkDirtyCorrectness = TRUE; } diff --git a/hw/kdrive/epson/Makefile.am b/hw/kdrive/epson/Makefile.am index cd2057132..2a440149d 100644 --- a/hw/kdrive/epson/Makefile.am +++ b/hw/kdrive/epson/Makefile.am @@ -22,8 +22,7 @@ EPSON_LIBS = \ Xepson_LDADD = \ $(EPSON_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xepson_DEPENDENCIES = \ libepson.a \ diff --git a/hw/kdrive/fbdev/Makefile.am b/hw/kdrive/fbdev/Makefile.am index ea2aff3b3..1ce4833a7 100644 --- a/hw/kdrive/fbdev/Makefile.am +++ b/hw/kdrive/fbdev/Makefile.am @@ -16,8 +16,7 @@ Xfbdev_SOURCES = \ Xfbdev_LDADD = \ libfbdev.a \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xfbdev_DEPENDENCIES = \ libfbdev.a \ diff --git a/hw/kdrive/i810/Makefile.am b/hw/kdrive/i810/Makefile.am index e3a702dde..ea02cb67d 100644 --- a/hw/kdrive/i810/Makefile.am +++ b/hw/kdrive/i810/Makefile.am @@ -25,8 +25,7 @@ I810_LIBS = \ Xi810_LDADD = \ $(I810_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xi810_DEPENDENCIES = \ libi810.a \ diff --git a/hw/kdrive/igs/igsdraw.c b/hw/kdrive/igs/igsdraw.c index d2ae098a6..e1ff2befc 100644 --- a/hw/kdrive/igs/igsdraw.c +++ b/hw/kdrive/igs/igsdraw.c @@ -1367,74 +1367,6 @@ igsCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); } -void -igsPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) -{ - KdScreenPriv(pWin->drawable.pScreen); - PixmapPtr pTile; - - if (!REGION_NUM_RECTS(pRegion)) - return; - switch (what) { - case PW_BACKGROUND: - switch (pWin->backgroundState) { - case None: - return; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, - what); - return; - case BackgroundPixmap: - pTile = pWin->background.pixmap; - if (igsPatternDimOk (pTile->drawable.width) && - igsPatternDimOk (pTile->drawable.height)) - { - igsFillBoxTiled ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pTile, - pWin->drawable.x, pWin->drawable.y, GXcopy); - return; - } - break; - case BackgroundPixel: - igsFillBoxSolid((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->background.pixel, GXcopy, ~0); - return; - } - break; - case PW_BORDER: - if (pWin->borderIsPixel) - { - igsFillBoxSolid((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->border.pixel, GXcopy, ~0); - return; - } - else - { - pTile = pWin->border.pixmap; - if (igsPatternDimOk (pTile->drawable.width) && - igsPatternDimOk (pTile->drawable.height)) - { - igsFillBoxTiled ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pTile, - pWin->drawable.x, pWin->drawable.y, GXcopy); - return; - } - } - break; - } - KdCheckPaintWindow (pWin, pRegion, what); -} Bool igsDrawInit (ScreenPtr pScreen) @@ -1453,9 +1385,7 @@ igsDrawInit (ScreenPtr pScreen) */ pScreen->CreateGC = igsCreateGC; pScreen->CopyWindow = igsCopyWindow; - pScreen->PaintWindowBackground = igsPaintWindow; - pScreen->PaintWindowBorder = igsPaintWindow; - + /* * Initialize patterns */ diff --git a/hw/kdrive/mach64/Makefile.am b/hw/kdrive/mach64/Makefile.am index 537939083..746ffff8f 100644 --- a/hw/kdrive/mach64/Makefile.am +++ b/hw/kdrive/mach64/Makefile.am @@ -29,8 +29,7 @@ MACH64_LIBS = \ Xmach64_LDADD = \ $(MACH64_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xmach64_DEPENDENCIES = \ libmach64.a \ diff --git a/hw/kdrive/mga/Makefile.am b/hw/kdrive/mga/Makefile.am index 0598651d6..37bc50cf2 100644 --- a/hw/kdrive/mga/Makefile.am +++ b/hw/kdrive/mga/Makefile.am @@ -24,8 +24,7 @@ MGA_LIBS = \ Xmga_LDADD = \ $(MGA_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xmga_DEPENDENCIES = \ libmga.a \ diff --git a/hw/kdrive/neomagic/ChangeLog b/hw/kdrive/neomagic/ChangeLog deleted file mode 100644 index 4e0788e5a..000000000 --- a/hw/kdrive/neomagic/ChangeLog +++ /dev/null @@ -1,98 +0,0 @@ -2006-02-15 Keith Packard <keithp@keithp.com> - - * Makefile.am: - Add XSERVER_LIBS to build in xorg tree - -2005-08-07 Keith Packard <keithp@keithp.com> - - * neo_draw.c: - Build with modular X libraries and headers - -2005-06-09 Eric Anholt <anholt@FreeBSD.org> - - * neo_draw.c: - * neomagic.c: (neoScreenInit): - Perform a warnings sweep on hw/kdrive. A number of these were my fault, - but some come from others. - -2005-06-09 Eric Anholt <anholt@FreeBSD.org> - - * neo_draw.c: (neoWaitMarker), (neoDrawInit): - * neomagic.c: - * neomagic.h: - - Replace the syncAccel hook in the kdrive structure with a pair of - hooks in the kaa structure: markSync and waitMarker. The first, if - set, returns a hardware-dependent marker number which can then be - waited for with waitMarker. If markSync is absent (which is the case - on all drivers currently), waitMarker must wait for idle on any given - marker number. The intention is to allow for more parallelism when - we get downloading from framebuffer, or more fine-grained idling. - - Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and - kaaWaitSync. These will need to be refined when KAA starts being - smart about using them. Merge kpict.c into kasync.c since kasyn.c has - all the rest of these fallback funcs. - - Restructure all drivers to initialize a KaaInfo structure by hand - rather than statically in dubious order. - - Whack the i810 driver into shape in hopes that it'll work after this - change (it certainly wouldn't have before this). Doesn't support my - i845 though. - - Make a new KXV helper to avoid duplicated code to fill the region - with the necessary color key. Use it in i810 and mach64 (tested). - -2005-02-08 Keith Packard <keithp@keithp.com> - - reviewed by: <delete if not using a buddy> - - * ChangeLog: - * neomagicstub.c: (InitInput): - -2005-02-08 Keith Packard <keithp@keithp.com> - - reviewed by: <delete if not using a buddy> - - * ChangeLog: - * neomagicstub.c: (InitInput): - -2005-02-08 Keith Packard <keithp@keithp.com> - - reviewed by: <delete if not using a buddy> - - * ChangeLog: - * neomagicstub.c: (InitInput): - -2005-02-08 Keith Packard <keithp@keithp.com> - - reviewed by: <delete if not using a buddy> - - * ChangeLog: - * neomagicstub.c: (InitInput): - -2005-02-08 Keith Packard <keithp@keithp.com> - - reviewed by: <delete if not using a buddy> - - * neomagicstub.c: (InitInput): - -2004-07-21 Phil Blundell <pb@nexus.co.uk> - - * Makefile.am (Xneomagic_LDADD): Include -lts if appropriate. - Patch from pattieja@bentham.ispvip.biz. - -2004-06-07 Franco Catrin L. <fcatrin@tuxpan.com> - * Small fix for depth calculation - -2004-04-11 Franco Catrin L. <fcatrin@tuxpan.com> - - * Basic bitblt implementation - * Fixed width and height calculation in solids - * Added ROP (not tested) - -2004-04-10 Franco Catrin L. <fcatrin@tuxpan.com> - - * MMIO enabled after switching to new VT - * First acceleration function implemented (DrawSolid) - -2004-04-06 Franco Catrin L. <fcatrin@tuxpan.com> - - * Returned to a working state. Brent will - continue working on a backend in a separate CVS branch diff --git a/hw/kdrive/neomagic/Makefile.am b/hw/kdrive/neomagic/Makefile.am index 468654711..95f0e1eaa 100644 --- a/hw/kdrive/neomagic/Makefile.am +++ b/hw/kdrive/neomagic/Makefile.am @@ -19,8 +19,6 @@ bin_PROGRAMS = Xneomagic noinst_LIBRARIES = libneomagic.a libneomagic_a_SOURCES = \ - backend.h \ - backend.c \ neomagic.c \ neomagic.h \ neo_draw.c diff --git a/hw/kdrive/neomagic/backend.c b/hw/kdrive/neomagic/backend.c deleted file mode 100644 index 12fbf030a..000000000 --- a/hw/kdrive/neomagic/backend.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Generic card driving functions. - * Essentially, cascades calls to fbdev and vesa to initialize cards that - * do not have hardware-specific routines yet. Copied from the ati driver. - * - * Copyright (c) 2004 Brent Cook <busterb@mail.utexas.edu> - * - * This code is licensed under the GPL. See the file COPYING in the root - * directory of the sources for details. - */ - -#ifdef HAVE_CONFIG_H -#include <kdrive-config.h> -#endif -#include "backend.h" - -Bool -backendInitialize(KdCardInfo *card, BackendInfo *backend) -{ - Bool success = FALSE; - -#ifdef KDRIVEVESA - if (!success && vesaInitialize(card, &backend->priv.vesa)) { - success = TRUE; - backend->type = VESA; - backend->cardfini = vesaCardFini; - backend->scrfini = vesaScreenFini; - backend->initScreen = vesaInitScreen; - backend->finishInitScreen = vesaFinishInitScreen; - backend->createRes = vesaCreateResources; - backend->preserve = vesaPreserve; - backend->restore = vesaRestore; - backend->dpms = vesaDPMS; - backend->enable = vesaEnable; - backend->disable = vesaDisable; - backend->getColors = vesaGetColors; - backend->putColors = vesaPutColors; - } -#endif -#ifdef KDRIVEFBDEV - if (!success && fbdevInitialize(card, &backend->priv.fbdev)) { - success = TRUE; - backend->type = FBDEV; - backend->cardfini = fbdevCardFini; - backend->scrfini = fbdevScreenFini; - backend->initScreen = fbdevInitScreen; - backend->finishInitScreen = fbdevFinishInitScreen; - backend->createRes = fbdevCreateResources; - backend->preserve = fbdevPreserve; - backend->restore = fbdevRestore; - backend->dpms = fbdevDPMS; - backend->enable = fbdevEnable; - backend->disable = fbdevDisable; - backend->getColors = fbdevGetColors; - backend->putColors = fbdevPutColors; - } -#endif - return success; -} - -Bool -backendScreenInitialize(KdScreenInfo *screen, BackendScreen *backendScreen, - BackendInfo *backendCard) -{ - Bool success = FALSE; - -#ifdef KDRIVEFBDEV - if (backendCard->type == FBDEV) { - screen->card->driver = &backendCard->priv.fbdev; - success = fbdevScreenInitialize(screen, &backendScreen->fbdev); - screen->memory_size = backendCard->priv.fbdev.fix.smem_len; - screen->off_screen_base = backendCard->priv.fbdev.var.yres_virtual - * screen->fb[0].byteStride; - } -#endif -#ifdef KDRIVEVESA - if (backendCard->type == VESA) { - screen->card->driver = &backendCard->priv.vesa; - if (screen->fb[0].depth == 0) { - screen->fb[0].depth = 16; - } - success = vesaScreenInitialize(screen, &backendScreen->vesa); - } -#endif - return success; -} diff --git a/hw/kdrive/neomagic/backend.h b/hw/kdrive/neomagic/backend.h deleted file mode 100644 index 33eae2680..000000000 --- a/hw/kdrive/neomagic/backend.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Generic card driving functions. - * Essentially, cascades calls to fbdev and vesa to initialize cards that - * do not have hardware-specific routines yet. Copied from the ati driver. - * - * Copyright (c) 2004 Brent Cook <busterb@mail.utexas.edu> - * - * This code is licensed under the GPL. See the file COPYING in the root - * directory of the sources for details. - */ - -#ifndef _BACKEND_H_ -#define _BACKEND_H_ -#include "kdrive.h" - -#ifdef KDRIVEFBDEV -#include <fbdev.h> -#endif -#ifdef KDRIVEVESA -#include <vesa.h> -#endif - -typedef enum _BackendType {VESA, FBDEV} BackendType; - -typedef struct _BackendInfo { - // backend info - BackendType type; - - // backend internal structures - union { -#ifdef KDRIVEFBDEV - FbdevPriv fbdev; -#endif -#ifdef KDRIVEVESA - VesaCardPrivRec vesa; -#endif - } priv; - - // pointers to helper functions for this backend - void (*cardfini)(KdCardInfo *); - void (*scrfini)(KdScreenInfo *); - Bool (*initScreen)(ScreenPtr); - Bool (*finishInitScreen)(ScreenPtr pScreen); - Bool (*createRes)(ScreenPtr); - void (*preserve)(KdCardInfo *); - void (*restore)(KdCardInfo *); - Bool (*dpms)(ScreenPtr, int); - Bool (*enable)(ScreenPtr); - void (*disable)(ScreenPtr); - void (*getColors)(ScreenPtr, int, int, xColorItem *); - void (*putColors)(ScreenPtr, int, int, xColorItem *); -} BackendInfo; - -typedef union _BackendScreen { -#ifdef KDRIVEFBDEV - FbdevScrPriv fbdev; -#endif -#ifdef KDRIVEVESA - VesaScreenPrivRec vesa; -#endif -} BackendScreen; - -Bool -backendInitialize(KdCardInfo *card, BackendInfo *backend); - -Bool -backendScreenInitialize(KdScreenInfo *screen, BackendScreen *backendScreen, - BackendInfo *backendCard); - -#endif diff --git a/hw/kdrive/nvidia/Makefile.am b/hw/kdrive/nvidia/Makefile.am index 8ebfec9de..b380e44ee 100644 --- a/hw/kdrive/nvidia/Makefile.am +++ b/hw/kdrive/nvidia/Makefile.am @@ -25,8 +25,7 @@ NVIDIA_LIBS = \ Xnvidia_LDADD = \ $(NVIDIA_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xnvidia_DEPENDENCIES = \ libnvidia.a \ diff --git a/hw/kdrive/pm2/Makefile.am b/hw/kdrive/pm2/Makefile.am index b2b48ba6a..208d0319e 100644 --- a/hw/kdrive/pm2/Makefile.am +++ b/hw/kdrive/pm2/Makefile.am @@ -23,8 +23,7 @@ PM2_LIBS = \ Xpm2_LDADD = \ $(PM2_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xpm2_DEPENDENCIES = \ libpm2.a \ diff --git a/hw/kdrive/r128/Makefile.am b/hw/kdrive/r128/Makefile.am index 609e0f5d2..62c1fcfa3 100644 --- a/hw/kdrive/r128/Makefile.am +++ b/hw/kdrive/r128/Makefile.am @@ -22,8 +22,7 @@ R128_LIBS = \ Xr128_LDADD = \ $(R128_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xr128_DEPENDENCIES = \ libr128.a \ diff --git a/hw/kdrive/savage/s3.h b/hw/kdrive/savage/s3.h index 628abc806..d8db0ebbf 100644 --- a/hw/kdrive/savage/s3.h +++ b/hw/kdrive/savage/s3.h @@ -470,7 +470,6 @@ void s3CursorDisable (ScreenPtr pScreen); void s3CursorFini (ScreenPtr pScreen); void s3RecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdefs); -void s3DumbPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what); void s3DumbCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); Bool s3DrawInit (ScreenPtr pScreen); diff --git a/hw/kdrive/savage/s3draw.c b/hw/kdrive/savage/s3draw.c index 39cc256b3..311a7dc01 100644 --- a/hw/kdrive/savage/s3draw.c +++ b/hw/kdrive/savage/s3draw.c @@ -2261,71 +2261,6 @@ s3PaintKey (DrawablePtr pDrawable, #endif void -s3PaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) -{ - SetupS3(pWin->drawable.pScreen); - s3ScreenInfo(pScreenPriv); - s3PatternPtr pPattern; - - DRAW_DEBUG ((DEBUG_PAINT_WINDOW, "s3PaintWindow 0x%x extents %d %d %d %d n %d", - pWin->drawable.id, - pRegion->extents.x1, pRegion->extents.y1, - pRegion->extents.x2, pRegion->extents.y2, - REGION_NUM_RECTS(pRegion))); - if (!REGION_NUM_RECTS(pRegion)) - return; - switch (what) { - case PW_BACKGROUND: - switch (pWin->backgroundState) { - case None: - return; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, - what); - return; - case BackgroundPixmap: - pPattern = s3GetWindowPrivate(pWin); - if (pPattern) - { - s3FillBoxPattern ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - GXcopy, ~0, pPattern); - return; - } - break; - case BackgroundPixel: - s3FillBoxSolid((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->background.pixel, GXcopy, ~0); - return; - } - break; - case PW_BORDER: -#ifndef S3_TRIO - if (s3s->fbmap[1] >= 0) - fbOverlayUpdateLayerRegion (pWin->drawable.pScreen, - fbOverlayWindowLayer (pWin), - pRegion); -#endif - if (pWin->borderIsPixel) - { - s3FillBoxSolid((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->border.pixel, GXcopy, ~0); - return; - } - break; - } - KdCheckPaintWindow (pWin, pRegion, what); -} - -void s3CopyWindowProc (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -3005,55 +2940,6 @@ s3_24CreateWindow(WindowPtr pWin) return fbCreateWindow (pWin); } -void -s3_24PaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) -{ - SetupS3(pWin->drawable.pScreen); - s3PatternPtr pPattern; - - DRAW_DEBUG ((DEBUG_PAINT_WINDOW, "s3PaintWindow 0x%x extents %d %d %d %d n %d", - pWin->drawable.id, - pRegion->extents.x1, pRegion->extents.y1, - pRegion->extents.x2, pRegion->extents.y2, - REGION_NUM_RECTS(pRegion))); - if (!REGION_NUM_RECTS(pRegion)) - return; - switch (what) { - case PW_BACKGROUND: - switch (pWin->backgroundState) { - case None: - return; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, - what); - return; - case BackgroundPixel: - if (ok24(pWin->background.pixel)) - { - s3_24FillBoxSolid((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->background.pixel, GXcopy, ~0); - return; - } - } - break; - case PW_BORDER: - if (pWin->borderIsPixel && ok24(pWin->border.pixel)) - { - s3_24FillBoxSolid((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->border.pixel, GXcopy, ~0); - return; - } - break; - } - KdCheckPaintWindow (pWin, pRegion, what); -} Bool s3DrawInit (ScreenPtr pScreen) @@ -3088,8 +2974,6 @@ s3DrawInit (ScreenPtr pScreen) { pScreen->CreateGC = s3_24CreateGC; pScreen->CreateWindow = s3_24CreateWindow; - pScreen->PaintWindowBackground = s3_24PaintWindow; - pScreen->PaintWindowBorder = s3_24PaintWindow; pScreen->CopyWindow = s3CopyWindow; } else @@ -3100,8 +2984,6 @@ s3DrawInit (ScreenPtr pScreen) pScreen->CreateWindow = s3CreateWindow; pScreen->ChangeWindowAttributes = s3ChangeWindowAttributes; pScreen->DestroyWindow = s3DestroyWindow; - pScreen->PaintWindowBackground = s3PaintWindow; - pScreen->PaintWindowBorder = s3PaintWindow; #ifndef S3_TRIO if (pScreenPriv->screen->fb[1].depth) { diff --git a/hw/kdrive/sdl/Makefile.am b/hw/kdrive/sdl/Makefile.am index e74249967..fe9309e46 100644 --- a/hw/kdrive/sdl/Makefile.am +++ b/hw/kdrive/sdl/Makefile.am @@ -7,9 +7,8 @@ bin_PROGRAMS = Xsdl Xsdl_SOURCES = sdl.c -Xsdl_LDADD = @KDRIVE_PURE_LIBS@ \ +Xsdl_LDADD = \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ @XSDL_LIBS@ Xsdl_DEPENDENCIES = @KDRIVE_LOCAL_LIBS@ diff --git a/hw/kdrive/sis530/sisdraw.c b/hw/kdrive/sis530/sisdraw.c index fd80fa76a..f2b39a477 100644 --- a/hw/kdrive/sis530/sisdraw.c +++ b/hw/kdrive/sis530/sisdraw.c @@ -1537,75 +1537,6 @@ sisCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); } -void -sisPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) -{ - KdScreenPriv(pWin->drawable.pScreen); - PixmapPtr pTile; - - if (!REGION_NUM_RECTS(pRegion)) - return; - switch (what) { - case PW_BACKGROUND: - switch (pWin->backgroundState) { - case None: - return; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, - what); - return; - case BackgroundPixmap: - pTile = pWin->background.pixmap; - if (sisPatternDimOk (pTile->drawable.width) && - sisPatternDimOk (pTile->drawable.height)) - { - sisFillBoxTiled ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pTile, - pWin->drawable.x, pWin->drawable.y, GXcopy); - return; - } - break; - case BackgroundPixel: - sisFillBoxSolid((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->background.pixel, GXcopy); - return; - } - break; - case PW_BORDER: - if (pWin->borderIsPixel) - { - sisFillBoxSolid((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->border.pixel, GXcopy); - return; - } - else - { - pTile = pWin->border.pixmap; - if (sisPatternDimOk (pTile->drawable.width) && - sisPatternDimOk (pTile->drawable.height)) - { - sisFillBoxTiled ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pTile, - pWin->drawable.x, pWin->drawable.y, GXcopy); - return; - } - } - break; - } - KdCheckPaintWindow (pWin, pRegion, what); -} - Bool sisDrawInit (ScreenPtr pScreen) { @@ -1621,9 +1552,7 @@ sisDrawInit (ScreenPtr pScreen) */ pScreen->CreateGC = sisCreateGC; pScreen->CopyWindow = sisCopyWindow; - pScreen->PaintWindowBackground = sisPaintWindow; - pScreen->PaintWindowBorder = sisPaintWindow; - + return TRUE; } diff --git a/hw/kdrive/smi/Makefile.am b/hw/kdrive/smi/Makefile.am index 6cee31610..a4d6624c5 100644 --- a/hw/kdrive/smi/Makefile.am +++ b/hw/kdrive/smi/Makefile.am @@ -27,8 +27,7 @@ SMI_LIBS = \ Xsmi_LDADD = \ $(SMI_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xsmi_DEPENDENCIES = \ libsmi.a \ diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c index da618bee5..486967783 100644 --- a/hw/kdrive/src/kaa.c +++ b/hw/kdrive/src/kaa.c @@ -1008,52 +1008,6 @@ kaaFillRegionTiled (DrawablePtr pDrawable, } #endif -static void -kaaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) -{ - - if (!REGION_NUM_RECTS(pRegion)) - return; - switch (what) { - case PW_BACKGROUND: - switch (pWin->backgroundState) { - case None: - return; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, - what); - return; - case BackgroundPixel: - kaaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->background.pixel); - return; -#if 0 - case BackgroundPixmap: - kaaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->background.pixmap); - return; -#endif - } - break; - case PW_BORDER: - if (pWin->borderIsPixel) - { - kaaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->border.pixel); - return; - } -#if 0 - else - { - kaaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->border.pixmap); - return; - } -#endif - break; - } - KdCheckPaintWindow (pWin, pRegion, what); -} - Bool kaaDrawInit (ScreenPtr pScreen, KaaScreenInfoPtr pScreenInfo) @@ -1083,8 +1037,6 @@ kaaDrawInit (ScreenPtr pScreen, */ pScreen->CreateGC = kaaCreateGC; pScreen->CopyWindow = kaaCopyWindow; - pScreen->PaintWindowBackground = kaaPaintWindow; - pScreen->PaintWindowBorder = kaaPaintWindow; #ifdef RENDER if (ps) { ps->Composite = kaaComposite; diff --git a/hw/kdrive/src/kasync.c b/hw/kdrive/src/kasync.c index 51909630e..5388f217d 100644 --- a/hw/kdrive/src/kasync.c +++ b/hw/kdrive/src/kasync.c @@ -224,14 +224,6 @@ KdCheckGetSpans (DrawablePtr pDrawable, } void -KdCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what) -{ - kaaWaitSync (pWin->drawable.pScreen); - kaaDrawableDirty ((DrawablePtr)pWin); - fbPaintWindow (pWin, pRegion, what); -} - -void KdCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { kaaWaitSync (pWin->drawable.pScreen); @@ -265,8 +257,6 @@ KdScreenInitAsync (ScreenPtr pScreen) { pScreen->GetImage = KdCheckGetImage; pScreen->GetSpans = KdCheckGetSpans; - pScreen->PaintWindowBackground = KdCheckPaintWindow; - pScreen->PaintWindowBorder = KdCheckPaintWindow; pScreen->CopyWindow = KdCheckCopyWindow; #ifdef RENDER KdPictureInitAsync (pScreen); diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index d6646f0ef..8722ba303 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -612,9 +612,6 @@ KdCheckGetSpans (DrawablePtr pDrawable, char *pdstStart); void -KdCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what); - -void KdCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); void diff --git a/hw/kdrive/vesa/Makefile.am b/hw/kdrive/vesa/Makefile.am index d58f20f95..ac50d2bf5 100644 --- a/hw/kdrive/vesa/Makefile.am +++ b/hw/kdrive/vesa/Makefile.am @@ -21,8 +21,7 @@ Xvesa_SOURCES = \ Xvesa_LDADD = \ libvesa.a \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xvesa_DEPENDENCIES = \ libvesa.a \ diff --git a/hw/kdrive/via/Makefile.am b/hw/kdrive/via/Makefile.am index 8c8189d12..249b3f31e 100644 --- a/hw/kdrive/via/Makefile.am +++ b/hw/kdrive/via/Makefile.am @@ -23,8 +23,7 @@ VIA_LIBS = \ Xvia_LDADD = \ $(VIA_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ + @KDRIVE_LIBS@ Xvia_DEPENDENCIES = \ libvia.a \ diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am index 6842b45a5..9ceecccc0 100644 --- a/hw/vfb/Makefile.am +++ b/hw/vfb/Makefile.am @@ -19,12 +19,13 @@ libfbcmap_a_SOURCES = $(top_srcdir)/fb/fbcmap_mi.c Xvfb_SOURCES = $(SRCS) -Xvfb_LDADD = $(XORG_CORE_LIBS) \ - $(XVFB_LIBS) \ - $(XSERVER_LIBS) \ - $(EXTENSION_LIBS) \ - $(XVFBMODULES_LIBS) \ - libfbcmap.a +XVFB_LIBS = \ + @XVFB_LIBS@ \ + libfbcmap.a \ + $(XSERVER_LIBS) + +Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS) +Xvfb_DEPENDENCIES = $(XVFB_LIBS) # Man page include $(top_srcdir)/cpprules.in diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am index 3ba6adc16..9be022010 100644 --- a/hw/xfree86/Makefile.am +++ b/hw/xfree86/Makefile.am @@ -48,7 +48,7 @@ osandcommon.c xorg.c: DISTCLEANFILES = osandcommon.c xorg.c XORG_LIBS = \ - @XORG_CORE_LIBS@ \ + $(XSERVER_LIBS) \ common/libinit.a \ loader/libloader.a \ libosandcommon.la \ @@ -59,14 +59,14 @@ XORG_LIBS = \ ramdac/libramdac.a \ ddc/libddc.a \ i2c/libi2c.a \ - @XORG_LIBS@ - -Xorg_DEPENDENCIES = \ - $(XORG_LIBS) - -Xorg_LDADD = $(XORG_LIBS) \ - @XSERVER_LIBS@ \ - dixmods/libxorgxkb.la + dixmods/libxorgxkb.la \ + $(top_builddir)/mi/libmi.la \ + $(top_builddir)/os/libos.la \ + @XORG_LIBS@ \ + dixmods/libxorgxkb.la + +Xorg_DEPENDENCIES = $(XORG_LIBS) +Xorg_LDADD = $(XORG_LIBS) $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) diff --git a/hw/xfree86/common/atKeynames.h b/hw/xfree86/common/atKeynames.h index f31f53377..85f13ac32 100644 --- a/hw/xfree86/common/atKeynames.h +++ b/hw/xfree86/common/atKeynames.h @@ -66,7 +66,7 @@ #define KanaMask Mod4Mask #define ScrollLockMask Mod5Mask -#define KeyPressed(k) (keyc->down[k >> 3] & (1 << (k & 7))) +#define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7))) #define ModifierDown(k) ((keyc->state & (k)) == (k)) /* diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index f8febc5a4..183c3cdb3 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -138,12 +138,6 @@ Bool xf86IsEntityPrimary(int entityIndex); resPtr xf86ReallocatePciResources(int entityIndex, resPtr pRes); resPtr xf86SetOperatingState(resList list, int entityIndex, int mask); void xf86EnterServerState(xf86State state); -resRange xf86GetBlock(unsigned long type, memType size, - memType window_start, memType window_end, - memType align_mask, resPtr avoid); -resRange xf86GetSparse(unsigned long type, memType fixed_bits, - memType decode_mask, memType address_mask, - resPtr avoid); memType xf86ChkConflict(resRange *rgp, int entityIndex); ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); Bool xf86NoSharedResources(int screenIndex, resType res); diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 537ddf7a4..3dc08f8a2 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -77,9 +77,6 @@ static resPtr AccReducers = NULL; resPtr Acc = NULL; resPtr osRes = NULL; -/* allocatable ranges */ -resPtr ResRange = NULL; - /* predefined special resources */ _X_EXPORT resRange resVgaExclusive[] = {_VGA_EXCLUSIVE, _END}; _X_EXPORT resRange resVgaShared[] = {_VGA_SHARED, _END}; @@ -1366,11 +1363,6 @@ xf86ResourceBrokerInit(void) osRes = NULL; - /* Get the addressable ranges */ - ResRange = xf86BusAccWindowsFromOS(); - xf86MsgVerb(X_INFO, 3, "Addressable bus resource ranges are\n"); - xf86PrintResList(3, ResRange); - /* Get the ranges used exclusively by the system */ osRes = xf86AccResFromOS(osRes); xf86MsgVerb(X_INFO, 3, "OS-reported resource ranges:\n"); @@ -1549,213 +1541,6 @@ RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment, Bool useEstimated #endif /* - * Resource request code - */ - -#define ALIGN(x,a) ((x) + a) &~(a) - -_X_EXPORT resRange -xf86GetBlock(unsigned long type, memType size, - memType window_start, memType window_end, - memType align_mask, resPtr avoid) -{ - memType min, max, tmp; - resRange r = {ResEnd,0,0}; - resPtr res_range = ResRange; - - if (!size) return r; - if (window_end < window_start || (window_end - window_start) < (size - 1)) { - ErrorF("Requesting insufficient memory window!:" - " start: 0x%lx end: 0x%lx size 0x%lx\n", - window_start,window_end,size); - return r; - } - type = (type & ~(ResExtMask | ResBios | ResEstimated)) | ResBlock; - - while (res_range) { - if ((type & ResTypeMask) == (res_range->res_type & ResTypeMask)) { - if (res_range->block_begin > window_start) - min = res_range->block_begin; - else - min = window_start; - if (res_range->block_end < window_end) - max = res_range->block_end; - else - max = window_end; - min = ALIGN(min,align_mask); - /* do not produce an overflow! */ - while (min < max && (max - min) >= (size - 1)) { - RANGE(r,min,min + size - 1,type); - tmp = ChkConflict(&r,Acc,SETUP); - if (!tmp) { - tmp = ChkConflict(&r,avoid,SETUP); - if (!tmp) { - return r; - } - } - min = ALIGN(tmp,align_mask); - } - } - res_range = res_range->next; - } - RANGE(r,0,0,ResEnd); - return r; -} - -#define mt_max ~(memType)0 -#define length sizeof(memType) * 8 -/* - * make_base() -- assign the lowest bits to the bits set in mask. - * example: mask 011010 val 0000110 -> 011000 - */ -static memType -make_base(memType val, memType mask) -{ - int i,j = 0; - memType ret = 0 - ; - for (i = 0;i<length;i++) { - if ((1 << i) & mask) { - ret |= (((val >> j) & 1) << i); - j++; - } - } - return ret; -} - -/* - * make_base() -- assign the bits set in mask to the lowest bits. - * example: mask 011010 , val 010010 -> 000011 - */ -static memType -unmake_base(memType val, memType mask) -{ - int i,j = 0; - memType ret = 0; - - for (i = 0;i<length;i++) { - if ((1 << i) & mask) { - ret |= (((val >> i) & 1) << j); - j++; - } - } - return ret; -} - -static memType -fix_counter(memType val, memType old_mask, memType mask) -{ - mask = old_mask & mask; - - val = make_base(val,old_mask); - return unmake_base(val,mask); -} - -_X_EXPORT resRange -xf86GetSparse(unsigned long type, memType fixed_bits, - memType decode_mask, memType address_mask, resPtr avoid) -{ - resRange r = {ResEnd,0,0}; - memType new_mask; - memType mask1; - memType base; - memType counter = 0; - memType counter1; - memType max_counter = ~(memType)0; - memType max_counter1; - memType conflict = 0; - - /* for sanity */ - type = (type & ~(ResExtMask | ResBios | ResEstimated)) | ResSparse; - - /* - * a sparse address consists of 3 parts: - * fixed_bits: F bits which hard decoded by the hardware - * decode_bits: D bits which are used to decode address - * but which may be set by software - * address_bits: A bits which are used to address the - * sparse range. - * the decode_mask marks all decode bits while the address_mask - * masks out all address_bits: - * F D A - * decode_mask: 0 1 0 - * address_mask: 1 1 0 - */ - decode_mask &= address_mask; - new_mask = decode_mask; - - /* - * We start by setting the decode_mask bits to different values - * when a conflict is found the address_mask of the conflicting - * resource is returned. We remove those bits from decode_mask - * that are also set in the returned address_mask as they always - * conflict with resources which use them as address masks. - * The resoulting mask is stored in new_mask. - * We continue until no conflict is found or until we have - * tried all possible settings of new_mask. - */ - while (1) { - base = make_base(counter,new_mask) | fixed_bits; - RANGE(r,base,address_mask,type); - conflict = ChkConflict(&r,Acc,SETUP); - if (!conflict) { - conflict = ChkConflict(&r,avoid,SETUP); - if (!conflict) { - return r; - } - } - counter = fix_counter(counter,new_mask,conflict); - max_counter = fix_counter(max_counter,new_mask,conflict); - new_mask &= conflict; - counter ++; - if (counter > max_counter) break; - } - if (!new_mask && (new_mask == decode_mask)) { - RANGE(r,0,0,ResEnd); - return r; - } - /* - * if we haven't been successful we also try to modify those - * bits in decode_mask that are not at the same time set in - * new mask. These bits overlap with address_bits of some - * resources. If a conflict with a resource of this kind is - * found (ie. returned_mask & mask1 != mask1) with - * mask1 = decode_mask & ~new_mask we cannot - * use our choice of bits in the new_mask part. We try - * another choice. - */ - max_counter = fix_counter(mt_max,mt_max,new_mask); - mask1 = decode_mask & ~new_mask; - max_counter1 = fix_counter(mt_max,mt_max,mask1); - counter = 0; - - while (1) { - counter1 = 0; - while (1) { - base = make_base(counter1,mask1); - RANGE(r,base,address_mask,type); - conflict = ChkConflict(&r,Acc,SETUP); - if (!conflict) { - conflict = ChkConflict(&r,avoid,SETUP); - if (!conflict) { - return r; - } - } - counter1 ++; - if ((mask1 & conflict) != mask1 || counter1 > max_counter1) - break; - } - counter ++; - if (counter > max_counter) break; - } - RANGE(r,0,0,ResEnd); - return r; -} - -#undef length -#undef mt_max - -/* * Resource registrarion */ diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 7c2c2503f..c31879ca3 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -811,9 +811,11 @@ xf86ReleaseKeys(DeviceIntPtr pDev) (*pDev->public.processInputProc) (&ke, pDev, 1); } else { + int sigstate = xf86BlockSIGIO (); nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i); for (j = 0; j < nevents; j++) - EqEnqueue(pDev, xf86Events + i); + mieqEnqueue(pDev, xf86Events + j); + xf86UnblockSIGIO(sigstate); } break; } diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 06af74f43..9ff2da73a 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1813,7 +1813,7 @@ xf86PrintBanner() "latest version in the X.Org Foundation git repository.\n" "See http://wiki.x.org/wiki/GitPage for git access instructions.\n"); #endif - ErrorF("\nX Window System Version %d.%d.%d", + ErrorF("\nX.Org X Server %d.%d.%d", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH); @@ -1847,8 +1847,8 @@ xf86PrintBanner() #define XORG_DATE XF86_DATE #endif ErrorF("\nRelease Date: %s\n", XORG_DATE); - ErrorF("X Protocol Version %d, Revision %d, %s\n", - X_PROTOCOL, X_PROTOCOL_REVISION, XORG_RELEASE ); + ErrorF("X Protocol Version %d, Revision %d\n", + X_PROTOCOL, X_PROTOCOL_REVISION); ErrorF("Build Operating System: %s %s\n", OSNAME, OSVENDOR); #ifdef HAS_UTSNAME { diff --git a/hw/xfree86/common/xf86Resources.h b/hw/xfree86/common/xf86Resources.h index 97bf817fe..15bd32c69 100644 --- a/hw/xfree86/common/xf86Resources.h +++ b/hw/xfree86/common/xf86Resources.h @@ -133,7 +133,5 @@ extern resRange res8514Shared[]; {ResExcIoSparse | ResBus, 0x0200, 0x0200},\ {ResExcMemBlock | ResBus, 0xA0000,0xFFFFF} -extern resRange PciAvoid[]; - #define RES_UNDEFINED NULL #endif diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre index ce54ea982..54d8eaa87 100644 --- a/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/hw/xfree86/doc/man/xorg.conf.man.pre @@ -293,15 +293,50 @@ server searches for font databases. Multiple .B FontPath entries may be specified, and they will be concatenated to build up the -fontpath used by the server. Font path elements may be either absolute -directory paths, or a font server identifier. +fontpath used by the server. Font path elements can be absolute +directory paths, catalogue directories or a font server identifier. The +formats of the later two are explained below: +.PP +.RS 7 +Catalogue directories: +.PP +.RS 4 +Catalogue directories can be specified using the prefix \fBcatalogue:\fR +before the directory name. The directory can then be populated with +symlinks pointing to the real font directories, using the following +syntax in the symlink name: +.PP +.RS 4 +.IR <identifier> : [attribute]: pri= <priority> +.RE +.PP +where +.I <identifier> +is an alphanumeric identifier, +.I [attribute] +is an attribute wich will be passed to the underlying FPE and +.I <priority> +is a number used to order the fontfile FPEs. Examples: +.PP +.RS 4 +.nf +.I 75dpi:unscaled:pri=20 -> /usr/share/X11/fonts/75dpi +.I gscript:pri=60 -> /usr/share/fonts/default/ghostscript +.I misc:unscaled:pri=10 \-> /usr/share/X11/fonts/misc +.fi +.PP +.RE .RE .RE +.PP +.RS 7 +Font server identifiers: +.PP +.RS 4 Font server identifiers have the form: +.RS 4 .PP -.RS 11 .IR <trans> / <hostname> : <port\-number> .RE .PP -.RS 7 where .I <trans> is the transport type to use to connect to the font server (e.g., @@ -313,10 +348,11 @@ for a TCP/IP connection), is the hostname of the machine running the font server, and .I <port\-number> is the port number that the font server is listening on (usually 7100). +.RE .PP When this entry is not specified in the config file, the server falls back to the compiled\-in default font path, which contains the following -font path elements: +font path elements (which can be set inside a catalogue directory): .PP .RS 4 .nf diff --git a/hw/xfree86/exa/exa.man.pre b/hw/xfree86/exa/exa.man.pre index b0eecd5cc..31e1cfe34 100644 --- a/hw/xfree86/exa/exa.man.pre +++ b/hw/xfree86/exa/exa.man.pre @@ -37,4 +37,4 @@ default is intended to be the best performing one for general use, though others may help with specific use cases. Available options include \*qalways\*q, \*qgreedy\*q, and \*qsmart\*q. Default: always. .SH AUTHORS -Authors include: Keith Packard, Eric Anholt, Zack Rusin, and Michel Dänzer +Authors include: Keith Packard, Eric Anholt, Zack Rusin, and Michel D\(:anzer diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c index 00c7752b7..837d2b12b 100644 --- a/hw/xfree86/fbdevhw/fbdevhw.c +++ b/hw/xfree86/fbdevhw/fbdevhw.c @@ -239,7 +239,7 @@ static Bool fbdev_modes_equal(struct fb_var_screeninfo *set, struct fb_var_screeninfo *req) { return (set->xres_virtual >= req->xres_virtual && - set->yres_virtual == req->yres_virtual && + set->yres_virtual >= req->yres_virtual && set->bits_per_pixel == req->bits_per_pixel && set->red.length == req->red.length && set->green.length == req->green.length && diff --git a/hw/xfree86/fbdevhw/fbdevhwstub.c b/hw/xfree86/fbdevhw/fbdevhwstub.c index 56ba92901..191a6d33d 100644 --- a/hw/xfree86/fbdevhw/fbdevhwstub.c +++ b/hw/xfree86/fbdevhw/fbdevhwstub.c @@ -1,4 +1,3 @@ - #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif @@ -23,13 +22,13 @@ fbdevHWFreeRec(ScrnInfoPtr pScrn) Bool -fbdevHWProbe(pciVideoPtr pPci, char *device, char **namep) +fbdevHWProbe(struct pci_device *pPci, char *device, char **namep) { return FALSE; } Bool -fbdevHWInit(ScrnInfoPtr pScrn, pciVideoPtr pPci, char *device) +fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device *pPci, char *device) { xf86Msg(X_ERROR, "fbdevhw is not available on this platform\n"); return FALSE; diff --git a/hw/xfree86/i2c/xf86i2c.c b/hw/xfree86/i2c/xf86i2c.c index 53382a859..5cc83faa3 100644 --- a/hw/xfree86/i2c/xf86i2c.c +++ b/hw/xfree86/i2c/xf86i2c.c @@ -883,7 +883,7 @@ xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus) continue; *pppI2CBus = xnfrealloc(*pppI2CBus, n * sizeof(I2CBusPtr)); - *pppI2CBus[n - 1] = pI2CBus; + (*pppI2CBus)[n - 1] = pI2CBus; } return n; diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c index 3e1051dc2..e8334262e 100644 --- a/hw/xfree86/int10/helper_exec.c +++ b/hw/xfree86/int10/helper_exec.c @@ -3,8 +3,8 @@ * execute BIOS int 10h calls in x86 real mode environment * Copyright 1999 Egbert Eich * - * Part of this is based on code taken from DOSEMU - * (C) Copyright 1992, ..., 1999 the "DOSEMU-Development-Team" + * Part of this code was inspired by the VBIOS POSTing code in DOSEMU + * developed by the "DOSEMU-Development-Team" */ /* diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c index 7beef3193..67a2fe784 100644 --- a/hw/xfree86/loader/xf86sym.c +++ b/hw/xfree86/loader/xf86sym.c @@ -333,8 +333,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86IsEntityPrimary) SYMFUNC(xf86SetOperatingState) SYMFUNC(xf86EnterServerState) - SYMFUNC(xf86GetBlock) - SYMFUNC(xf86GetSparse) SYMFUNC(xf86ChkConflict) SYMFUNC(xf86FindScreenForEntity) SYMFUNC(xf86RegisterStateChangeNotificationCallback) @@ -1116,7 +1114,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMVAR(resVgaSparseShared) SYMVAR(res8514Exclusive) SYMVAR(res8514Shared) - SYMVAR(PciAvoid) #if defined(__powerpc__) && (!defined(NO_INLINE) || defined(Lynx)) SYMVAR(ioBase) diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am index 0432ba931..446b69ee2 100644 --- a/hw/xfree86/os-support/bsd/Makefile.am +++ b/hw/xfree86/os-support/bsd/Makefile.am @@ -57,7 +57,6 @@ libbsd_la_SOURCES = \ $(srcdir)/../shared/libc_wrapper.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigio.c \ - $(srcdir)/../shared/stdPci.c \ $(srcdir)/../shared/vidmem.c \ bsd_VTsw.c \ bsd_init.c \ diff --git a/hw/xfree86/os-support/bsd/bsdResource.c b/hw/xfree86/os-support/bsd/bsdResource.c index 37749c913..fe166c845 100644 --- a/hw/xfree86/os-support/bsd/bsdResource.c +++ b/hw/xfree86/os-support/bsd/bsdResource.c @@ -17,66 +17,11 @@ /* Avoid Imakefile changes */ #include "bus/Pci.h" -_X_EXPORT resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END}; - #ifdef INCLUDE_XF86_NO_DOMAIN #if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) resPtr -xf86BusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -resPtr -xf86PciBusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - - /* - * Only allow the upper half of the pci memory range to be used - * for allocation. The lower half includes magic regions for DMA. - * XXX this is not right for XP1000's and similar where we use the - * region 0x40000000-0xbfffffff for DMA but this only matters if - * the bios screws up the pci region mappings. - */ - RANGE(range, 0x80000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -#ifdef INCLUDE_UNUSED - -resPtr -xf86IsaBusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -#endif /* INCLUDE_UNUSED */ - -resPtr xf86AccResFromOS(resPtr ret) { resRange range; @@ -118,52 +63,6 @@ xf86AccResFromOS(resPtr ret) #elif defined(__powerpc__) resPtr -xf86BusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -resPtr -xf86PciBusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -#ifdef INCLUDE_UNUSED - -resPtr -xf86IsaBusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -#endif /* INCLUDE_UNUSED */ - -resPtr xf86AccResFromOS(resPtr ret) { resRange range; diff --git a/hw/xfree86/os-support/bus/Makefile.am b/hw/xfree86/os-support/bus/Makefile.am index fba6e5421..381b9923c 100644 --- a/hw/xfree86/os-support/bus/Makefile.am +++ b/hw/xfree86/os-support/bus/Makefile.am @@ -7,12 +7,8 @@ if XORG_BUS_LINUXPCI PCI_SOURCES += linuxPci.c endif -if XORG_BUS_FREEBSDPCI -PCI_SOURCES += freebsdPci.c -endif - -if XORG_BUS_NETBSDPCI -PCI_SOURCES += netbsdPci.c +if XORG_BUS_BSDPCI +PCI_SOURCES += bsd_pci.c endif if XORG_BUS_IX86PCI diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c index 31e9023f0..a34ed99d0 100644 --- a/hw/xfree86/os-support/bus/Pci.c +++ b/hw/xfree86/os-support/bus/Pci.c @@ -286,21 +286,3 @@ xf86scanpci(void) return success; } - -#ifdef INCLUDE_XF86_NO_DOMAIN - -_X_EXPORT pointer -xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, - ADDRESS Base, unsigned long Size) -{ - return xf86MapVidMem(ScreenNum, Flags, Base, Size); -} - -IOADDRESS -xf86MapLegacyIO(struct pci_device *dev) -{ - (void) dev; - return 0; -} - -#endif /* INCLUDE_XF86_NO_DOMAIN */ diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h index 632a7a048..bb93260d1 100644 --- a/hw/xfree86/os-support/bus/Pci.h +++ b/hw/xfree86/os-support/bus/Pci.h @@ -184,35 +184,30 @@ #define PCI_CFGMECH1_MAXDEV 32 +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \ + defined(__DragonFly__) +#define ARCH_PCI_INIT bsdPciInit +#endif + +#if !defined(ARCH_PCI_INIT) /* * Select architecture specific PCI init function */ #if defined(__alpha__) # if defined(linux) # define ARCH_PCI_INIT axpPciInit -# elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) -# define ARCH_PCI_INIT freebsdPciInit -# define INCLUDE_XF86_NO_DOMAIN -# elif defined(__NetBSD__) -# define ARCH_PCI_INIT netbsdPciInit -# define INCLUDE_XF86_NO_DOMAIN # endif #elif defined(__arm__) # if defined(linux) # define ARCH_PCI_INIT linuxPciInit -# define INCLUDE_XF86_NO_DOMAIN # endif #elif defined(__hppa__) # if defined(linux) # define ARCH_PCI_INIT linuxPciInit -# define INCLUDE_XF86_NO_DOMAIN # endif #elif defined(__ia64__) # if defined(linux) # define ARCH_PCI_INIT ia64linuxPciInit -# elif defined(FreeBSD) -# define ARCH_PCI_INIT freebsdPciInit -# define INCLUDE_XF86_NO_DOMAIN # endif # define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper #elif defined(__i386__) || defined(i386) @@ -221,70 +216,50 @@ # else # define ARCH_PCI_INIT ix86PciInit # endif -# define INCLUDE_XF86_NO_DOMAIN #elif defined(__mc68000__) # if defined(linux) # define ARCH_PCI_INIT linuxPciInit -# define INCLUDE_XF86_NO_DOMAIN # endif #elif defined(__mips__) # if defined(linux) # define ARCH_PCI_INIT linuxPciInit -# define INCLUDE_XF86_NO_DOMAIN # endif #elif defined(__powerpc__) || defined(__powerpc64__) # if defined(linux) # define ARCH_PCI_INIT linuxPciInit -# define INCLUDE_XF86_NO_DOMAIN /* Needs kernel work to remove */ -# elif defined(__FreeBSD__) || defined(__OpenBSD__) -# define ARCH_PCI_INIT freebsdPciInit -# define INCLUDE_XF86_NO_DOMAIN -# elif defined(__NetBSD__) -# define ARCH_PCI_INIT netbsdPciInit -# define INCLUDE_XF86_NO_DOMAIN # else # define ARCH_PCI_INIT ppcPciInit -# define INCLUDE_XF86_NO_DOMAIN # endif #elif defined(__s390__) # if defined(linux) # define ARCH_PCI_INIT linuxPciInit -# define INCLUDE_XF86_NO_DOMAIN # endif #elif defined(__sh__) # if defined(linux) # define ARCH_PCI_INIT linuxPciInit -# define INCLUDE_XF86_NO_DOMAIN # endif #elif defined(__sparc__) || defined(sparc) # if defined(linux) # define ARCH_PCI_INIT linuxPciInit # elif defined(sun) # define ARCH_PCI_INIT sparcPciInit -# elif (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc64__) -# define ARCH_PCI_INIT freebsdPciInit -# define INCLUDE_XF86_NO_DOMAIN # endif # if !defined(__FreeBSD__) && !defined(linux) # define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge # endif #elif defined(__amd64__) || defined(__amd64) -# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -# define ARCH_PCI_INIT freebsdPciInit -# elif defined(linux) +# if defined(linux) # define ARCH_PCI_INIT linuxPciInit # else # define ARCH_PCI_INIT ix86PciInit # endif -# define INCLUDE_XF86_NO_DOMAIN #endif +#endif /* !defined(ARCH_PCI_INIT) */ #ifndef ARCH_PCI_INIT #error No PCI support available for this architecture/OS combination #endif -#undef INCLUDE_XF86_NO_DOMAIN - extern void ARCH_PCI_INIT(void); #if defined(XF86SCANPCI_WRAPPER) diff --git a/hw/xfree86/os-support/bus/axpPci.c b/hw/xfree86/os-support/bus/axpPci.c index e2f086c53..c59c06804 100644 --- a/hw/xfree86/os-support/bus/axpPci.c +++ b/hw/xfree86/os-support/bus/axpPci.c @@ -363,34 +363,6 @@ xf86MapLegacyIO(struct pci_device *dev) } resPtr -xf86PciBusAccWindowsFromOS(void) -{ - resPtr pRes = NULL; - resRange range; - int domain; - - for(domain = 0; domain < pciNumDomains; domain++) { - if (!xf86DomainInfo[domain]) continue; - - RANGE(range, 0, 0xffffffffUL, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - RANGE(range, 0, 0x0000ffffUL, - RANGE_TYPE(ResExcIoBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - } - - return pRes; -} - -resPtr -xf86BusAccWindowsFromOS(void) -{ - return xf86PciBusAccWindowsFromOS(); -} - -resPtr xf86AccResFromOS(resPtr pRes) { resRange range; diff --git a/hw/xfree86/os-support/bus/bsd_pci.c b/hw/xfree86/os-support/bus/bsd_pci.c new file mode 100644 index 000000000..bceb1087f --- /dev/null +++ b/hw/xfree86/os-support/bus/bsd_pci.c @@ -0,0 +1,84 @@ +/* + * Copyright © 2007 Intel Corporation + * + * 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. + * + * Authors: + * Eric Anholt <eric@anholt.net> + * + */ + +/** + * @file bsd_pci.c + * + * This is a trivial implementation of the remaining PCI support hooks in the + * X Server that is unaware of domains. + * + * Most of even this should go away once drivers are converted and the + * old interfaces are confirmed to all be obsolete. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <stdio.h> +#include "compiler.h" +#include "xf86.h" +#include "xf86Priv.h" +#include "xf86_OSlib.h" +#include "Pci.h" + +#include "pciaccess.h" + +static pciBusFuncs_t bsd_funcs = { + .pciAddrBusToHost = pciAddrNOOP, +}; + +static pciBusInfo_t bsd_pci = { + .configMech = PCI_CFG_MECH_OTHER, + .numDevices = 32, + .secondary = FALSE, + .primary_bus = 0, + .funcs = &bsd_funcs, + .pciBusPriv = NULL, + .bridge = NULL, +}; + +_X_EXPORT pointer +xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, + ADDRESS Base, unsigned long Size) +{ + return xf86MapVidMem(ScreenNum, Flags, Base, Size); +} + +IOADDRESS +xf86MapLegacyIO(struct pci_device *dev) +{ + (void)dev; + return 0; +} + +void +bsdPciInit(void) +{ + pciNumBuses = 1; + pciBusInfo[0] = &bsd_pci; +} diff --git a/hw/xfree86/os-support/bus/freebsdPci.c b/hw/xfree86/os-support/bus/freebsdPci.c deleted file mode 100644 index ff11c72f4..000000000 --- a/hw/xfree86/os-support/bus/freebsdPci.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 1998 by Concurrent Computer Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Concurrent Computer - * Corporation not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. Concurrent Computer Corporation makes no representations - * about the suitability of this software for any purpose. It is - * provided "as is" without express or implied warranty. - * - * CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - * Copyright 1998 by Metro Link Incorporated - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Metro Link - * Incorporated not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. Metro Link Incorporated makes no representations - * about the suitability of this software for any purpose. It is - * provided "as is" without express or implied warranty. - * - * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <stdio.h> -#include "compiler.h" -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" -#include "Pci.h" - -#include <sys/pciio.h> - -/* - * freebsd platform specific PCI access functions -- using /dev/pci - * needs kernel version 2.2.x - */ -static CARD32 freebsdPciCfgRead(PCITAG tag, int off); -static void freebsdPciCfgWrite(PCITAG, int off, CARD32 val); -static void freebsdPciCfgSetBits(PCITAG tag, int off, CARD32 mask, CARD32 bits); - -static pciBusFuncs_t freebsdFuncs0 = { -/* pciReadLong */ freebsdPciCfgRead, -/* pciWriteLong */ freebsdPciCfgWrite, -/* pciSetBitsLong */ freebsdPciCfgSetBits, -/* pciAddrHostToBus */ pciAddrNOOP, -/* pciAddrBusToHost */ pciAddrNOOP -}; - -static pciBusInfo_t freebsdPci0 = { -/* configMech */ PCI_CFG_MECH_OTHER, -/* numDevices */ 32, -/* secondary */ FALSE, -/* primary_bus */ 0, -/* funcs */ &freebsdFuncs0, -/* pciBusPriv */ NULL, -/* bridge */ NULL -}; - -#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) -#if X_BYTE_ORDER == X_BIG_ENDIAN -#ifdef __sparc__ -#ifndef ASI_PL -#define ASI_PL 0x88 -#endif -#define PCI_CPU(val) ({ \ -int __ret; \ -__asm__ __volatile__("lduwa [%1] %2, %0" : "=r" (__ret) : "r" (&val), "i" (ASI_PL)); \ -__ret; \ -}) -#else -#define PCI_CPU(val) (((val >> 24) & 0x000000ff) | \ - ((val >> 8) & 0x0000ff00) | \ - ((val << 8) & 0x00ff0000) | \ - ((val << 24) & 0xff000000)) -#endif -#else -#define PCI_CPU(val) (val) -#endif -#else /* ! OpenBSD */ -/* OpenBSD has already the bytes in the right order - for all architectures */ -#define PCI_CPU(val) (val) -#endif - - -#define BUS(tag) (((tag)>>16)&0xff) -#define DFN(tag) (((tag)>>8)&0xff) - -static int pciFd = -1; - -void -freebsdPciInit() -{ - pciFd = open("/dev/pci", O_RDWR); - if (pciFd < 0) - return; - - pciNumBuses = 1; - pciBusInfo[0] = &freebsdPci0; -} - -static CARD32 -freebsdPciCfgRead(PCITAG tag, int off) -{ - struct pci_io io; - int error; - io.pi_sel.pc_bus = BUS(tag); - io.pi_sel.pc_dev = DFN(tag) >> 3; - io.pi_sel.pc_func = DFN(tag) & 7; - io.pi_reg = off; - io.pi_width = 4; - error = ioctl(pciFd, PCIOCREAD, &io); - if (error) - return ~0; - return PCI_CPU(io.pi_data); -} - -static void -freebsdPciCfgWrite(PCITAG tag, int off, CARD32 val) -{ - struct pci_io io; - io.pi_sel.pc_bus = BUS(tag); - io.pi_sel.pc_dev = DFN(tag) >> 3; - io.pi_sel.pc_func = DFN(tag) & 7; - io.pi_reg = off; - io.pi_width = 4; - io.pi_data = PCI_CPU(val); - ioctl(pciFd, PCIOCWRITE, &io); -} - -static void -freebsdPciCfgSetBits(PCITAG tag, int off, CARD32 mask, CARD32 bits) -{ - CARD32 val = freebsdPciCfgRead(tag, off); - val = (val & ~mask) | (bits & mask); - freebsdPciCfgWrite(tag, off, val); -} diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c index b88fae6c7..11eb4f9e8 100644 --- a/hw/xfree86/os-support/bus/linuxPci.c +++ b/hw/xfree86/os-support/bus/linuxPci.c @@ -549,49 +549,6 @@ xf86MapLegacyIO(struct pci_device *dev) } resPtr -xf86BusAccWindowsFromOS(void) -{ - struct pci_device *dev; - struct pci_device_iterator *iter; - resPtr pRes = NULL; - resRange range; - - iter = pci_id_match_iterator_create(& match_host_bridge); - while ((dev = pci_device_next(iter)) != NULL) { - const int domain = dev->domain; - const struct pciSizes * const sizes = linuxGetSizesStruct(dev); - - RANGE(range, 0, (ADDRESS)(sizes->mem_size - 1), - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - RANGE(range, 0, (IOADDRESS)(sizes->io_size - 1), - RANGE_TYPE(ResExcIoBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - /* FIXME: The old code reserved domain 0 for a special purpose. The - * FIXME: new code just uses whatever domains the kernel tells it, - * FIXME: but there is no way to get a domain < 0. What should - * FIXME: happen here? - * - if (domain <= 0) - break; - */ - } - - pci_iterator_destroy(iter); - - return pRes; -} - -resPtr -xf86PciBusAccWindowsFromOS(void) -{ - return xf86BusAccWindowsFromOS(); -} - - -resPtr xf86AccResFromOS(resPtr pRes) { struct pci_device *dev; diff --git a/hw/xfree86/os-support/bus/netbsdPci.c b/hw/xfree86/os-support/bus/netbsdPci.c deleted file mode 100644 index 760302752..000000000 --- a/hw/xfree86/os-support/bus/netbsdPci.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE 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 XFREE86 PROJECT 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. - * - * Except as contained in this notice, the name of the XFree86 Project - * shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written - * authorization from the XFree86 Project. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <sys/types.h> -#include <sys/mman.h> -#include <sys/ioctl.h> -#include <fcntl.h> -#include <stdio.h> -#include <unistd.h> -#include <dev/pci/pciio.h> - -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86OSpriv.h" - -#include "Pci.h" - -static CARD32 netbsdPciConfRead(PCITAG, int); -static void netbsdPciConfWrite(PCITAG, int, CARD32); -static void netbsdPciSetBits(PCITAG, int, CARD32, CARD32); - -static int devpci = -1; - -static pciBusFuncs_t netbsdFuncs0 = { -/* pciReadLong */ netbsdPciConfRead, -/* pciWriteLong */ netbsdPciConfWrite, -/* pciSetBitsLong */ netbsdPciSetBits, -/* pciAddrHostToBus */ pciAddrNOOP, -/* pciAddrBusToHost */ pciAddrNOOP -}; - -static pciBusInfo_t netbsdPci0 = { -/* configMech */ PCI_CFG_MECH_OTHER, -/* numDevices */ 32, -/* secondary */ FALSE, -/* primary_bus */ 0, -/* funcs */ &netbsdFuncs0, -/* pciBusPriv */ NULL, -/* bridge */ NULL -}; - -void -netbsdPciInit() -{ - struct pciio_businfo pci_businfo; - - devpci = open("/dev/pci0", O_RDWR); - if (devpci == -1) - FatalError("netbsdPciInit: can't open /dev/pci0\n"); - - pciNumBuses = 1; - pciBusInfo[0] = &netbsdPci0; - /* use businfo to get the number of devs */ - if (ioctl(devpci, PCI_IOC_BUSINFO, &pci_businfo) != 0) - FatalError("netbsdPciInit: not a PCI bus device"); - netbsdPci0.numDevices = pci_businfo.maxdevs; -} - -static CARD32 -netbsdPciConfRead(PCITAG tag, int reg) -{ - struct pciio_bdf_cfgreg bdfr; - - bdfr.bus = PCI_BUS_FROM_TAG(tag); - bdfr.device = PCI_DEV_FROM_TAG(tag); - bdfr.function = PCI_FUNC_FROM_TAG(tag); - bdfr.cfgreg.reg = reg; - - if (ioctl(devpci, PCI_IOC_BDF_CFGREAD, &bdfr) == -1) - FatalError("netbsdPciConfRead: failed on %d/%d/%d\n", - bdfr.bus, bdfr.device, bdfr.function); - - return (bdfr.cfgreg.val); -} - -static void -netbsdPciConfWrite(PCITAG tag, int reg, CARD32 val) -{ - struct pciio_bdf_cfgreg bdfr; - - bdfr.bus = PCI_BUS_FROM_TAG(tag); - bdfr.device = PCI_DEV_FROM_TAG(tag); - bdfr.function = PCI_FUNC_FROM_TAG(tag); - bdfr.cfgreg.reg = reg; - bdfr.cfgreg.val = val; - - if (ioctl(devpci, PCI_IOC_BDF_CFGWRITE, &bdfr) == -1) - FatalError("netbsdPciConfWrite: failed on %d/%d/%d\n", - bdfr.bus, bdfr.device, bdfr.function); -} - -static void -netbsdPciSetBits(PCITAG tag, int reg, CARD32 mask, CARD32 bits) -{ - CARD32 val; - - val = netbsdPciConfRead(tag, reg); - val = (val & ~mask) | (bits & mask); - netbsdPciConfWrite(tag, reg, val); -} diff --git a/hw/xfree86/os-support/bus/sparcPci.c b/hw/xfree86/os-support/bus/sparcPci.c index 82b1d89b9..6f7113f15 100644 --- a/hw/xfree86/os-support/bus/sparcPci.c +++ b/hw/xfree86/os-support/bus/sparcPci.c @@ -649,54 +649,6 @@ xf86MapLegacyIO(int ScreenNum, int Flags, PCITAG Tag, } resPtr -xf86BusAccWindowsFromOS(void) -{ - sparcDomainPtr pDomain; - resPtr pRes = NULL; - resRange range; - int domain; - - for (domain = 1; domain < pciNumDomains; domain++) { - if (!(pDomain = xf86DomainInfo[domain])) - continue; - - RANGE(range, 0, pDomain->mem_size - 1, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - RANGE(range, 0, pDomain->io_size - 1, - RANGE_TYPE(ResExcIoBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - } - - return pRes; -} - -resPtr -xf86PciBusAccWindowsFromOS(void) -{ - sparcDomainPtr pDomain; - resPtr pRes = NULL; - resRange range; - int domain; - - for (domain = 1; domain < pciNumDomains; domain++) { - if (!(pDomain = xf86DomainInfo[domain])) - continue; - - RANGE(range, 0, pDomain->mem_size - 1, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - RANGE(range, 0, pDomain->io_size - 1, - RANGE_TYPE(ResExcIoBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - } - - return pRes; -} - -resPtr xf86AccResFromOS(resPtr pRes) { sparcDomainPtr pDomain; diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am index 731ff083d..e6543e133 100644 --- a/hw/xfree86/os-support/hurd/Makefile.am +++ b/hw/xfree86/os-support/hurd/Makefile.am @@ -6,7 +6,6 @@ libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/libc_wrapper.c \ $(srcdir)/../shared/stdResource.c \ - $(srcdir)/../shared/stdPci.c \ $(srcdir)/../shared/sigiostubs.c \ $(srcdir)/../shared/pm_noop.c \ $(srcdir)/../shared/kmod_noop.c \ diff --git a/hw/xfree86/os-support/linux/lnxResource.c b/hw/xfree86/os-support/linux/lnxResource.c index 6f89cdb07..67af9db3d 100644 --- a/hw/xfree86/os-support/linux/lnxResource.c +++ b/hw/xfree86/os-support/linux/lnxResource.c @@ -18,134 +18,11 @@ /* Avoid Imakefile changes */ #include "bus/Pci.h" -_X_EXPORT resRange PciAvoid[] = -{ -#if !defined(__sparc__) || !defined(INCLUDE_XF86_NO_DOMAIN) - _PCI_AVOID_PC_STYLE, -#endif - _END -}; - #ifdef INCLUDE_XF86_NO_DOMAIN #ifdef __alpha__ resPtr -xf86BusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -resPtr -xf86PciBusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - /* - * On the Alpha the first 16MB of every 128 Mb segment in - * sparse address space are an image of the ISA bus range - */ - if (_bus_base_sparse()) { - RANGE(range, 0x00000000, 0x07ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x09000000, 0x0fffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x11000000, 0x17ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x19000000, 0x1fffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x21000000, 0x27ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x29000000, 0x2fffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x31000000, 0x37ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x39000000, 0x3fffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x41000000, 0x47ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x49000000, 0x4fffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x51000000, 0x57ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x59000000, 0x5fffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x61000000, 0x67ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x69000000, 0x6fffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x71000000, 0x77ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x79000000, 0x7fffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x81000000, 0x87ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x89000000, 0x8fffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x91000000, 0x97ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x99000000, 0x9fffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xa1000000, 0xa7ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xa9000000, 0xafffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xb1000000, 0xb7ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xb9000000, 0xbfffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xc1000000, 0xc7ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xc9000000, 0xcfffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xd1000000, 0xd7ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xd9000000, 0xdfffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xe1000000, 0xe7ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xe9000000, 0xefffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xf1000000, 0xf7ffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xf9000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - } else { - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - } - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -#ifdef INCLUDE_UNUSED - -resPtr -xf86IsaBusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -#endif /* INCLUDE_UNUSED */ - -resPtr xf86AccResFromOS(resPtr ret) { resRange range; @@ -193,69 +70,6 @@ xf86AccResFromOS(resPtr ret) defined(__s390__) || \ defined(__hppa__) - /* - * XXX this isn't exactly correct but it will get the server working - * for now until we get something better. - */ - -resPtr -xf86BusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - -#if defined(__sparc__) || defined(__powerpc__) - RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); -#else - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); -#endif - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -resPtr -xf86PciBusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - -#if defined(__sparc__) || defined(__powerpc__) - RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); -#else - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); -#endif - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -#ifdef INCLUDE_UNUSED - -resPtr -xf86IsaBusAccWindowsFromOS(void) -{ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - -#if defined(__sparc__) || defined(__powerpc__) - RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); -#else - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); -#endif - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -#endif /* INCLUDE_UNUSED */ - resPtr xf86AccResFromOS(resPtr ret) { diff --git a/hw/xfree86/os-support/linux/lnx_pci.c b/hw/xfree86/os-support/linux/lnx_pci.c index 8415aa01c..53818f2dc 100644 --- a/hw/xfree86/os-support/linux/lnx_pci.c +++ b/hw/xfree86/os-support/linux/lnx_pci.c @@ -147,69 +147,6 @@ int lnxPciInit(void) { return xf86OSLinuxNumPciDevs; } -Bool -xf86GetPciSizeFromOS(PCITAG tag, int index, int* bits) -{ - signed PCIADDR_TYPE Size; - struct pci_dev *device; - - if (index >= 7) - return FALSE; - - if (!xf86OSLinuxPCIDevs) { - xf86OSLinuxPCIDevs = xf86OSLinuxGetPciDevs(); - } - if (!xf86OSLinuxPCIDevs) - return FALSE; - - for (device = xf86OSLinuxPCIDevs; device; device = device->next) { - if (tag == PCI_MAKE_TAG(PCI_MAKE_BUS(device->domain, device->bus), - device->dev, device->fn)) { - if (device->size[index] != 0) { - Size = device->size[index] - ((PCIADDR_TYPE) 1); - while (Size & ((PCIADDR_TYPE) 0x01)) { - Size = Size >> ((PCIADDR_TYPE) 1); - (*bits)++; - } - } - return TRUE; - } - } - - return FALSE; -} - - - -#if 0 -/* Query the kvirt address (64bit) of a BAR range from TAG */ -Bool -xf86GetPciOffsetFromOS(PCITAG tag, int index, unsigned long* bases) -{ - struct pci_dev *device; - - if (index >= 7) - return FALSE; - - if (!xf86OSLinuxPCIDevs) { - xf86OSLinuxPCIDevs = xf86OSLinuxGetPciDevs(); - } - if (!xf86OSLinuxPCIDevs) - return FALSE; - - for (device = xf86OSLinuxPCIDevs; device; device = device->next) { - if (tag == PCI_MAKE_TAG(PCI_MAKE_BUS(device->domain, device->bus), - device->dev, device->fn)) { - /* return the offset for the index requested */ - *bases = device->offset[index]; - return TRUE; - } - } - - return FALSE; -} -#endif - /* Query the kvirt address (64bit) of a BAR range from size for a given TAG */ unsigned long xf86GetOSOffsetFromPCI(PCITAG tag, int space, unsigned long base) diff --git a/hw/xfree86/os-support/shared/stdPci.c b/hw/xfree86/os-support/shared/stdPci.c deleted file mode 100644 index 6777c6a1f..000000000 --- a/hw/xfree86/os-support/shared/stdPci.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 1999-2003 by The XFree86 Project, 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <X11/X.h> -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86Privstr.h" -#include "xf86Pci.h" -#define NEED_OS_RAC_PROTOS -#include "xf86_OSlib.h" - -#ifndef HAVE_PCI_SIZE_FUNC -#define xf86StdGetPciSizeFromOS xf86GetPciSizeFromOS -#endif - -Bool -xf86StdGetPciSizeFromOS(PCITAG tag, int index, int* bits) -{ - return FALSE; -} diff --git a/hw/xfree86/os-support/shared/stdResource.c b/hw/xfree86/os-support/shared/stdResource.c index 555f80526..7229d55b5 100644 --- a/hw/xfree86/os-support/shared/stdResource.c +++ b/hw/xfree86/os-support/shared/stdResource.c @@ -43,69 +43,11 @@ /* Avoid Imakefile changes */ #include "bus/Pci.h" -#ifdef USESTDRES -#define xf86StdBusAccWindowsFromOS xf86BusAccWindowsFromOS +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ + defined(__DragonFly__) #define xf86StdAccResFromOS xf86AccResFromOS -#define xf86StdPciBusAccWindowsFromOS xf86PciBusAccWindowsFromOS -#define xf86StdIsaBusAccWindowsFromOS xf86IsaBusAccWindowsFromOS - -_X_EXPORT resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END}; #endif -#ifdef INCLUDE_XF86_NO_DOMAIN - -resPtr -xf86StdBusAccWindowsFromOS(void) -{ - /* Fallback is to allow addressing of all memory space */ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - /* Fallback is to allow addressing of all I/O space */ - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -resPtr -xf86StdPciBusAccWindowsFromOS(void) -{ - /* Fallback is to allow addressing of all memory space */ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - /* Fallback is to allow addressing of all I/O space */ - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -#ifdef INCLUDE_UNUSED - -resPtr -xf86StdIsaBusAccWindowsFromOS(void) -{ - /* Fallback is to allow addressing of all memory space */ - resPtr ret = NULL; - resRange range; - - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - /* Fallback is to allow addressing of all I/O space */ - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - return ret; -} - -#endif /* INCLUDE_UNUSED */ - resPtr xf86StdAccResFromOS(resPtr ret) { @@ -172,5 +114,3 @@ xf86StdAccResFromOS(resPtr ret) /* XXX add others */ return ret; } - -#endif /* INCLUDE_XF86_NO_DOMAIN */ diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am index c027d9a3e..5ed60bc55 100644 --- a/hw/xfree86/os-support/solaris/Makefile.am +++ b/hw/xfree86/os-support/solaris/Makefile.am @@ -23,7 +23,7 @@ libsolaris_la_SOURCES = sun_bios.c sun_init.c \ $(srcdir)/../shared/libc_wrapper.c \ $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \ - $(srcdir)/../shared/stdPci.c $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/stdResource.c \ $(VTSW_SRC) nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC) diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h index 6f0391dc7..abf5a47c2 100644 --- a/hw/xfree86/os-support/xf86_OSproc.h +++ b/hw/xfree86/os-support/xf86_OSproc.h @@ -228,22 +228,12 @@ extern PMClose xf86OSPMOpen(void); #ifdef NEED_OS_RAC_PROTOS /* RAC-related privs */ /* internal to os-support layer */ -resPtr xf86StdBusAccWindowsFromOS(void); -resPtr xf86StdPciAccWindowsFromOS(void); -resPtr xf86StdIsaAccWindowsFromOS(void); resPtr xf86StdAccResFromOS(resPtr ret); /* available to the common layer */ -resPtr xf86BusAccWindowsFromOS(void); -resPtr xf86PciBusAccWindowsFromOS(void); -#ifdef INCLUDE_UNUSED -resPtr xf86IsaBusAccWindowsFromOS(void); -#endif resPtr xf86AccResFromOS(resPtr ret); #endif /* NEED_OS_RAC_PROTOS */ -extern Bool xf86GetPciSizeFromOS(PCITAG tag, int indx, int* bits); -extern Bool xf86GetPciOffsetFromOS(PCITAG tag, int indx, unsigned long* bases); extern unsigned long xf86GetOSOffsetFromPCI(PCITAG tag, int space, unsigned long base); extern void xf86MakeNewMapping(int, int, unsigned long, unsigned long, pointer); diff --git a/hw/xfree86/rac/xf86RAC.c b/hw/xfree86/rac/xf86RAC.c index 5302a86b2..eb05f2e14 100644 --- a/hw/xfree86/rac/xf86RAC.c +++ b/hw/xfree86/rac/xf86RAC.c @@ -96,8 +96,6 @@ typedef struct _RACScreen { GetImageProcPtr GetImage; GetSpansProcPtr GetSpans; SourceValidateProcPtr SourceValidate; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; ClearToBackgroundProcPtr ClearToBackground; CreatePixmapProcPtr CreatePixmap; @@ -137,8 +135,6 @@ static void RACGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart); static void RACSourceValidate (DrawablePtr pDrawable, int x, int y, int width, int height ); -static void RACPaintWindowBackground(WindowPtr pWin, RegionPtr prgn, int what); -static void RACPaintWindowBorder(WindowPtr pWin, RegionPtr prgn, int what); static void RACCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc ); static void RACClearToBackground (WindowPtr pWin, int x, int y, @@ -286,8 +282,6 @@ xf86RACInit(ScreenPtr pScreen, unsigned int flag) WRAP_SCREEN_COND(GetImage, RACGetImage, RAC_FB); WRAP_SCREEN_COND(GetSpans, RACGetSpans, RAC_FB); WRAP_SCREEN_COND(SourceValidate, RACSourceValidate, RAC_FB); - WRAP_SCREEN_COND(PaintWindowBackground, RACPaintWindowBackground, RAC_FB); - WRAP_SCREEN_COND(PaintWindowBorder, RACPaintWindowBorder, RAC_FB); WRAP_SCREEN_COND(CopyWindow, RACCopyWindow, RAC_FB); WRAP_SCREEN_COND(ClearToBackground, RACClearToBackground, RAC_FB); WRAP_SCREEN_COND(CreatePixmap, RACCreatePixmap, RAC_FB); @@ -331,8 +325,6 @@ RACCloseScreen (int i, ScreenPtr pScreen) UNWRAP_SCREEN(GetImage); UNWRAP_SCREEN(GetSpans); UNWRAP_SCREEN(SourceValidate); - UNWRAP_SCREEN(PaintWindowBackground); - UNWRAP_SCREEN(PaintWindowBorder); UNWRAP_SCREEN(CopyWindow); UNWRAP_SCREEN(ClearToBackground); UNWRAP_SCREEN(SaveScreen); @@ -417,38 +409,6 @@ RACSourceValidate ( } static void -RACPaintWindowBackground( - WindowPtr pWin, - RegionPtr prgn, - int what - ) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - DPRINT_S("RACPaintWindowBackground",pScreen->myNum); - SCREEN_PROLOG (PaintWindowBackground); - ENABLE; - (*pScreen->PaintWindowBackground) (pWin, prgn, what); - SCREEN_EPILOG (PaintWindowBackground, RACPaintWindowBackground); -} - -static void -RACPaintWindowBorder( - WindowPtr pWin, - RegionPtr prgn, - int what -) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - DPRINT_S("RACPaintWindowBorder",pScreen->myNum); - SCREEN_PROLOG (PaintWindowBorder); - ENABLE; - (*pScreen->PaintWindowBorder) (pWin, prgn, what); - SCREEN_EPILOG (PaintWindowBorder, RACPaintWindowBorder); -} - -static void RACCopyWindow( WindowPtr pWin, DDXPointRec ptOldOrg, diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c index ba6e3a8ee..c3bd61c1e 100644 --- a/hw/xfree86/shadowfb/shadow.c +++ b/hw/xfree86/shadowfb/shadow.c @@ -35,11 +35,6 @@ #define MAX(a,b) (((a)>(b))?(a):(b)) static Bool ShadowCloseScreen (int i, ScreenPtr pScreen); -static void ShadowPaintWindow ( - WindowPtr pWin, - RegionPtr prgn, - int what -); static void ShadowCopyWindow( WindowPtr pWin, DDXPointRec ptOldOrg, @@ -82,8 +77,6 @@ typedef struct { RefreshAreaFuncPtr preRefresh; RefreshAreaFuncPtr postRefresh; CloseScreenProcPtr CloseScreen; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; CreateGCProcPtr CreateGC; ModifyPixmapHeaderProcPtr ModifyPixmapHeader; @@ -192,8 +185,6 @@ ShadowFBInit2 ( pPriv->vtSema = TRUE; pPriv->CloseScreen = pScreen->CloseScreen; - pPriv->PaintWindowBackground = pScreen->PaintWindowBackground; - pPriv->PaintWindowBorder = pScreen->PaintWindowBorder; pPriv->CopyWindow = pScreen->CopyWindow; pPriv->CreateGC = pScreen->CreateGC; pPriv->ModifyPixmapHeader = pScreen->ModifyPixmapHeader; @@ -202,8 +193,6 @@ ShadowFBInit2 ( pPriv->LeaveVT = pScrn->LeaveVT; pScreen->CloseScreen = ShadowCloseScreen; - pScreen->PaintWindowBackground = ShadowPaintWindow; - pScreen->PaintWindowBorder = ShadowPaintWindow; pScreen->CopyWindow = ShadowCopyWindow; pScreen->CreateGC = ShadowCreateGC; pScreen->ModifyPixmapHeader = ShadowModifyPixmapHeader; @@ -268,8 +257,6 @@ ShadowCloseScreen (int i, ScreenPtr pScreen) #endif /* RENDER */ pScreen->CloseScreen = pPriv->CloseScreen; - pScreen->PaintWindowBackground = pPriv->PaintWindowBackground; - pScreen->PaintWindowBorder = pPriv->PaintWindowBorder; pScreen->CopyWindow = pPriv->CopyWindow; pScreen->CreateGC = pPriv->CreateGC; pScreen->ModifyPixmapHeader = pPriv->ModifyPixmapHeader; @@ -288,35 +275,6 @@ ShadowCloseScreen (int i, ScreenPtr pScreen) return (*pScreen->CloseScreen) (i, pScreen); } -static void -ShadowPaintWindow( - WindowPtr pWin, - RegionPtr prgn, - int what -){ - ScreenPtr pScreen = pWin->drawable.pScreen; - ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScreen); - int num = 0; - - if(pPriv->vtSema && (num = REGION_NUM_RECTS(prgn))) - if(pPriv->preRefresh) - (*pPriv->preRefresh)(pPriv->pScrn, num, REGION_RECTS(prgn)); - - if(what == PW_BACKGROUND) { - pScreen->PaintWindowBackground = pPriv->PaintWindowBackground; - (*pScreen->PaintWindowBackground) (pWin, prgn, what); - pScreen->PaintWindowBackground = ShadowPaintWindow; - } else { - pScreen->PaintWindowBorder = pPriv->PaintWindowBorder; - (*pScreen->PaintWindowBorder) (pWin, prgn, what); - pScreen->PaintWindowBorder = ShadowPaintWindow; - } - - if(num && pPriv->postRefresh) - (*pPriv->postRefresh)(pPriv->pScrn, num, REGION_RECTS(prgn)); -} - - static void ShadowCopyWindow( WindowPtr pWin, diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am index 6ed8303a4..58c8e885f 100644 --- a/hw/xfree86/xaa/Makefile.am +++ b/hw/xfree86/xaa/Makefile.am @@ -16,7 +16,7 @@ libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \ xaaBitBlt.c xaaCpyArea.c xaaGCmisc.c xaaCpyWin.c \ xaaCpyPlane.c xaaFillRect.c xaaTEText.c xaaNonTEText.c \ xaaPCache.c xaaSpans.c xaaROP.c xaaImage.c xaaWrapper.c \ - xaaPaintWin.c xaaRect.c xaaLineMisc.c xaaBitOrder.c \ + xaaRect.c xaaLineMisc.c xaaBitOrder.c \ xaaFillPoly.c xaaWideLine.c xaaTables.c xaaFillArc.c \ xaaLine.c xaaDashLine.c xaaOverlay.c xaaOffscreen.c \ xaaOverlayDF.c xaaStateChange.c xaaPict.c $(POLYSEG) \ diff --git a/hw/xfree86/xaa/xaa.h b/hw/xfree86/xaa/xaa.h index c8d0467e9..1dc7ed2d5 100644 --- a/hw/xfree86/xaa/xaa.h +++ b/hw/xfree86/xaa/xaa.h @@ -1238,8 +1238,6 @@ typedef struct _XAAInfoRec { GetImageProcPtr GetImage; GetSpansProcPtr GetSpans; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; BackingStoreSaveAreasProcPtr SaveAreas; BackingStoreRestoreAreasProcPtr RestoreAreas; diff --git a/hw/xfree86/xaa/xaaGC.c b/hw/xfree86/xaa/xaaGC.c index 65a482fe7..e6083d529 100644 --- a/hw/xfree86/xaa/xaaGC.c +++ b/hw/xfree86/xaa/xaaGC.c @@ -81,10 +81,11 @@ XAAValidateGC( } if(pGC->depth != 32) { - if(pGC->bgPixel == -1) /* -1 is reserved for transparency */ - pGC->bgPixel = 0x7fffffff; - if(pGC->fgPixel == -1) /* -1 is reserved for transparency */ - pGC->fgPixel = 0x7fffffff; + /* 0xffffffff is reserved for transparency */ + if(pGC->bgPixel == 0xffffffff) + pGC->bgPixel = 0x7fffffff; + if(pGC->fgPixel == 0xffffffff) + pGC->fgPixel = 0x7fffffff; } if((pDraw->type == DRAWABLE_PIXMAP) && !IS_OFFSCREEN_PIXMAP(pDraw)){ diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c index 614ecf751..f1757c866 100644 --- a/hw/xfree86/xaa/xaaInit.c +++ b/hw/xfree86/xaa/xaaInit.c @@ -136,10 +136,6 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) infoRec->GetImage = XAAGetImage; if(!infoRec->GetSpans) infoRec->GetSpans = XAAGetSpans; - if(!infoRec->PaintWindowBackground) - infoRec->PaintWindowBackground = XAAPaintWindow; - if(!infoRec->PaintWindowBorder) - infoRec->PaintWindowBorder = XAAPaintWindow; if(!infoRec->CopyWindow) infoRec->CopyWindow = XAACopyWindow; @@ -151,10 +147,6 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) pScreen->GetImage = infoRec->GetImage; pScreenPriv->GetSpans = pScreen->GetSpans; pScreen->GetSpans = infoRec->GetSpans; - pScreenPriv->PaintWindowBackground = pScreen->PaintWindowBackground; - pScreen->PaintWindowBackground = infoRec->PaintWindowBackground; - pScreenPriv->PaintWindowBorder = pScreen->PaintWindowBorder; - pScreen->PaintWindowBorder = infoRec->PaintWindowBorder; pScreenPriv->CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = infoRec->CopyWindow; pScreenPriv->CreatePixmap = pScreen->CreatePixmap; @@ -225,8 +217,6 @@ XAACloseScreen (int i, ScreenPtr pScreen) pScreen->CloseScreen = pScreenPriv->CloseScreen; pScreen->GetImage = pScreenPriv->GetImage; pScreen->GetSpans = pScreenPriv->GetSpans; - pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground; - pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder; pScreen->CopyWindow = pScreenPriv->CopyWindow; pScreen->WindowExposures = pScreenPriv->WindowExposures; pScreen->CreatePixmap = pScreenPriv->CreatePixmap; diff --git a/hw/xfree86/xaa/xaaOverlay.c b/hw/xfree86/xaa/xaaOverlay.c index 016459091..86b30ff22 100644 --- a/hw/xfree86/xaa/xaaOverlay.c +++ b/hw/xfree86/xaa/xaaOverlay.c @@ -93,183 +93,6 @@ XAACopyWindow8_32( REGION_DESTROY(pScreen, borderClip); } - - - -static void -XAAPaintWindow8_32( - WindowPtr pWin, - RegionPtr prgn, - int what -){ - ScreenPtr pScreen = pWin->drawable.pScreen; - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_DRAWABLE((&pWin->drawable)); - int nBox = REGION_NUM_RECTS(prgn); - BoxPtr pBox = REGION_RECTS(prgn); - PixmapPtr pPix = NULL; - int depth = pWin->drawable.depth; - int fg = 0, pm; - - if(!infoRec->pScrn->vtSema) goto BAILOUT; - - switch (what) { - case PW_BACKGROUND: - switch(pWin->backgroundState) { - case None: return; - case ParentRelative: - do { pWin = pWin->parent; } - while(pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, prgn, what); - return; - case BackgroundPixel: - fg = pWin->background.pixel; - break; - case BackgroundPixmap: - pPix = pWin->background.pixmap; - break; - } - break; - case PW_BORDER: - if (pWin->borderIsPixel) - fg = pWin->border.pixel; - else /* pixmap */ - pPix = pWin->border.pixmap; - break; - default: return; - } - - if(depth == 8) { - pm = 0xff000000; - fg <<= 24; - } else - pm = 0x00ffffff; - - if(!pPix) { - if(infoRec->FillSolidRects && - !(infoRec->FillSolidRectsFlags & NO_PLANEMASK) && - (!(infoRec->FillSolidRectsFlags & RGB_EQUAL) || - (depth == 8) || CHECK_RGB_EQUAL(fg))) - { - (*infoRec->FillSolidRects)(infoRec->pScrn, fg, GXcopy, - pm, nBox, pBox); - return; - } - } else { /* pixmap */ - XAAPixmapPtr pPriv = XAA_GET_PIXMAP_PRIVATE(pPix); - WindowPtr pBgWin = pWin; - int xorg, yorg; - - if (what == PW_BORDER) { - for (pBgWin = pWin; - pBgWin->backgroundState == ParentRelative; - pBgWin = pBgWin->parent); - } - - xorg = pBgWin->drawable.x; - yorg = pBgWin->drawable.y; - -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - int index = pScreen->myNum; - if(WindowTable[index] == pBgWin) { - xorg -= panoramiXdataPtr[index].x; - yorg -= panoramiXdataPtr[index].y; - } - } -#endif - - if(IS_OFFSCREEN_PIXMAP(pPix) && infoRec->FillCacheBltRects) { - XAACacheInfoPtr pCache = &(infoRec->ScratchCacheInfoRec); - - pCache->x = pPriv->offscreenArea->box.x1; - pCache->y = pPriv->offscreenArea->box.y1; - pCache->w = pCache->orig_w = - pPriv->offscreenArea->box.x2 - pCache->x; - pCache->h = pCache->orig_h = - pPriv->offscreenArea->box.y2 - pCache->y; - pCache->trans_color = -1; - - (*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, pm, - nBox, pBox, xorg, yorg, pCache); - - return; - } - - if(pPriv->flags & DIRTY) { - pPriv->flags &= ~(DIRTY | REDUCIBILITY_MASK); - pPix->drawable.serialNumber = NEXT_SERIAL_NUMBER; - } - - if(!(pPriv->flags & REDUCIBILITY_CHECKED) && - (infoRec->CanDoMono8x8 || infoRec->CanDoColor8x8)) { - XAACheckTileReducibility(pPix, infoRec->CanDoMono8x8); - } - - if(pPriv->flags & REDUCIBLE_TO_8x8) { - if((pPriv->flags & REDUCIBLE_TO_2_COLOR) && - infoRec->CanDoMono8x8 && infoRec->FillMono8x8PatternRects && - !(infoRec->FillMono8x8PatternRectsFlags & NO_PLANEMASK) && - !(infoRec->FillMono8x8PatternRectsFlags & TRANSPARENCY_ONLY) && - (!(infoRec->FillMono8x8PatternRectsFlags & RGB_EQUAL) || - (CHECK_RGB_EQUAL(pPriv->fg) && CHECK_RGB_EQUAL(pPriv->bg)))) - { - (*infoRec->FillMono8x8PatternRects)(infoRec->pScrn, - pPriv->fg, pPriv->bg, GXcopy, pm, nBox, pBox, - pPriv->pattern0, pPriv->pattern1, xorg, yorg); - return; - } - if(infoRec->CanDoColor8x8 && infoRec->FillColor8x8PatternRects && - !(infoRec->FillColor8x8PatternRectsFlags & NO_PLANEMASK)) - { - XAACacheInfoPtr pCache = (*infoRec->CacheColor8x8Pattern)( - infoRec->pScrn, pPix, -1, -1); - - (*infoRec->FillColor8x8PatternRects) (infoRec->pScrn, - GXcopy, pm, nBox, pBox, xorg, yorg, pCache); - return; - } - } - - if(infoRec->UsingPixmapCache && infoRec->FillCacheBltRects && - !(infoRec->FillCacheBltRectsFlags & NO_PLANEMASK) && - (pPix->drawable.height <= infoRec->MaxCacheableTileHeight) && - (pPix->drawable.width <= infoRec->MaxCacheableTileWidth)) - { - XAACacheInfoPtr pCache = - (*infoRec->CacheTile)(infoRec->pScrn, pPix); - (*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, pm, - nBox, pBox, xorg, yorg, pCache); - return; - } - - if(infoRec->FillImageWriteRects && - !(infoRec->FillImageWriteRectsFlags & NO_PLANEMASK)) - { - (*infoRec->FillImageWriteRects) (infoRec->pScrn, GXcopy, - pm, nBox, pBox, xorg, yorg, pPix); - return; - } - } - - if(infoRec->NeedToSync) { - (*infoRec->Sync)(infoRec->pScrn); - infoRec->NeedToSync = FALSE; - } - -BAILOUT: - - if(what == PW_BACKGROUND) { - XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBackground); - (*pScreen->PaintWindowBackground) (pWin, prgn, what); - XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBackground, XAAPaintWindow8_32); - } else { - XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBorder); - (*pScreen->PaintWindowBorder) (pWin, prgn, what); - XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBorder, XAAPaintWindow8_32); - } -} - - static void XAASetColorKey8_32( ScreenPtr pScreen, @@ -295,8 +118,6 @@ XAASetupOverlay8_32Planar(ScreenPtr pScreen) XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); int i; - pScreen->PaintWindowBackground = XAAPaintWindow8_32; - pScreen->PaintWindowBorder = XAAPaintWindow8_32; pScreen->CopyWindow = XAACopyWindow8_32; if(!(infoRec->FillSolidRectsFlags & NO_PLANEMASK)) diff --git a/hw/xfree86/xaa/xaaOverlayDF.c b/hw/xfree86/xaa/xaaOverlayDF.c index 77c9cb1c9..508b5c6f1 100644 --- a/hw/xfree86/xaa/xaaOverlayDF.c +++ b/hw/xfree86/xaa/xaaOverlayDF.c @@ -28,7 +28,6 @@ /* Screen funcs */ static void XAAOverCopyWindow(WindowPtr, DDXPointRec, RegionPtr); -static void XAAOverPaintWindow(WindowPtr, RegionPtr, int); static void XAAOverWindowExposures(WindowPtr, RegionPtr, RegionPtr); static int XAAOverStippledFillChooser(GCPtr); @@ -185,8 +184,6 @@ XAAInitDualFramebufferOverlay( /* Overwrite key screen functions. The XAA core will clean up */ pScreen->CopyWindow = XAAOverCopyWindow; - pScreen->PaintWindowBackground = XAAOverPaintWindow; - pScreen->PaintWindowBorder = XAAOverPaintWindow; pScreen->WindowExposures = XAAOverWindowExposures; pOverPriv->StippledFillChooser = infoRec->StippledFillChooser; @@ -401,56 +398,6 @@ XAAOverCopyWindow( } -static void -XAAOverPaintWindow( - WindowPtr pWin, - RegionPtr pRegion, - int what -){ - ScreenPtr pScreen = pWin->drawable.pScreen; - XAAOverlayPtr pOverPriv = GET_OVERLAY_PRIV(pScreen); - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); - ScrnInfoPtr pScrn = infoRec->pScrn; - - if(pScrn->vtSema) { - if(what == PW_BACKGROUND) { - SWITCH_DEPTH(pWin->drawable.depth); - (*infoRec->PaintWindowBackground)(pWin, pRegion, what); - return; - } else { - if(pWin->drawable.bitsPerPixel == 8) { - SWITCH_DEPTH(8); - (*infoRec->PaintWindowBorder)(pWin, pRegion, what); - return; - } else if (infoRec->FillSolidRects) { - SWITCH_DEPTH(8); - (*infoRec->FillSolidRects)(pScrn, pScrn->colorKey, GXcopy, - ~0, REGION_NUM_RECTS(pRegion), REGION_RECTS(pRegion)); - - SWITCH_DEPTH(pWin->drawable.depth); - (*infoRec->PaintWindowBorder)(pWin, pRegion, what); - return; - } - } - - if(infoRec->NeedToSync) { - (*infoRec->Sync)(infoRec->pScrn); - infoRec->NeedToSync = FALSE; - } - } - - if(what == PW_BACKGROUND) { - XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBackground); - (*pScreen->PaintWindowBackground) (pWin, pRegion, what); - XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBackground, XAAOverPaintWindow); - } else { - XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBorder); - (*pScreen->PaintWindowBorder) (pWin, pRegion, what); - XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBorder, XAAOverPaintWindow); - } -} - - void XAAOverWindowExposures( WindowPtr pWin, diff --git a/hw/xfree86/xaa/xaaPaintWin.c b/hw/xfree86/xaa/xaaPaintWin.c deleted file mode 100644 index af5680c67..000000000 --- a/hw/xfree86/xaa/xaaPaintWin.c +++ /dev/null @@ -1,200 +0,0 @@ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include "misc.h" -#include "xf86.h" -#include "xf86_OSproc.h" - -#include <X11/X.h> -#include "scrnintstr.h" -#include "windowstr.h" -#include "xf86str.h" -#include "xaa.h" -#include "xaalocal.h" -#include "gcstruct.h" -#include "pixmapstr.h" -#include "xaawrap.h" - -#ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" -#endif - -void -XAAPaintWindow( - WindowPtr pWin, - RegionPtr prgn, - int what -) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_DRAWABLE((&pWin->drawable)); - int nBox = REGION_NUM_RECTS(prgn); - BoxPtr pBox = REGION_RECTS(prgn); - int fg = -1; - PixmapPtr pPix = NULL; - - if(!infoRec->pScrn->vtSema) goto BAILOUT; - - switch (what) { - case PW_BACKGROUND: - switch(pWin->backgroundState) { - case None: return; - case ParentRelative: - do { pWin = pWin->parent; } - while(pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, prgn, what); - return; - case BackgroundPixel: - fg = pWin->background.pixel; - break; - case BackgroundPixmap: - pPix = pWin->background.pixmap; - break; - } - break; - case PW_BORDER: - if (pWin->borderIsPixel) - fg = pWin->border.pixel; - else /* pixmap */ - pPix = pWin->border.pixmap; - break; - default: return; - } - - - if(!pPix) { - if(infoRec->FillSolidRects && - (!(infoRec->FillSolidRectsFlags & RGB_EQUAL) || - (CHECK_RGB_EQUAL(fg))) ) { - (*infoRec->FillSolidRects)(infoRec->pScrn, fg, GXcopy, ~0, - nBox, pBox); - return; - } - } else { /* pixmap */ - XAAPixmapPtr pPriv = XAA_GET_PIXMAP_PRIVATE(pPix); - WindowPtr pBgWin = pWin; - Bool NoCache = FALSE; - int xorg, yorg; - - /* Hack so we can use this with the dual framebuffer layers - which only support the pixmap cache in the primary bpp */ - if(pPix->drawable.bitsPerPixel != infoRec->pScrn->bitsPerPixel) - NoCache = TRUE; - - if (what == PW_BORDER) { - for (pBgWin = pWin; - pBgWin->backgroundState == ParentRelative; - pBgWin = pBgWin->parent); - } - - xorg = pBgWin->drawable.x; - yorg = pBgWin->drawable.y; - -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - int index = pScreen->myNum; - if(WindowTable[index] == pBgWin) { - xorg -= panoramiXdataPtr[index].x; - yorg -= panoramiXdataPtr[index].y; - } - } -#endif - - if(IS_OFFSCREEN_PIXMAP(pPix) && infoRec->FillCacheBltRects) { - XAACacheInfoPtr pCache = &(infoRec->ScratchCacheInfoRec); - - pCache->x = pPriv->offscreenArea->box.x1; - pCache->y = pPriv->offscreenArea->box.y1; - pCache->w = pCache->orig_w = - pPriv->offscreenArea->box.x2 - pCache->x; - pCache->h = pCache->orig_h = - pPriv->offscreenArea->box.y2 - pCache->y; - pCache->trans_color = -1; - - (*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, ~0, - nBox, pBox, xorg, yorg, pCache); - return; - } - - if(pPriv->flags & DIRTY) { - pPriv->flags &= ~(DIRTY | REDUCIBILITY_MASK); - pPix->drawable.serialNumber = NEXT_SERIAL_NUMBER; - } - - if(!(pPriv->flags & REDUCIBILITY_CHECKED) && - (infoRec->CanDoMono8x8 || infoRec->CanDoColor8x8)) { - XAACheckTileReducibility(pPix, infoRec->CanDoMono8x8); - } - - if(pPriv->flags & REDUCIBLE_TO_8x8) { - if((pPriv->flags & REDUCIBLE_TO_2_COLOR) && - infoRec->CanDoMono8x8 && infoRec->FillMono8x8PatternRects && - !(infoRec->FillMono8x8PatternRectsFlags & TRANSPARENCY_ONLY) && - (!(infoRec->FillMono8x8PatternRectsFlags & RGB_EQUAL) || - (CHECK_RGB_EQUAL(pPriv->fg) && CHECK_RGB_EQUAL(pPriv->bg)))) { - - (*infoRec->FillMono8x8PatternRects)(infoRec->pScrn, - pPriv->fg, pPriv->bg, GXcopy, ~0, nBox, pBox, - pPriv->pattern0, pPriv->pattern1, xorg, yorg); - return; - } - if(infoRec->CanDoColor8x8 && !NoCache && - infoRec->FillColor8x8PatternRects) { - XAACacheInfoPtr pCache = (*infoRec->CacheColor8x8Pattern)( - infoRec->pScrn, pPix, -1, -1); - - (*infoRec->FillColor8x8PatternRects) ( infoRec->pScrn, - GXcopy, ~0, nBox, pBox, xorg, yorg, pCache); - return; - } - } - - /* The window size check is to reduce pixmap cache thrashing - when there are lots of little windows with pixmap backgrounds - like are sometimes used for buttons, etc... */ - - if(infoRec->UsingPixmapCache && - infoRec->FillCacheBltRects && !NoCache && - ((what == PW_BORDER) || - (pPix->drawable.height != pWin->drawable.height) || - (pPix->drawable.width != pWin->drawable.width)) && - (pPix->drawable.height <= infoRec->MaxCacheableTileHeight) && - (pPix->drawable.width <= infoRec->MaxCacheableTileWidth)) { - - XAACacheInfoPtr pCache = - (*infoRec->CacheTile)(infoRec->pScrn, pPix); - (*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, ~0, - nBox, pBox, xorg, yorg, pCache); - return; - } - - if(infoRec->FillImageWriteRects && - !(infoRec->FillImageWriteRectsFlags & NO_GXCOPY)) { - (*infoRec->FillImageWriteRects) (infoRec->pScrn, GXcopy, - ~0, nBox, pBox, xorg, yorg, pPix); - return; - } - } - - - if(infoRec->NeedToSync) { - (*infoRec->Sync)(infoRec->pScrn); - infoRec->NeedToSync = FALSE; - } - -BAILOUT: - - if(what == PW_BACKGROUND) { - XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBackground); - (*pScreen->PaintWindowBackground) (pWin, prgn, what); - XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBackground, XAAPaintWindow); - } else { - XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBorder); - (*pScreen->PaintWindowBorder) (pWin, prgn, what); - XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBorder, XAAPaintWindow); - } - -} diff --git a/hw/xfree86/xaa/xaaStateChange.c b/hw/xfree86/xaa/xaaStateChange.c index 39ad046c5..443bda628 100644 --- a/hw/xfree86/xaa/xaaStateChange.c +++ b/hw/xfree86/xaa/xaaStateChange.c @@ -259,8 +259,6 @@ typedef struct _XAAStateWrapRec { XAACacheInfoPtr pCache); GetImageProcPtr GetImage; GetSpansProcPtr GetSpans; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; #ifdef RENDER Bool (*SetupForCPUToScreenAlphaTexture2)(ScrnInfoPtr pScrn, int op, @@ -1448,26 +1446,6 @@ static void XAAStateWrapGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr pp pwidth, nspans, pdstStart); } -static void XAAStateWrapPaintWindowBackground(WindowPtr pWindow, RegionPtr pRegion, - int what) -{ - GET_STATEPRIV_SCREEN(pWindow->drawable.pScreen); - STATE_CHECK_SP(pStatePriv); - - (*pStatePriv->PaintWindowBackground)(pWindow, pRegion, - what); -} - -static void XAAStateWrapPaintWindowBorder(WindowPtr pWindow, RegionPtr pRegion, - int what) -{ - GET_STATEPRIV_SCREEN(pWindow->drawable.pScreen); - STATE_CHECK_SP(pStatePriv); - - (*pStatePriv->PaintWindowBorder)(pWindow, pRegion, - what); -} - static void XAAStateWrapCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { @@ -1644,8 +1622,6 @@ XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec) XAA_STATE_WRAP(WriteColor8x8PatternToCache); XAA_STATE_WRAP(GetImage); XAA_STATE_WRAP(GetSpans); - XAA_STATE_WRAP(PaintWindowBackground); - XAA_STATE_WRAP(PaintWindowBorder); XAA_STATE_WRAP(CopyWindow); #ifdef RENDER XAA_STATE_WRAP(SetupForCPUToScreenAlphaTexture2); diff --git a/hw/xfree86/xaa/xaaWrapper.c b/hw/xfree86/xaa/xaaWrapper.c index 642ef8c39..5d6ea05cf 100644 --- a/hw/xfree86/xaa/xaaWrapper.c +++ b/hw/xfree86/xaa/xaaWrapper.c @@ -54,8 +54,6 @@ typedef struct { CreateScreenResourcesProcPtr CreateScreenResources; CreateWindowProcPtr CreateWindow; CopyWindowProcPtr CopyWindow; - PaintWindowProcPtr PaintWindowBackground; - PaintWindowProcPtr PaintWindowBorder; WindowExposuresProcPtr WindowExposures; CreateGCProcPtr CreateGC; CreateColormapProcPtr CreateColormap; @@ -73,8 +71,6 @@ typedef struct { CreateScreenResourcesProcPtr wrapCreateScreenResources; CreateWindowProcPtr wrapCreateWindow; CopyWindowProcPtr wrapCopyWindow; - PaintWindowProcPtr wrapPaintWindowBackground; - PaintWindowProcPtr wrapPaintWindowBorder; WindowExposuresProcPtr wrapWindowExposures; CreateGCProcPtr wrapCreateGC; CreateColormapProcPtr wrapCreateColormap; @@ -205,33 +201,6 @@ xaaWrapperWindowExposures (WindowPtr pWin, WindowExposures, wrapWindowExposures, xaaWrapperWindowExposures); } -static void -xaaWrapperPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) -{ - xaaWrapperScrPriv(pWin->drawable.pScreen); - - switch (what) { - case PW_BORDER: - cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen, - PaintWindowBorder, wrapPaintWindowBorder); - - pWin->drawable.pScreen->PaintWindowBorder (pWin, pRegion, what); - cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen, - PaintWindowBorder, wrapPaintWindowBorder, - xaaWrapperPaintWindow); - break; - case PW_BACKGROUND: - cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen, - PaintWindowBackground, wrapPaintWindowBackground); - - pWin->drawable.pScreen->PaintWindowBackground (pWin, pRegion, what); - cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen, - PaintWindowBackground, wrapPaintWindowBackground, - xaaWrapperPaintWindow); - break; - } -} - static Bool xaaWrapperCreateColormap(ColormapPtr pmap) { @@ -314,8 +283,6 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f get (pScrPriv, pScreen, CreateScreenResources, wrapCreateScreenResources); get (pScrPriv, pScreen, CreateWindow, wrapCreateWindow); get (pScrPriv, pScreen, CopyWindow, wrapCopyWindow); - get (pScrPriv, pScreen, PaintWindowBorder, wrapPaintWindowBorder); - get (pScrPriv, pScreen, PaintWindowBackground, wrapPaintWindowBackground); get (pScrPriv, pScreen, WindowExposures, wrapWindowExposures); get (pScrPriv, pScreen, CreateGC, wrapCreateGC); get (pScrPriv, pScreen, CreateColormap, wrapCreateColormap); @@ -338,8 +305,6 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f xaaWrapperCreateScreenResources); wrap (pScrPriv, pScreen, CreateWindow, xaaWrapperCreateWindow); wrap (pScrPriv, pScreen, CopyWindow, xaaWrapperCopyWindow); - wrap (pScrPriv, pScreen, PaintWindowBorder, xaaWrapperPaintWindow); - wrap (pScrPriv, pScreen, PaintWindowBackground, xaaWrapperPaintWindow); wrap (pScrPriv, pScreen, WindowExposures, xaaWrapperWindowExposures); wrap (pScrPriv, pScreen, CreateGC, xaaWrapperCreateGC); wrap (pScrPriv, pScreen, CreateColormap, xaaWrapperCreateColormap); diff --git a/hw/xfree86/xaa/xaalocal.h b/hw/xfree86/xaa/xaalocal.h index 1e536c1fa..e25b9df52 100644 --- a/hw/xfree86/xaa/xaalocal.h +++ b/hw/xfree86/xaa/xaalocal.h @@ -45,8 +45,6 @@ typedef struct _XAAScreen { CloseScreenProcPtr CloseScreen; GetImageProcPtr GetImage; GetSpansProcPtr GetSpans; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; WindowExposuresProcPtr WindowExposures; CreatePixmapProcPtr CreatePixmap; @@ -1315,14 +1313,6 @@ XAAWritePixmapToCacheLinear( int bpp, int depth ); - -void -XAAPaintWindow( - WindowPtr pWin, - RegionPtr prgn, - int what -); - void XAASolidHorVertLineAsRects( ScrnInfoPtr pScrn, diff --git a/hw/xfree86/xf1bpp/Makefile.am b/hw/xfree86/xf1bpp/Makefile.am index 4ea7ef0c1..c724f760f 100644 --- a/hw/xfree86/xf1bpp/Makefile.am +++ b/hw/xfree86/xf1bpp/Makefile.am @@ -45,7 +45,6 @@ libxf1bppmfb_a_SOURCES = \ mfbline.c \ mfbmisc.c \ mfbpixmap.c \ - mfbpntwin.c \ mfbpolypnt.c \ mfbpushpxl.c \ mfbscrclse.c \ diff --git a/hw/xfree86/xf1bpp/mfbmap.h b/hw/xfree86/xf1bpp/mfbmap.h index 5825c1cf4..e330ebd5b 100644 --- a/hw/xfree86/xf1bpp/mfbmap.h +++ b/hw/xfree86/xf1bpp/mfbmap.h @@ -61,7 +61,6 @@ #define mfbListInstalledColormaps xf1bppListInstalledColormaps #define mfbMapWindow xf1bppMapWindow #define mfbPadPixmap xf1bppPadPixmap -#define mfbPaintWindow xf1bppPaintWindow #define mfbPixmapToRegion xf1bppPixmapToRegion #define mfbPixmapToRegionWeak xf1bppPixmapToRegionWeak #define mfbPolyFillArcSolid xf1bppPolyFillArcSolid diff --git a/hw/xfree86/xf1bpp/mfbunmap.h b/hw/xfree86/xf1bpp/mfbunmap.h index 16237a163..56b734bcd 100644 --- a/hw/xfree86/xf1bpp/mfbunmap.h +++ b/hw/xfree86/xf1bpp/mfbunmap.h @@ -53,7 +53,6 @@ #undef mfbListInstalledColormaps #undef mfbMapWindow #undef mfbPadPixmap -#undef mfbPaintWindow #undef mfbPixmapToRegion #undef mfbPixmapToRegionWeak #undef mfbPolyFillArcSolid diff --git a/hw/xfree86/xf4bpp/Makefile.am b/hw/xfree86/xf4bpp/Makefile.am index 8665b2a6b..1414a0d0f 100644 --- a/hw/xfree86/xf4bpp/Makefile.am +++ b/hw/xfree86/xf4bpp/Makefile.am @@ -17,7 +17,6 @@ libxf4bpp_la_SOURCES = \ ppcGetSp.c \ ppcImg.c \ ppcPixmap.c \ - ppcPntWin.c \ ppcPolyPnt.c \ ppcQuery.c \ ppcRslvC.c \ diff --git a/hw/xfree86/xf4bpp/ppcGC.c b/hw/xfree86/xf4bpp/ppcGC.c index ca3c5e984..7ef312d39 100644 --- a/hw/xfree86/xf4bpp/ppcGC.c +++ b/hw/xfree86/xf4bpp/ppcGC.c @@ -176,8 +176,7 @@ register GCPtr pGC ; pGC->fExpose = TRUE; pGC->freeCompClip = FALSE; - pGC->pRotatedPixmap = NullPixmap; - + /* GJA: I don't like this code: * they allocated a mfbPrivGC, ignore the allocated data and place * a pointer to a ppcPrivGC in its slot. @@ -200,12 +199,6 @@ xf4bppDestroyGC( pGC ) { TRACE( ( "xf4bppDestroyGC(pGC=0x%x)\n", pGC ) ) ; - /* (ef) 11/9/87 -- ppc doesn't use rotated tile or stipple, but */ - /* *does* call mfbValidateGC under some conditions. */ - /* mfbValidateGC *does* use rotated tile and stipple */ - if ( pGC->pRotatedPixmap ) - mfbDestroyPixmap( pGC->pRotatedPixmap ) ; - if ( pGC->freeCompClip && pGC->pCompositeClip ) REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); if(pGC->ops->devPrivate.val) xfree( pGC->ops ); diff --git a/hw/xfree86/xf4bpp/ppcIO.c b/hw/xfree86/xf4bpp/ppcIO.c index bd20218d3..313fcb0f8 100644 --- a/hw/xfree86/xf4bpp/ppcIO.c +++ b/hw/xfree86/xf4bpp/ppcIO.c @@ -205,8 +205,6 @@ xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width ) pScreen-> CreateWindow = xf4bppCreateWindowForXYhardware; pScreen-> DestroyWindow = xf4bppDestroyWindow; pScreen-> PositionWindow = xf4bppPositionWindow; - pScreen-> PaintWindowBackground = xf4bppPaintWindow; - pScreen-> PaintWindowBorder = xf4bppPaintWindow; pScreen-> CopyWindow = xf4bppCopyWindow; pScreen-> CreatePixmap = xf4bppCreatePixmap; pScreen-> CreateGC = xf4bppCreateGC; @@ -219,7 +217,7 @@ xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width ) pScreen-> ResolveColor = xf4bppResolveColor; mfbFillInScreen(pScreen); - if (!mfbAllocatePrivates(pScreen, NULL, NULL)) + if (!mfbAllocatePrivates(pScreen, NULL)) return FALSE; if (!miScreenInit(pScreen, pbits, virtx, virty, dpix, dpiy, width, diff --git a/hw/xfree86/xf4bpp/ppcPntWin.c b/hw/xfree86/xf4bpp/ppcPntWin.c deleted file mode 100644 index 482b34b5d..000000000 --- a/hw/xfree86/xf4bpp/ppcPntWin.c +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE 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 -X CONSORTIUM 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. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include "xf4bpp.h" -#include "mfbmap.h" -#include "mfb.h" -#include "mi.h" -#include "scrnintstr.h" -#include "ibmTrace.h" - -/* NOTE: These functions only work for visuals up to 31-bits deep */ -static void xf4bppPaintWindowSolid( - WindowPtr, - RegionPtr, - int -); -static void xf4bppPaintWindowTile( - WindowPtr, - RegionPtr, - int -); - -void -xf4bppPaintWindow(pWin, pRegion, what) - WindowPtr pWin; - RegionPtr pRegion; - int what; -{ - - register mfbPrivWin *pPrivWin; - pPrivWin = (mfbPrivWin *)dixLookupPrivate(&pWin->devPrivates, mfbGetWindowPrivateKey()); - - TRACE(("xf4bppPaintWindow( pWin= 0x%x, pRegion= 0x%x, what= %d )\n", - pWin,pRegion,what)); - - switch (what) { - case PW_BACKGROUND: - switch (pWin->backgroundState) { - case None: - return; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, - what); - return; - case BackgroundPixmap: - if (pPrivWin->fastBackground) - { - xf4bppPaintWindowTile(pWin, pRegion, what); - return; - } - break; - case BackgroundPixel: - xf4bppPaintWindowSolid(pWin, pRegion, what); - return; - } - break; - case PW_BORDER: - if (pWin->borderIsPixel) - { - xf4bppPaintWindowSolid(pWin, pRegion, what); - return; - } - else if (pPrivWin->fastBorder) - { - xf4bppPaintWindowTile(pWin, pRegion, what); - return; - } - break; - } - miPaintWindow(pWin, pRegion, what); -} - -static void -xf4bppPaintWindowSolid(pWin, pRegion, what) - register WindowPtr pWin; - register RegionPtr pRegion; - int what; -{ - register int nbox; - register BoxPtr pbox; - register unsigned long int pixel; - register unsigned long int pm ; - - TRACE(("xf4bppPaintWindowSolid(pWin= 0x%x, pRegion= 0x%x, what= %d)\n", pWin, pRegion, what)); - - if ( !( nbox = REGION_NUM_RECTS(pRegion))) - return ; - pbox = REGION_RECTS(pRegion); - - if (what == PW_BACKGROUND) - pixel = pWin->background.pixel; - else - pixel = pWin->border.pixel; - - pm = ( 1 << pWin->drawable.depth ) - 1 ; - for ( ; nbox-- ; pbox++ ) { - /* - * call fill routine, the parms are: - * fill(color, alu, planes, x, y, width, height); - */ - xf4bppFillSolid( pWin, pixel, GXcopy, pm, pbox->x1, pbox->y1, - pbox->x2 - pbox->x1, pbox->y2 - pbox->y1 ) ; - } - return ; -} - -static void -xf4bppPaintWindowTile(pWin, pRegion, what) - register WindowPtr pWin; - register RegionPtr pRegion; - int what; -{ - register int nbox; - register BoxPtr pbox; - register PixmapPtr pTile; - register unsigned long int pm ; - - TRACE(("xf4bppPaintWindowTile(pWin= 0x%x, pRegion= 0x%x, what= %d)\n", pWin, pRegion, what)); - - if ( !( nbox = REGION_NUM_RECTS(pRegion))) - return ; - pbox = REGION_RECTS(pRegion); - - if (what == PW_BACKGROUND) - pTile = pWin->background.pixmap; - else - pTile = pWin->border.pixmap; - - pm = ( 1 << pWin->drawable.depth ) - 1 ; - for ( ; nbox-- ; pbox++ ) { - /* - * call tile routine, the parms are: - * tile(tile, alu, planes, x, y, width, height,xSrc,ySrc); - */ - xf4bppTileRect(pWin, pTile, GXcopy, pm, - pbox->x1, pbox->y1, - pbox->x2 - pbox->x1, pbox->y2 - pbox->y1, - pWin->drawable.x, pWin->drawable.y ); - } - return ; -} diff --git a/hw/xfree86/xf4bpp/ppcWindow.c b/hw/xfree86/xf4bpp/ppcWindow.c index 055466738..8261af183 100644 --- a/hw/xfree86/xf4bpp/ppcWindow.c +++ b/hw/xfree86/xf4bpp/ppcWindow.c @@ -214,15 +214,7 @@ Bool xf4bppCreateWindowForXYhardware(pWin) register WindowPtr pWin ; { - register mfbPrivWin *pPrivWin; - TRACE(("xf4bppCreateWindowForXYhardware (pWin= 0x%x)\n", pWin)); - pPrivWin = (mfbPrivWin *)dixLookupPrivate(&pWin->devPrivates, mfbGetWindowPrivateKey()); - pPrivWin->pRotatedBorder = NullPixmap; - pPrivWin->pRotatedBackground = NullPixmap; - pPrivWin->fastBackground = 0; - pPrivWin->fastBorder = 0; - return TRUE; } diff --git a/hw/xfree86/xf4bpp/xf4bpp.h b/hw/xfree86/xf4bpp/xf4bpp.h index 5d5dcdd9f..e7e3721f7 100644 --- a/hw/xfree86/xf4bpp/xf4bpp.h +++ b/hw/xfree86/xf4bpp/xf4bpp.h @@ -189,13 +189,6 @@ PixmapPtr xf4bppCopyPixmap( PixmapPtr ); -/* ppcPntWin.c */ -void xf4bppPaintWindow( - WindowPtr, - RegionPtr, - int -); - /* ppcPolyPnt.c */ void xf4bppPolyPoint( DrawablePtr, diff --git a/hw/xfree86/xf8_32bpp/cfb8_32.h b/hw/xfree86/xf8_32bpp/cfb8_32.h index 281e5f2e0..6e985da20 100644 --- a/hw/xfree86/xf8_32bpp/cfb8_32.h +++ b/hw/xfree86/xf8_32bpp/cfb8_32.h @@ -109,13 +109,6 @@ cfb8_32GetImage ( char *pdstLine ); -void -cfb8_32PaintWindow ( - WindowPtr pWin, - RegionPtr pRegion, - int what -); - Bool cfb8_32ScreenInit ( ScreenPtr pScreen, @@ -133,15 +126,6 @@ cfb8_32FillBoxSolid8 ( unsigned long color ); - -void -cfb8_32FillBoxSolid32 ( - DrawablePtr pDraw, - int nbox, - BoxPtr pBox, - unsigned long color -); - RegionPtr cfb8_32CopyPlane( DrawablePtr pSrc, diff --git a/hw/xfree86/xf8_32bpp/cfbpntwin.c b/hw/xfree86/xf8_32bpp/cfbpntwin.c index a1b988716..fbf597d22 100644 --- a/hw/xfree86/xf8_32bpp/cfbpntwin.c +++ b/hw/xfree86/xf8_32bpp/cfbpntwin.c @@ -23,97 +23,6 @@ #endif void -cfb8_32PaintWindow( - WindowPtr pWin, - RegionPtr pRegion, - int what -){ - WindowPtr pBgWin; - int xorg, yorg; - - switch (what) { - case PW_BACKGROUND: - switch (pWin->backgroundState) { - case None: - break; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)( - pWin, pRegion, what); - break; - case BackgroundPixmap: - xorg = pWin->drawable.x; - yorg = pWin->drawable.y; -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - int index = pWin->drawable.pScreen->myNum; - if(WindowTable[index] == pWin) { - xorg -= panoramiXdataPtr[index].x; - yorg -= panoramiXdataPtr[index].y; - } - } -#endif - cfb32FillBoxTileOddGeneral ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), REGION_RECTS(pRegion), - pWin->background.pixmap, xorg, yorg, GXcopy, - (pWin->drawable.depth == 24) ? 0x00ffffff : 0xff000000); - break; - case BackgroundPixel: - if(pWin->drawable.depth == 24) - cfb8_32FillBoxSolid32 ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->background.pixel); - else - cfb8_32FillBoxSolid8 ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->background.pixel); - break; - } - break; - case PW_BORDER: - if (pWin->borderIsPixel) { - if(pWin->drawable.depth == 24) { - cfb8_32FillBoxSolid32 ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->border.pixel); - } else - cfb8_32FillBoxSolid8 ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->border.pixel); - } else { - for (pBgWin = pWin; - pBgWin->backgroundState == ParentRelative; - pBgWin = pBgWin->parent); - - xorg = pBgWin->drawable.x; - yorg = pBgWin->drawable.y; - -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - int index = pWin->drawable.pScreen->myNum; - if(WindowTable[index] == pBgWin) { - xorg -= panoramiXdataPtr[index].x; - yorg -= panoramiXdataPtr[index].y; - } - } -#endif - cfb32FillBoxTileOddGeneral ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), REGION_RECTS(pRegion), - pWin->border.pixmap, xorg, yorg, GXcopy, - (pWin->drawable.depth == 24) ? 0x00ffffff : 0xff000000); - } - break; - } - -} - -void cfb8_32FillBoxSolid8( DrawablePtr pDraw, int nbox, @@ -140,41 +49,3 @@ cfb8_32FillBoxSolid8( pbox++; } } - - -void -cfb8_32FillBoxSolid32( - DrawablePtr pDraw, - int nbox, - BoxPtr pbox, - unsigned long color -){ - CARD8 *ptr, *data; - CARD16 *ptr2, *data2; - int pitch, pitch2; - int height, width, i; - CARD8 c = (CARD8)(color >> 16); - CARD16 c2 = (CARD16)color; - - cfbGetByteWidthAndPointer(pDraw, pitch, ptr); - cfbGetTypedWidthAndPointer(pDraw, pitch2, ptr2, CARD16, CARD16); - ptr += 2; /* point to the third byte */ - - while(nbox--) { - data = ptr + (pbox->y1 * pitch) + (pbox->x1 << 2); - data2 = ptr2 + (pbox->y1 * pitch2) + (pbox->x1 << 1); - width = (pbox->x2 - pbox->x1) << 1; - height = pbox->y2 - pbox->y1; - - while(height--) { - for(i = 0; i < width; i+=2) { - data[i << 1] = c; - data2[i] = c2; - } - data += pitch; - data2 += pitch2; - } - pbox++; - } -} - diff --git a/hw/xfree86/xf8_32bpp/cfbscrinit.c b/hw/xfree86/xf8_32bpp/cfbscrinit.c index fffd8d392..c3432b803 100644 --- a/hw/xfree86/xf8_32bpp/cfbscrinit.c +++ b/hw/xfree86/xf8_32bpp/cfbscrinit.c @@ -55,11 +55,7 @@ cfb8_32AllocatePrivates(ScreenPtr pScreen) /* All cfb will have the same GC and Window private indicies */ - if(!mfbAllocatePrivates(pScreen, &cfbWindowPrivateKey, &cfbGCPrivateKey)) - return FALSE; - - /* The cfb indicies are the mfb indicies. Reallocating them resizes them */ - if(!dixRequestPrivate(cfbWindowPrivateKey, sizeof(cfbPrivWin))) + if(!mfbAllocatePrivates(pScreen, &cfbGCPrivateKey)) return FALSE; if(!dixRequestPrivate(cfbGCPrivateKey, sizeof(cfbPrivGC))) @@ -108,8 +104,6 @@ cfb8_32SetupScreen( pScreen->ChangeWindowAttributes = cfb8_32ChangeWindowAttributes; pScreen->RealizeWindow = cfb32MapWindow; /* OK */ pScreen->UnrealizeWindow = cfb32UnmapWindow; /* OK */ - pScreen->PaintWindowBackground = cfb8_32PaintWindow; - pScreen->PaintWindowBorder = cfb8_32PaintWindow; pScreen->CopyWindow = cfb8_32CopyWindow; pScreen->CreatePixmap = cfb32CreatePixmap; /* OK */ pScreen->DestroyPixmap = cfb32DestroyPixmap; /* OK */ diff --git a/hw/xfree86/xf8_32bpp/cfbwindow.c b/hw/xfree86/xf8_32bpp/cfbwindow.c index ce741cb55..787cbdec6 100644 --- a/hw/xfree86/xf8_32bpp/cfbwindow.c +++ b/hw/xfree86/xf8_32bpp/cfbwindow.c @@ -27,11 +27,6 @@ Bool cfb8_32CreateWindow(WindowPtr pWin) { - cfbPrivWin *pPrivWin = cfbGetWindowPrivate(pWin); - - pPrivWin->fastBackground = FALSE; - pPrivWin->fastBorder = FALSE; - pWin->drawable.bitsPerPixel = 32; return TRUE; } diff --git a/hw/xfree86/xf8_32bpp/xf86overlay.c b/hw/xfree86/xf8_32bpp/xf86overlay.c index bab014b8c..700c71ada 100644 --- a/hw/xfree86/xf8_32bpp/xf86overlay.c +++ b/hw/xfree86/xf8_32bpp/xf86overlay.c @@ -34,7 +34,6 @@ static Bool OverlayCreateGC(GCPtr pGC); static Bool OverlayDestroyPixmap(PixmapPtr); static PixmapPtr OverlayCreatePixmap(ScreenPtr, int, int, int); static Bool OverlayChangeWindowAttributes(WindowPtr, unsigned long); -static void OverlayPaintWindow(WindowPtr, RegionPtr, int); /** Funcs **/ static void OverlayValidateGC(GCPtr, unsigned long, DrawablePtr); @@ -159,8 +158,6 @@ typedef struct { CreatePixmapProcPtr CreatePixmap; DestroyPixmapProcPtr DestroyPixmap; ChangeWindowAttributesProcPtr ChangeWindowAttributes; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; int LockPrivate; } OverlayScreenRec, *OverlayScreenPtr; @@ -273,16 +270,12 @@ xf86Overlay8Plus32Init (ScreenPtr pScreen) pScreenPriv->CreatePixmap = pScreen->CreatePixmap; pScreenPriv->DestroyPixmap = pScreen->DestroyPixmap; pScreenPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes; - pScreenPriv->PaintWindowBackground = pScreen->PaintWindowBackground; - pScreenPriv->PaintWindowBorder = pScreen->PaintWindowBorder; pScreen->CreateGC = OverlayCreateGC; pScreen->CloseScreen = OverlayCloseScreen; pScreen->CreatePixmap = OverlayCreatePixmap; pScreen->DestroyPixmap = OverlayDestroyPixmap; pScreen->ChangeWindowAttributes = OverlayChangeWindowAttributes; - pScreen->PaintWindowBackground = OverlayPaintWindow; - pScreen->PaintWindowBorder = OverlayPaintWindow; pScreenPriv->LockPrivate = 0; @@ -391,8 +384,6 @@ OverlayCloseScreen (int i, ScreenPtr pScreen) pScreen->CreatePixmap = pScreenPriv->CreatePixmap; pScreen->DestroyPixmap = pScreenPriv->DestroyPixmap; pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes; - pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground; - pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder; xfree ((pointer) pScreenPriv); @@ -424,62 +415,6 @@ OverlayChangeWindowAttributes (WindowPtr pWin, unsigned long mask) return result; } -static void -OverlayPaintWindow( - WindowPtr pWin, - RegionPtr pReg, - int what -){ - ScreenPtr pScreen = pWin->drawable.pScreen; - OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); - OverlayPixmapPtr pixPriv; - PixmapPtr oldPix = NULL; - - if(what == PW_BACKGROUND) { - if(pWin->drawable.depth == 8) { - if(pWin->backgroundState == ParentRelative) { - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - } - - if(pWin->backgroundState == BackgroundPixmap) { - oldPix = pWin->background.pixmap; - pixPriv = OVERLAY_GET_PIXMAP_PRIVATE(oldPix); - /* have to do this here because alot of applications - incorrectly assume changes to a pixmap that is - a window background go into effect immediatedly */ - if(pixPriv->dirty & IS_DIRTY) - OverlayRefreshPixmap(pWin->background.pixmap); - pWin->background.pixmap = pixPriv->pix32; - } - } - - pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground; - (*pScreen->PaintWindowBackground) (pWin, pReg, what); - pScreen->PaintWindowBackground = OverlayPaintWindow; - - if(oldPix) - pWin->background.pixmap = oldPix; - } else { - if((pWin->drawable.depth == 8) && !pWin->borderIsPixel) { - oldPix = pWin->border.pixmap; - pixPriv = OVERLAY_GET_PIXMAP_PRIVATE(oldPix); - if(pixPriv->dirty & IS_DIRTY) - OverlayRefreshPixmap(pWin->border.pixmap); - pWin->border.pixmap = pixPriv->pix32; - } - - pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder; - (*pScreen->PaintWindowBorder) (pWin, pReg, what); - pScreen->PaintWindowBorder = OverlayPaintWindow; - - if(oldPix) - pWin->border.pixmap = oldPix; - } -} - - /*********************** GC Funcs *****************************/ diff --git a/hw/xgl/Makefile.am b/hw/xgl/Makefile.am index 81484b99a..ef9fc0ea9 100644 --- a/hw/xgl/Makefile.am +++ b/hw/xgl/Makefile.am @@ -70,12 +70,14 @@ Xgl_SOURCES = \ $(top_srcdir)/Xext/dpmsstubs.c \ $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/fb/fbcmap.c -Xgl_LDADD = \ + +XGL_LIBS = \ libxgl.a \ - $(XORG_CORE_LIBS) \ - $(XGL_LIBS) \ - $(XSERVER_LIBS) \ - $(EXTENSION_LIBS) -lglitz -ldl + @XGL_LIBS@ \ + $(XSERVER_LIBS) + +Xgl_DEPENDENCIES = $(XGL_LIBS) +Xgl_LDADD = $(XGL_LIBS) $(XSERVER_SYS_LIBS) $(XGL_SYS_LIBS) Xgl_programs = Xgl bin_PROGRAMS = $(Xgl_programs) diff --git a/hw/xgl/egl/Makefile.am b/hw/xgl/egl/Makefile.am index 5136e58b1..8c4e9af75 100644 --- a/hw/xgl/egl/Makefile.am +++ b/hw/xgl/egl/Makefile.am @@ -24,7 +24,12 @@ libxegl_la_SOURCES = \ kinput.c \ evdev.c -Xegl_DEPENDENCIES = @XEGL_LIBS@ +XEGL_LIBS = \ + @XEGL_LIBS@ \ + libxegl.la \ + ../libxgl.a \ + $XSERVER_LIBS + Xegl_LDFLAGS = -export-dynamic Xegl_SOURCES = \ xeglinit.c \ @@ -32,14 +37,8 @@ Xegl_SOURCES = \ $(top_srcdir)/Xext/dpmsstubs.c \ $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/fb/fbcmap.c -Xegl_LDADD = \ - libxegl.la \ - ../libxgl.a \ - $(XORG_CORE_LIBS) \ - $(XEGL_LIBS) \ - $(XSERVER_LIBS) \ - $(EXTENSION_LIBS) \ - $(XGLXMODULES_LIBS) -Xegl_programs = Xegl - -bin_PROGRAMS = $(Xegl_programs) + +Xegl_DEPENDENCIES = $(XEGL_LIBS) +Xegl_LDADD = $(XEGL_LIBS) $(XSERVER_SYS_LIBS) $(XEGL_SYS_LIBS) + +bin_PROGRAMS = Xegl diff --git a/hw/xgl/glx/xglx.c b/hw/xgl/glx/xglx.c index d7f0ed3f9..89bd72e41 100644 --- a/hw/xgl/glx/xglx.c +++ b/hw/xgl/glx/xglx.c @@ -917,7 +917,7 @@ xglxWindowExposures (WindowPtr pWin, REGION_SUBTRACT (pScreen, &ClipList, &pWin->borderClip, &pWin->winSize); REGION_INTERSECT (pScreen, &ClipList, &ClipList, (RegionPtr) pReg); - (*pScreen->PaintWindowBorder) (pWin, &ClipList, PW_BORDER); + miPaintWindow(pWin, &ClipList, PW_BORDER); REGION_UNINIT (pScreen, &ClipList); } diff --git a/hw/xgl/xgl.h b/hw/xgl/xgl.h index ea28ea11d..46747a217 100644 --- a/hw/xgl/xgl.h +++ b/hw/xgl/xgl.h @@ -273,8 +273,6 @@ typedef struct _xglScreen { CreateWindowProcPtr CreateWindow; DestroyWindowProcPtr DestroyWindow; ChangeWindowAttributesProcPtr ChangeWindowAttributes; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; CreateGCProcPtr CreateGC; CloseScreenProcPtr CloseScreen; @@ -1091,16 +1089,6 @@ xglCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); -void -xglPaintWindowBackground (WindowPtr pWin, - RegionPtr pRegion, - int what); - -void -xglPaintWindowBorder (WindowPtr pWin, - RegionPtr pRegion, - int what); - PixmapPtr xglGetWindowPixmap (WindowPtr pWin); diff --git a/hw/xgl/xglscreen.c b/hw/xgl/xglscreen.c index e46869770..9b7297b91 100644 --- a/hw/xgl/xglscreen.c +++ b/hw/xgl/xglscreen.c @@ -210,8 +210,6 @@ xglScreenInit (ScreenPtr pScreen) XGL_SCREEN_WRAP (CreateWindow, xglCreateWindow); XGL_SCREEN_WRAP (DestroyWindow, xglDestroyWindow); XGL_SCREEN_WRAP (ChangeWindowAttributes, xglChangeWindowAttributes); - XGL_SCREEN_WRAP (PaintWindowBackground, xglPaintWindowBackground); - XGL_SCREEN_WRAP (PaintWindowBorder, xglPaintWindowBorder); XGL_SCREEN_WRAP (CreateGC, xglCreateGC); diff --git a/hw/xgl/xglwindow.c b/hw/xgl/xglwindow.c index 967d10f77..393f01df1 100644 --- a/hw/xgl/xglwindow.c +++ b/hw/xgl/xglwindow.c @@ -141,181 +141,6 @@ xglCopyWindow (WindowPtr pWin, REGION_UNINIT (pWin->drawable.pScreen, &rgnDst); } -static Bool -xglFillRegionSolid (DrawablePtr pDrawable, - RegionPtr pRegion, - Pixel pixel) -{ - glitz_pixel_format_t format; - glitz_surface_t *solid; - glitz_buffer_t *buffer; - BoxPtr pExtent; - Bool ret; - - XGL_DRAWABLE_PIXMAP_PRIV (pDrawable); - XGL_SCREEN_PRIV (pDrawable->pScreen); - - if (!xglPrepareTarget (pDrawable)) - return FALSE; - - solid = glitz_surface_create (pScreenPriv->drawable, - pPixmapPriv->pVisual->format.surface, - 1, 1, 0, NULL); - if (!solid) - return FALSE; - - glitz_surface_set_fill (solid, GLITZ_FILL_REPEAT); - - format.fourcc = GLITZ_FOURCC_RGB; - format.masks = pPixmapPriv->pVisual->pPixel->masks; - format.xoffset = 0; - format.skip_lines = 0; - format.bytes_per_line = sizeof (CARD32); - format.scanline_order = GLITZ_PIXEL_SCANLINE_ORDER_BOTTOM_UP; - - buffer = glitz_buffer_create_for_data (&pixel); - - glitz_set_pixels (solid, 0, 0, 1, 1, &format, buffer); - - glitz_buffer_destroy (buffer); - - pExtent = REGION_EXTENTS (pDrawable->pScreen, pRegion); - - ret = xglSolid (pDrawable, - GLITZ_OPERATOR_SRC, - solid, - NULL, - pExtent->x1, pExtent->y1, - pExtent->x2 - pExtent->x1, pExtent->y2 - pExtent->y1, - REGION_RECTS (pRegion), - REGION_NUM_RECTS (pRegion)); - - glitz_surface_destroy (solid); - - return ret; -} - -static Bool -xglFillRegionTiled (DrawablePtr pDrawable, - RegionPtr pRegion, - PixmapPtr pTile, - int tileX, - int tileY) -{ - BoxPtr pExtent; - - pExtent = REGION_EXTENTS (pDrawable->pScreen, pRegion); - - if (xglTile (pDrawable, - GLITZ_OPERATOR_SRC, - pTile, - tileX, tileY, - NULL, - pExtent->x1, pExtent->y1, - pExtent->x2 - pExtent->x1, pExtent->y2 - pExtent->y1, - REGION_RECTS (pRegion), - REGION_NUM_RECTS (pRegion))) - return TRUE; - - return FALSE; -} - -void -xglPaintWindowBackground (WindowPtr pWin, - RegionPtr pRegion, - int what) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - XGL_SCREEN_PRIV (pScreen); - - switch (pWin->backgroundState) { - case None: - return; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - - (*pScreen->PaintWindowBackground) (pWin, pRegion, what); - return; - case BackgroundPixmap: - if (xglFillRegionTiled (&pWin->drawable, - pRegion, - pWin->background.pixmap, - -pWin->drawable.x, - -pWin->drawable.y)) - { - xglAddCurrentBitDamage (&pWin->drawable); - return; - } - - if (!xglSyncBits (&pWin->background.pixmap->drawable, NullBox)) - FatalError (XGL_SW_FAILURE_STRING); - break; - case BackgroundPixel: - if (xglFillRegionSolid (&pWin->drawable, - pRegion, - pWin->background.pixel)) - { - xglAddCurrentBitDamage (&pWin->drawable); - return; - } - break; - } - - XGL_WINDOW_FALLBACK_PROLOGUE (pWin, PaintWindowBackground); - (*pScreen->PaintWindowBackground) (pWin, pRegion, what); - XGL_WINDOW_FALLBACK_EPILOGUE (pWin, pRegion, PaintWindowBackground, - xglPaintWindowBackground); -} - -void -xglPaintWindowBorder (WindowPtr pWin, - RegionPtr pRegion, - int what) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - XGL_SCREEN_PRIV (pScreen); - - if (pWin->borderIsPixel) - { - if (xglFillRegionSolid (&pWin->drawable, - pRegion, - pWin->border.pixel)) - { - xglAddCurrentBitDamage (&pWin->drawable); - return; - } - } - else - { - WindowPtr pBgWin = pWin; - - while (pBgWin->backgroundState == ParentRelative) - pBgWin = pBgWin->parent; - - if (xglFillRegionTiled (&pBgWin->drawable, - pRegion, - pWin->border.pixmap, - -pBgWin->drawable.x, - -pBgWin->drawable.y)) - { - xglAddCurrentBitDamage (&pWin->drawable); - return; - } - - if (!xglSyncBits (&pWin->border.pixmap->drawable, NullBox)) - FatalError (XGL_SW_FAILURE_STRING); - } - - XGL_WINDOW_FALLBACK_PROLOGUE (pWin, PaintWindowBorder); - (*pScreen->PaintWindowBorder) (pWin, pRegion, what); - XGL_WINDOW_FALLBACK_EPILOGUE (pWin, pRegion, PaintWindowBorder, - xglPaintWindowBorder); -} - PixmapPtr xglGetWindowPixmap (WindowPtr pWin) { diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am index 99dba60bd..92f840c97 100644 --- a/hw/xnest/Makefile.am +++ b/hw/xnest/Makefile.am @@ -48,12 +48,15 @@ SRCS = Args.c \ libfbcmap_a_SOURCES = $(top_srcdir)/fb/fbcmap_mi.c libfbcmap_a_CFLAGS = $(AM_CFLAGS) +XNEST_LIBS = \ + @XNEST_LIBS@ \ + libfbcmap.a \ + $(XSERVER_LIBS) + Xnest_SOURCES = $(SRCS) -Xnest_LDADD = $(XORG_CORE_LIBS) \ - $(XNEST_LIBS) \ - $(XNESTMODULES_LIBS) \ - libfbcmap.a +Xnest_DEPENDENCIES = $(XNEST_LIBS) +Xnest_LDADD = $(XNEST_LIBS) $(XNEST_SYS_LIBS) $(XSERVER_SYS_LIBS) EXTRA_DIST = icon \ screensaver \ diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index f91454928..83590bced 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -284,8 +284,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) pScreen->UnrealizeWindow = xnestUnrealizeWindow; pScreen->PostValidateTree = NULL; pScreen->WindowExposures = xnestWindowExposures; - pScreen->PaintWindowBackground = xnestPaintWindowBackground; - pScreen->PaintWindowBorder = xnestPaintWindowBorder; pScreen->CopyWindow = xnestCopyWindow; pScreen->ClipNotify = xnestClipNotify; diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index 0955e61b9..bc9d8bed2 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -379,30 +379,6 @@ xnestUnrealizeWindow(WindowPtr pWin) } void -xnestPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) -{ - int i; - BoxPtr pBox; - - xnestConfigureWindow(pWin, CWWidth | CWHeight); - - pBox = REGION_RECTS(pRegion); - for (i = 0; i < REGION_NUM_RECTS(pRegion); i++) - XClearArea(xnestDisplay, xnestWindow(pWin), - pBox[i].x1 - pWin->drawable.x, - pBox[i].y1 - pWin->drawable.y, - pBox[i].x2 - pBox[i].x1, - pBox[i].y2 - pBox[i].y1, - False); -} - -void -xnestPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) -{ - xnestConfigureWindow(pWin, CWBorderWidth); -} - -void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion) { } diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h index 1aaf4e153..4cb66c8ce 100644 --- a/hw/xnest/XNWindow.h +++ b/hw/xnest/XNWindow.h @@ -64,8 +64,6 @@ void xnestConfigureWindow(WindowPtr pWin, unsigned int mask); Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask); Bool xnestRealizeWindow(WindowPtr pWin); Bool xnestUnrealizeWindow(WindowPtr pWin); -void xnestPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what); -void xnestPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what); void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); void xnestClipNotify(WindowPtr pWin, int dx, int dy); void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, diff --git a/hw/xprint/Makefile.am b/hw/xprint/Makefile.am index dc8764a02..c440473a0 100644 --- a/hw/xprint/Makefile.am +++ b/hw/xprint/Makefile.am @@ -9,10 +9,22 @@ Xprt_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ \ -DXFree86Server Xprt_LDFLAGS = -L$(top_srcdir) -Xprt_LDADD = @XPRINT_LIBS@ ps/libps.la raster/libraster.la \ - pcl/libpcl.la pcl-mono/libpcl.la $(top_builddir)/fb/libfb.la \ - $(top_builddir)/render/librender.la $(top_builddir)/mi/libmi.la \ - $(top_builddir)/Xext/libXext.la @FREETYPE_LIBS@ +XPRINT_LIBS = \ + @XPRINT_LIBS@ \ + ps/libps.la \ + raster/libraster.la \ + pcl/libpcl.la \ + pcl-mono/libpcl.la \ + $(top_builddir)/fb/libfb.la \ + $(top_builddir)/render/librender.la \ + $(XSERVER_LIBS) \ + $(top_builddir)/Xext/libXext.la \ + $(top_builddir)/xkb/libxkb.la \ + $(top_builddir)/xkb/libxkbstubs.la \ + $(top_builddir)/os/libos.la # for Xprintf + +Xprt_DEPENDENCIES = $(XPRINT_LIBS) +Xprt_LDADD = $(XPRINT_LIBS) $(XPRINT_SYS_LIBS) $(XSERVER_SYS_LIBS) miinitext-wrapper.c: echo "#include \"$(top_srcdir)/mi/miinitext.c\"" >> $@ diff --git a/hw/xprint/ddxInit.c b/hw/xprint/ddxInit.c index a465c4c6d..1e7652e60 100644 --- a/hw/xprint/ddxInit.c +++ b/hw/xprint/ddxInit.c @@ -310,6 +310,17 @@ ChangeDeviceControl ( return BadMatch; } +int +NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev) +{ + return BadValue; +} + +void +DeleteInputDeviceRequest(DeviceIntPtr dev) +{ +} + void OpenInputDevice ( DeviceIntPtr dev, diff --git a/hw/xprint/pcl/Pcl.h b/hw/xprint/pcl/Pcl.h index 216353be8..d46a03401 100644 --- a/hw/xprint/pcl/Pcl.h +++ b/hw/xprint/pcl/Pcl.h @@ -568,10 +568,6 @@ extern void PclCopyWindow( extern Bool PclChangeWindowAttributes( register WindowPtr pWin, register unsigned long mask); -extern void PclPaintWindow( - WindowPtr pWin, - RegionPtr pRegion, - int what); /****** * Functions in PclFonts.c diff --git a/hw/xprint/pcl/PclInit.c b/hw/xprint/pcl/PclInit.c index 478a34244..e738e3e54 100644 --- a/hw/xprint/pcl/PclInit.c +++ b/hw/xprint/pcl/PclInit.c @@ -202,8 +202,6 @@ InitializePclDriver( pScreen->RealizeWindow = PclMapWindow; pScreen->UnrealizeWindow = PclUnmapWindow; */ - pScreen->PaintWindowBackground = PclPaintWindow; - pScreen->PaintWindowBorder = PclPaintWindow; pScreen->CopyWindow = PclCopyWindow; /* XXX Hard routine to write! */ pScreen->CreatePixmap = fbCreatePixmap; diff --git a/hw/xprint/pcl/PclWindow.c b/hw/xprint/pcl/PclWindow.c index 997cfe4f0..a87dc0e7a 100644 --- a/hw/xprint/pcl/PclWindow.c +++ b/hw/xprint/pcl/PclWindow.c @@ -199,232 +199,6 @@ PclChangeWindowAttributes( return TRUE; } - -/* - * This function is largely ripped from miPaintWindow, but modified so - * that the background is not painted to the root window, and so that - * the backing store is not referenced. - */ -void -PclPaintWindow( - WindowPtr pWin, - RegionPtr pRegion, - int what) -{ - -#define FUNCTION 0 -#define FOREGROUND 1 -#define TILE 2 -#define FILLSTYLE 3 -#define ABSX 4 -#define ABSY 5 -#define CLIPMASK 6 -#define SUBWINDOW 7 -#define COUNT_BITS 8 - - pointer gcval[7]; - pointer newValues [COUNT_BITS]; - - BITS32 gcmask, index, mask; - RegionRec prgnWin; - DDXPointRec oldCorner; - BoxRec box; - WindowPtr pBgWin; - GCPtr pGC; - register int i; - register BoxPtr pbox; - register ScreenPtr pScreen = pWin->drawable.pScreen; - register xRectangle *prect; - int numRects; - - gcmask = 0; - - /* - * We don't want to paint a window that has no place to put the - * PCL output. - */ - if( PclGetContextFromWindow( pWin ) == (XpContextPtr)NULL ) - return; - - if (what == PW_BACKGROUND) - { - switch (pWin->backgroundState) { - case None: - return; - case ParentRelative: - (*pWin->parent->drawable.pScreen->PaintWindowBackground) - (pWin->parent, pRegion, what); - return; - case BackgroundPixel: - newValues[FOREGROUND] = (pointer)pWin->background.pixel; - newValues[FILLSTYLE] = (pointer)FillSolid; - gcmask |= GCForeground | GCFillStyle; - break; - case BackgroundPixmap: - newValues[TILE] = (pointer)pWin->background.pixmap; - newValues[FILLSTYLE] = (pointer)FillTiled; - gcmask |= GCTile | GCFillStyle | GCTileStipXOrigin | - GCTileStipYOrigin; - break; - } - } - else - { - if (pWin->borderIsPixel) - { - newValues[FOREGROUND] = (pointer)pWin->border.pixel; - newValues[FILLSTYLE] = (pointer)FillSolid; - gcmask |= GCForeground | GCFillStyle; - } - else - { - newValues[TILE] = (pointer)pWin->border.pixmap; - newValues[FILLSTYLE] = (pointer)FillTiled; - gcmask |= GCTile | GCFillStyle | GCTileStipXOrigin - | GCTileStipYOrigin; - } - } - - prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(pRegion) * - sizeof(xRectangle)); - if (!prect) - return; - - newValues[FUNCTION] = (pointer)GXcopy; - gcmask |= GCFunction | GCClipMask; - - i = pScreen->myNum; - - pBgWin = pWin; - if (what == PW_BORDER) - { - while (pBgWin->backgroundState == ParentRelative) - pBgWin = pBgWin->parent; - } - - pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen); - if (!pGC) - { - DEALLOCATE_LOCAL(prect); - return; - } - /* - * mash the clip list so we can paint the border by - * mangling the window in place, pretending it - * spans the entire screen - */ - if (what == PW_BORDER) - { - prgnWin = pWin->clipList; - oldCorner.x = pWin->drawable.x; - oldCorner.y = pWin->drawable.y; - pWin->drawable.x = pWin->drawable.y = 0; - box.x1 = 0; - box.y1 = 0; - box.x2 = pScreen->width; - box.y2 = pScreen->height; - REGION_INIT(pScreen, &pWin->clipList, &box, 1); - pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; - newValues[ABSX] = (pointer)(long)pBgWin->drawable.x; - newValues[ABSY] = (pointer)(long)pBgWin->drawable.y; - } - else - { - newValues[ABSX] = (pointer)0; - newValues[ABSY] = (pointer)0; - } - - mask = gcmask; - gcmask = 0; - i = 0; - while (mask) { - index = lowbit (mask); - mask &= ~index; - switch (index) { - case GCFunction: - if ((pointer)(long) pGC->alu != newValues[FUNCTION]) { - gcmask |= index; - gcval[i++] = newValues[FUNCTION]; - } - break; - case GCTileStipXOrigin: - if ((pointer)(long) pGC->patOrg.x != newValues[ABSX]) { - gcmask |= index; - gcval[i++] = newValues[ABSX]; - } - break; - case GCTileStipYOrigin: - if ((pointer)(long) pGC->patOrg.y != newValues[ABSY]) { - gcmask |= index; - gcval[i++] = newValues[ABSY]; - } - break; - case GCClipMask: - if ((pointer)(long) pGC->clientClipType != (pointer)CT_NONE) { - gcmask |= index; - gcval[i++] = (pointer)CT_NONE; - } - break; - case GCSubwindowMode: - if ((pointer)(long) pGC->subWindowMode != newValues[SUBWINDOW]) { - gcmask |= index; - gcval[i++] = newValues[SUBWINDOW]; - } - break; - case GCTile: - if (pGC->tileIsPixel || - (pointer) pGC->tile.pixmap != newValues[TILE]) - { - gcmask |= index; - gcval[i++] = newValues[TILE]; - } - break; - case GCFillStyle: - if ((pointer)(long) pGC->fillStyle != newValues[FILLSTYLE]) { - gcmask |= index; - gcval[i++] = newValues[FILLSTYLE]; - } - break; - case GCForeground: - if ((pointer) pGC->fgPixel != newValues[FOREGROUND]) { - gcmask |= index; - gcval[i++] = newValues[FOREGROUND]; - } - break; - } - } - - if (gcmask) - DoChangeGC(pGC, gcmask, (XID *)gcval, 1); - - if (pWin->drawable.serialNumber != pGC->serialNumber) - ValidateGC((DrawablePtr)pWin, pGC); - - numRects = REGION_NUM_RECTS(pRegion); - pbox = REGION_RECTS(pRegion); - for (i= numRects; --i >= 0; pbox++, prect++) - { - prect->x = pbox->x1 - pWin->drawable.x; - prect->y = pbox->y1 - pWin->drawable.y; - prect->width = pbox->x2 - pbox->x1; - prect->height = pbox->y2 - pbox->y1; - } - prect -= numRects; - (*pGC->ops->PolyFillRect)((DrawablePtr)pWin, pGC, numRects, prect); - DEALLOCATE_LOCAL(prect); - - if (what == PW_BORDER) - { - REGION_UNINIT(pScreen, &pWin->clipList); - pWin->clipList = prgnWin; - pWin->drawable.x = oldCorner.x; - pWin->drawable.y = oldCorner.y; - pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; - } - FreeScratchGC(pGC); - -} - /*ARGSUSED*/ Bool PclDestroyWindow( diff --git a/hw/xprint/pcl/Pclmap.h b/hw/xprint/pcl/Pclmap.h index 79724213f..18ac31d90 100644 --- a/hw/xprint/pcl/Pclmap.h +++ b/hw/xprint/pcl/Pclmap.h @@ -105,7 +105,6 @@ copyright holders. #define PclUnmapWindow PCLNAME(UnmapWindow) #define PclCopyWindow PCLNAME(CopyWindow) #define PclChangeWindowAttributes PCLNAME(ChangeWindowAttributes) -#define PclPaintWindow PCLNAME(PaintWindow) #define PclDestroyWindow PCLNAME(DestroyWindow) /* PclGC.c */ diff --git a/hw/xprint/ps/Ps.h b/hw/xprint/ps/Ps.h index db1dd9129..415c9296a 100644 --- a/hw/xprint/ps/Ps.h +++ b/hw/xprint/ps/Ps.h @@ -517,7 +517,6 @@ extern Bool PsUnmapWindow(WindowPtr pWin); extern void PsCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); extern Bool PsChangeWindowAttributes(WindowPtr pWin, unsigned long mask); -extern void PsPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what); extern Bool PsDestroyWindow(WindowPtr pWin); /* diff --git a/hw/xprint/ps/PsInit.c b/hw/xprint/ps/PsInit.c index 6c86fa221..72bd7bd7c 100644 --- a/hw/xprint/ps/PsInit.c +++ b/hw/xprint/ps/PsInit.c @@ -170,8 +170,6 @@ InitializePsDriver(ndx, pScreen, argc, argv) pScreen->ChangeWindowAttributes = PsChangeWindowAttributes; pScreen->RealizeWindow = PsMapWindow; pScreen->UnrealizeWindow = PsUnmapWindow; - pScreen->PaintWindowBackground = PsPaintWindow; - pScreen->PaintWindowBorder = PsPaintWindow; pScreen->CloseScreen = PsCloseScreen; pScreen->CopyWindow = PsCopyWindow; /* XXX Hard routine to write! */ diff --git a/hw/xprint/ps/PsWindow.c b/hw/xprint/ps/PsWindow.c index d107e5c26..d17cf8ce0 100644 --- a/hw/xprint/ps/PsWindow.c +++ b/hw/xprint/ps/PsWindow.c @@ -214,230 +214,6 @@ PsChangeWindowAttributes( return TRUE; } - -void -PsPaintWindow( - WindowPtr pWin, - RegionPtr pRegion, - int what) -{ - WindowPtr pRoot; - -#define FUNCTION 0 -#define FOREGROUND 1 -#define TILE 2 -#define FILLSTYLE 3 -#define ABSX 4 -#define ABSY 5 -#define CLIPMASK 6 -#define SUBWINDOW 7 -#define COUNT_BITS 8 - - pointer gcval[7]; - pointer newValues [COUNT_BITS]; - - BITS32 gcmask, index, mask; - RegionRec prgnWin; - DDXPointRec oldCorner; - BoxRec box; - WindowPtr pBgWin; - GCPtr pGC; - register int i; - register BoxPtr pbox; - register ScreenPtr pScreen = pWin->drawable.pScreen; - register xRectangle *prect; - int numRects; - - gcmask = 0; - - /* - * We don't want to paint a window that has no place to put the - * PS output. - */ - if( PsGetContextFromWindow(pWin)==(XpContextPtr)NULL ) return; - - if( what==PW_BACKGROUND ) - { - switch(pWin->backgroundState) - { - case None: return; - case ParentRelative: - (*pWin->parent->drawable.pScreen->PaintWindowBackground) - (pWin->parent, pRegion, what); - return; - case BackgroundPixel: - newValues[FOREGROUND] = (pointer)pWin->background.pixel; - newValues[FILLSTYLE] = (pointer)FillSolid; - gcmask |= GCForeground | GCFillStyle; - break; - case BackgroundPixmap: - newValues[TILE] = (pointer)pWin->background.pixmap; - newValues[FILLSTYLE] = (pointer)FillTiled; - gcmask |= GCTile | GCFillStyle | GCTileStipXOrigin | GCTileStipYOrigin; - break; - } - } - else - { - if( pWin->borderIsPixel ) - { - newValues[FOREGROUND] = (pointer)pWin->border.pixel; - newValues[FILLSTYLE] = (pointer)FillSolid; - gcmask |= GCForeground | GCFillStyle; - } - else - { - newValues[TILE] = (pointer)pWin->border.pixmap; - newValues[FILLSTYLE] = (pointer)FillTiled; - gcmask |= GCTile | GCFillStyle | GCTileStipXOrigin | GCTileStipYOrigin; - } - } - - prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(pRegion) * - sizeof(xRectangle)); - if( !prect ) return; - - newValues[FUNCTION] = (pointer)GXcopy; - gcmask |= GCFunction | GCClipMask; - - i = pScreen->myNum; - pRoot = WindowTable[i]; - - pBgWin = pWin; - if (what == PW_BORDER) - { - while( pBgWin->backgroundState==ParentRelative ) pBgWin = pBgWin->parent; - } - - pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen); - if( !pGC ) - { - DEALLOCATE_LOCAL(prect); - return; - } - /* - * mash the clip list so we can paint the border by - * mangling the window in place, pretending it - * spans the entire screen - */ - if( what==PW_BORDER ) - { - prgnWin = pWin->clipList; - oldCorner.x = pWin->drawable.x; - oldCorner.y = pWin->drawable.y; - pWin->drawable.x = pWin->drawable.y = 0; - box.x1 = 0; - box.y1 = 0; - box.x2 = pScreen->width; - box.y2 = pScreen->height; - REGION_INIT(pScreen, &pWin->clipList, &box, 1); - pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; - newValues[ABSX] = (pointer)(long)pBgWin->drawable.x; - newValues[ABSY] = (pointer)(long)pBgWin->drawable.y; - } - else - { - newValues[ABSX] = (pointer)0; - newValues[ABSY] = (pointer)0; - } - - mask = gcmask; - gcmask = 0; - i = 0; - while( mask ) - { - index = lowbit (mask); - mask &= ~index; - switch(index) - { - case GCFunction: - if( (pointer)(long)pGC->alu!=newValues[FUNCTION] ) - { - gcmask |= index; - gcval[i++] = newValues[FUNCTION]; - } - break; - case GCTileStipXOrigin: - if( (pointer)(long)pGC->patOrg.x!=newValues[ABSX] ) - { - gcmask |= index; - gcval[i++] = newValues[ABSX]; - } - break; - case GCTileStipYOrigin: - if( (pointer)(long)pGC->patOrg.y!=newValues[ABSY] ) - { - gcmask |= index; - gcval[i++] = newValues[ABSY]; - } - break; - case GCClipMask: - if( (pointer)pGC->clientClipType!=(pointer)CT_NONE ) - { - gcmask |= index; - gcval[i++] = (pointer)CT_NONE; - } - break; - case GCSubwindowMode: - if( (pointer)pGC->subWindowMode!=newValues[SUBWINDOW] ) - { - gcmask |= index; - gcval[i++] = newValues[SUBWINDOW]; - } - break; - case GCTile: - if( pGC->tileIsPixel || (pointer)pGC->tile.pixmap!=newValues[TILE] ) - { - gcmask |= index; - gcval[i++] = newValues[TILE]; - } - break; - case GCFillStyle: - if( (pointer)pGC->fillStyle!=newValues[FILLSTYLE] ) - { - gcmask |= index; - gcval[i++] = newValues[FILLSTYLE]; - } - break; - case GCForeground: - if( (pointer)pGC->fgPixel!=newValues[FOREGROUND] ) - { - gcmask |= index; - gcval[i++] = newValues[FOREGROUND]; - } - break; - } - } - - if( gcmask ) DoChangeGC(pGC, gcmask, (XID *)gcval, 1); - - if( pWin->drawable.serialNumber!=pGC->serialNumber ) - ValidateGC((DrawablePtr)pWin, pGC); - - numRects = REGION_NUM_RECTS(pRegion); - pbox = REGION_RECTS(pRegion); - for( i=numRects ; --i >= 0 ; pbox++,prect++ ) - { - prect->x = pbox->x1 - pWin->drawable.x; - prect->y = pbox->y1 - pWin->drawable.y; - prect->width = pbox->x2 - pbox->x1; - prect->height = pbox->y2 - pbox->y1; - } - prect -= numRects; - (*pGC->ops->PolyFillRect)((DrawablePtr)pWin, pGC, numRects, prect); - DEALLOCATE_LOCAL(prect); - - if( what==PW_BORDER ) - { - REGION_UNINIT(pScreen, &pWin->clipList); - pWin->clipList = prgnWin; - pWin->drawable.x = oldCorner.x; - pWin->drawable.y = oldCorner.y; - pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; - } - FreeScratchGC(pGC); -} - /*ARGSUSED*/ Bool PsDestroyWindow(WindowPtr pWin) diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am index 57e20102e..5ffba1274 100644 --- a/hw/xwin/Makefile.am +++ b/hw/xwin/Makefile.am @@ -45,7 +45,6 @@ SRCS_NATIVEGDI = \ wingetsp.c \ winnativegdi.c \ winpixmap.c \ - winpntwin.c \ winpolyline.c \ winpushpxl.c \ winrop.c \ @@ -146,10 +145,12 @@ XWin_SOURCES = $(SRCS) INCLUDES = -I$(top_srcdir)/miext/rootless \ -I$(top_srcdir)/miext/rootless/safeAlpha -XWin_LDADD = $(XORG_CORE_LIBS) \ - $(top_builddir)/fb/libfb.la \ - $(XWIN_LIBS) \ - $(XWINMODULES_LIBS) +XWIN_LIBS = \ + $(top_builddir)/fb/libfb.la \ + $(XSERVER_LIBS) + +XWin_DEPENDENCIES = $(XWIN_LIBS) +XWin_LDADD = $(XWIN_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) XWin_LDFLAGS = -mwindows -static diff --git a/hw/xwin/win.h b/hw/xwin/win.h index fad5e2b2e..45a6ca3c2 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -579,8 +579,6 @@ typedef struct _winPrivScreenRec ValidateTreeProcPtr ValidateTree; PostValidateTreeProcPtr PostValidateTree; WindowExposuresProcPtr WindowExposures; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; ClearToBackgroundProcPtr ClearToBackground; ClipNotifyProcPtr ClipNotify; @@ -1052,17 +1050,6 @@ winModifyPixmapHeaderNativeGDI (PixmapPtr pPixmap, pointer pPixData); #endif - -#ifdef XWIN_NATIVEGDI -/* - * winpntwin.c - */ - -void -winPaintWindowNativeGDI (WindowPtr pWin, RegionPtr pRegion, int what); -#endif - - #ifdef XWIN_NATIVEGDI /* * winpolyline.c diff --git a/hw/xwin/winpntwin.c b/hw/xwin/winpntwin.c deleted file mode 100644 index caee712c9..000000000 --- a/hw/xwin/winpntwin.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - *Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. - * - *Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - *"Software"), to deal in the Software without restriction, including - *without limitation the rights to use, copy, modify, merge, publish, - *distribute, sublicense, and/or sell copies of the Software, and to - *permit persons to whom the Software is furnished to do so, subject to - *the following conditions: - * - *The above copyright notice and this permission notice shall be - *included in all copies or substantial portions of the Software. - * - *THE 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 HAROLD L HUNT II 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. - * - *Except as contained in this notice, the name of Harold L Hunt II - *shall not be used in advertising or otherwise to promote the sale, use - *or other dealings in this Software without prior written authorization - *from Harold L Hunt II. - * - * Authors: Harold L Hunt II - */ - -#ifdef HAVE_XWIN_CONFIG_H -#include <xwin-config.h> -#endif -#include "win.h" - -/* See Porting Layer Definition - p. 39 - * Sometimes implemented as two functions: - * PaintWindowBackground (nKind = PW_BACKGROUND) - * PaintWindowBorder (nKind = PW_BORDER) - */ -void -winPaintWindowNativeGDI (WindowPtr pWin, - RegionPtr pRegion, - int nKind) -{ - ErrorF ("winPaintWindow()\n"); -} diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 2038e6fe5..9dc4c3da5 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -714,8 +714,6 @@ winFinishScreenInitNativeGDI (int index, pScreen->UnrealizeWindow = winUnmapWindowNativeGDI; /* Paint window */ - pScreen->PaintWindowBackground = miPaintWindow; - pScreen->PaintWindowBorder = miPaintWindow; pScreen->CopyWindow = winCopyWindowNativeGDI; /* Fonts */ |