summaryrefslogtreecommitdiff
path: root/exa/exa_migration.c
AgeCommit message (Collapse)AuthorFilesLines
2009-03-04exa: remove a few pExaPixmap checks.Maarten Maathuis1-20/+12
- And make some fatal for a debug build.
2009-02-27exa: fixup exaAssertNotDirty.Maarten Maathuis1-4/+16
- Do the right thing based on prepare access.
2009-02-17Revert "exa: the extent of the valid region is probably much larger than ↵Maarten Maathuis1-3/+13
that of the pending damage." This reverts commit 97c1cbc70216366e92b9371de608ce94e60aa874. - Sorry for the thinko, pending damage is often not fragmentated. - Should the dst region become fragmentated, you actually want to copy more to unfragmentate it.
2009-02-17exa: the extent of the valid region is probably much larger than that of the ↵Maarten Maathuis1-13/+3
pending damage. - Since the default has been changed from nothing to everything.
2009-02-16exa: reintroduce src rect optimisation, with a slightly higher threshold.Maarten Maathuis1-0/+7
- I got some feedback on gtkperf line test regression. - The increased threshold should ensure the destination optimisation is dominant.
2009-02-16exa: fix performance regression from 736b6fbd2c941b6276066cd1503523edebe7bf3dMaarten Maathuis1-7/+0
- The src optimisation is more aggressive and possibly harmful in light of the new initial state of pixmaps. - There is now actually a performance improvement by almost always keeping the number of rects low.
2009-02-15EXA: Try to prevent the valid regions from growing too many rects.Michel Dänzer1-1/+28
This helps contain region management overhead in some pathological cases, see e.g. http://bugs.freedesktop.org/show_bug.cgi?id=16647 . Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-07exa: Calling exaMarkSync after UTS is the drivers responsibility.Maarten Maathuis1-2/+2
2009-02-06EXA: Try harder to keep current pixmap copy up to date in exaMigrateToward*.Michel Dänzer1-1/+11
This is probably required, but apparently not sufficient, for making migration heuristics other than "always" work correctly again. Not that I really care about them...
2009-02-06EXA: Guard empty pending region warning by DEBUG_MIGRATE.Michel Dänzer1-0/+2
It isn't very useful yet while the damage layer calls us for empty operations, mostly confuses users.
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade1-2/+2
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
2008-11-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade1-1/+1
This is the biggest "visibility" patch. Instead of doing a "export" symbol on demand, export everything in the sdk, so that if some module fails due to an unresolved symbol, it is because it is using a symbol not in the sdk. Most exported symbols shouldn't really be made visible, neither advertised in the sdk, as they are only used by a single shared object. Symbols in the sdk (or referenced in sdk macros), but not defined anywhere include: XkbBuildCoreState() XkbInitialMap XkbXIUnsupported XkbCheckActionVMods() XkbSendCompatNotify() XkbDDXFakePointerButton() XkbDDXApplyConfig() _XkbStrCaseCmp() _XkbErrMessages[] _XkbErrCode _XkbErrLocation _XkbErrData XkbAccessXDetailText() XkbNKNDetailMaskText() XkbLookupGroupAndLevel() XkbInitAtoms() XkbGetOrderedDrawables() XkbFreeOrderedDrawables() XkbConvertXkbComponents() XkbWriteXKBSemantics() XkbWriteXKBLayout() XkbWriteXKBKeymap() XkbWriteXKBFile() XkbWriteCFile() XkbWriteXKMFile() XkbWriteToServer() XkbMergeFile() XkmFindTOCEntry() XkmReadFileSection() XkmReadFileSectionName() InitExtInput() xf86CheckButton() xf86SwitchCoreDevice() RamDacSetGamma() RamDacRestoreDACValues() xf86Bpp xf86ConfigPix24 xf86MouseCflags[] xf86SupportedMouseTypes[] xf86NumMouseTypes xf86ChangeBusIndex() xf86EntityEnter() xf86EntityLeave() xf86WrapperInit() xf86RingBell() xf86findOptionBoolean() xf86debugListOptions() LoadSubModuleLocal() LoaderSymbolLocal() getInt10Rec() xf86CurrentScreen xf86ReallocatePciResources() xf86NewSerialNumber() xf86RandRSetInitialMode() fbCompositeSolidMask_nx1xn fbCompositeSolidMask_nx8888x0565C fbCompositeSolidMask_nx8888x8888C fbCompositeSolidMask_nx8x0565 fbCompositeSolidMask_nx8x0888 fbCompositeSolidMask_nx8x8888 fbCompositeSrc_0565x0565 fbCompositeSrc_8888x0565 fbCompositeSrc_8888x0888 fbCompositeSrc_8888x8888 fbCompositeSrcAdd_1000x1000 fbCompositeSrcAdd_8000x8000 fbCompositeSrcAdd_8888x8888 fbGeneration fbIn fbOver fbOver24 fbOverlayGeneration fbRasterizeEdges fbRestoreAreas fbSaveAreas composeFunctions VBEBuildVbeModeList() VBECalcVbeModeIndex() TIramdac3030CalculateMNPForClock() shadowBufPtr shadowFindBuf() miRRGetScreenInfo() RRSetScreenConfig() RRModePruneUnused() PixmanImageFromPicture() extern int miPointerGetMotionEvents() miClipPicture() miRasterizeTriangle() fbPush1toN() fbInitializeBackingStore() ddxBeforeReset() SetupSprite() InitSprite() DGADeliverEvent() SPECIAL CASES o defined as _X_INTERNAL xf86NewInputDevice() o defined as static fbGCPrivateKey fbOverlayScreenPrivateKey fbScreenPrivateKey fbWinPrivateKey o defined in libXfont.so, but declared in xorg/dixfont.h GetGlyphs() QueryGlyphExtents() QueryTextExtents() ParseGlyphCachingMode() InitGlyphCaching() SetGlyphCachingMode()
2008-11-28Make visible symbols required by xorg modules.Paulo Cesar Pereira de Andrade1-1/+1
This patch exports all symbols required by the compilable (in a x86 linux computer) xorg/driver/* modules. Still missing symbols worth mentioning are: sunleo miFindMaxBand no longer available intel (uxa/uxa-accel.c) fbShmPutImage no longer available (and should have been static) mga MGAGetClientPointer (should come from matrox's libhal) This is not a definitive "visibility" patch, as all it does is to export missing symbols, but the modules that current don't compile, may require more symbols once fixed, and third party drivers should also require more symbols exported. A "definitive" patch should export symbols defined in the sdk.
2008-10-20EXA: Avoid excessive syncing in PutImageMichel Dänzer1-2/+4
2008-09-01exa: drop cw.h inclusionDave Airlie1-1/+0
this doesn't seem to be needed, at least I can't see any warning without it. I'd like to build EXA into a driver and cw.h isn't exported
2008-08-29{damage,exa}: sanitise damageMaarten Maathuis1-39/+0
- Redo damage naming for more consistency. - Call post submission functions only where appropriate. - EXA can now live without it's odd damage workarounds.
2008-08-26exa: fix thinko from 988725f32e082aee9392a71464125157a83d1e67Maarten Maathuis1-3/+3
- the drawable of the pixmap is not the same as the original drawable (possibly a DRAWABLE_WINDOW)
2008-08-26exa: some minor cleanupMaarten Maathuis1-2/+2
- Fix compile warning - Order exa.h by source file that exports the function. - Move the function i created earlier to private headers.
2008-08-26exa: move destination damage for internal calls to a special functionMaarten Maathuis1-0/+33
- This should improve clarity for someone who isn't familiar with the code.
2008-08-05EXA: Remove unnecessary #includesDaniel Stone1-2/+0
There wasn't actually any font code here, so no problem.
2008-05-24EXA: Only record damage generated by rendering operations.Michel Dänzer1-0/+6
Recording damage from other operations (e.g. creating a client damage record) may confuse the migration code resulting in corruption. Option "EXAOptimizeMigration" appears safe now, so enable it by default. Also remove it from the manpage, as it should only be necessary on request in the course of bug report diagnostics anymore.
2008-05-24EXA: Don't suggest exaCopyDirty be inlined.Michel Dänzer1-1/+1
Leave the decision to the compiler toolchain.
2007-11-07EXA: Disable problematic optimization of dest pixmap migration by default.Michel Dänzer1-8/+25
Also add some code comments about these optimizations.
2007-10-18EXA: Don't attempt to move in pixmaps that can't be accelerated.Michel Dänzer1-0/+3
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12815 .
2007-10-03exa: add new flags to denote driver handles all pixmap migration/hidingDave Airlie1-0/+3
2007-09-17EXA: Make sure driver hooks get correct offscreen offsets from exaCopyDirty.Michel Dänzer1-4/+4
This should ensure the driver UploadTo/DownloadFromScreen hooks can always work as intended.
2007-09-07EXA: Hide pixmap pointer outside of exaPrepare/FinishAccess whenever possible.Michel Dänzer1-5/+4
We finally want to catch all cases where the pixmap pointer is dereferenced outside of exaPrepare/FinishAccess. Also fix a couple of such cases exposed by this change.
2007-09-07EXA: Support partial migration of pixmap contents between Sys and FB.Michel Dänzer1-86/+146
The initiator of migration can pass in a region that defines the relevant area of each source pixmap or the irrelevant area of the destination pixmap. By default, the pending damage region is assumed relevant for the destination pixmap, and everything for source pixmaps. Thanks to Jarno Manninen for reassuring me that my own ideas for this were feasible and for providing additional ideas.
2007-09-07EXA: Track valid bits in Sys and FB separately.Michel Dänzer1-87/+67
Also consolidate exaCopyDirtyToFb/Sys.
2007-09-07EXA: Migrate out pixmap in exaPrepareAccess.Michel Dänzer1-9/+4
Also fix exaFinishAccessGC not to use the same index for tile and stipple.
2007-08-24EXA: Only mark offscreen memory as used when it really is.Michel Dänzer1-2/+6
2007-04-29EXA: exaAssertNotDirty improvements.Michel Dänzer1-13/+8
* Return early if the valid region is empty or the pixmap is pinned. * Fix loop for several cliprects.
2007-01-24Bug #7639: Only swap out pixmaps (rather than everything) on VT switch in EXA.Eric Anholt1-1/+1
This is a new behavior for version 2.1 of EXA, and only takes effect if the driver has requested that. Otherwise, the previous behavior remains the same.
2006-06-12Track per-drawable damage to minimize UTS and DFS transfers.Michel Dänzer1-75/+144
Based on work by Eric Anholt.
2006-04-28Correct some bugs causing performance issues in the "Smart" scheme.Eric Anholt1-3/+8
2006-04-26Improve the migration debugging output.Eric Anholt1-12/+14
2006-04-25Add an option to verify at the point of migration that pixmaps which aren'tEric Anholt1-0/+43
marked dirty are in fact not dirty. This will hopefully help catch issues like the previous commit. Leave it on in fakexa.
2006-04-18Add a new migration scheme, called "Smart" for lack of a better name. ThisEric Anholt1-1/+60
one behaves somewhat between Greedy and Always. It moves in if we can accelerate, unless the destination is clean and shouldn't be kept in framebuffer according to the score, in which case we migrate out (and force-migrate anything where migration is free). This should help fix lack of acceleration for drivers without UTS since removing exaAsyncPixmapGCOps, and has removed one performance trap with Radeon I'd noticed. It is the new default.
2006-03-31Add an option to EXA for the DDX to request that EXA hide the pixmap'sEric Anholt1-4/+7
devPrivate.ptr when pointing at offscreen memory, outside of exaPrepare/FinishAccess(). This was used with fakexa to find (by NULL dereference) many instances of un-Prepared CPU access to the framebuffer: - GC tiles used in several ops when fillStyle == FillTiled were never Prepared. - Migration could lead to un-Prepared access to mask data in render's Trapezoids and Triangles - PutImage's UploadToScreen failure fallback failed to Prepare.
2006-03-16Change EXA so that exaMoveOutPixmap() retains the framebuffer copy of theEric Anholt1-156/+206
pixmap, and damage is tracked so that a later exaMoveInPixmap won't result in an upload if no upload is necessary. This will likely improve the performance of the "Always" migration scheme significantly, and is a step in the path to more exact damage tracking between framebuffer and system memory.
2006-03-15Don't let pinned pixmaps get migrated in when using the "Always" migrationEric Anholt1-0/+3
scheme. This notably keeps the visible screen from getting migrated in to a new location in framebuffer. Reported by: Michel Dänzer.
2006-03-15Add a new migration scheme, "always", which will move pixmaps to theirEric Anholt1-27/+66
desired location always (unless they don't fit in FB, in which case they all get moved out for software rendering). The default remains as before, but can be controlled by the MigrationHeuristic xorg.conf option (which is intentionally not documented, as it may be short-lived). This is part of the exa-damagetrack work, which appears stable in testing with fakexa, unlike the work as a whole.
2006-03-14Move migration logic to a new function, exaDoMigration(). This is largely aEric Anholt1-16/+75
manual conversion to allow for different migration schemes to be implemented reasonably, but does include some minor improvements such as accounting for pinned pixmaps not being acceleratable, and for our current GetImage and GetSpans not being accelerated.
2006-03-09Rearrange EXA driver structures so that there's a hope of maintaining ABIEric Anholt1-19/+19
when extending the driver interface. The card and accel structures are merged into the ExaDriverRec, which is to be allocated using exaDriverAlloc(). The driver structure also grows exa_major and exa_minor, which drivers fill in and have checked by EXA (double-checking that the driver really did check that the EXA version was correct). Removes exaInitCard(), which is replaced by the driver filling in the rec by hand, and the exaGetVersion() and related EXA_*VERSION which are replaced by always using the XFree86 loadable module versioning.
2006-02-16Move EXA implementation up to the top level and remove its XFree86Eric Anholt1-4/+2
dependencies. It was nearly abstract enough already to be used by multiple DDXes. This will be useful for EXA development through providing a fake acceleration implementation within Xephyr, so that testing can be done on new EXA code without worrying about buggy drivers.
2006-02-10Remove libcwrapper usage from xorg server modules. The libcwrapper is onlyEric Anholt1-0/+3
of (marginal) use in the drivers, and that usage remains.
2006-02-02Move the frequently-repeated code to get the pixmap that backs a drawableEric Anholt1-16/+2
to a new function, exaGetDrawablePixmap().
2006-02-02Rearrange and rename EXA code to be a bit more logically organized. AlsoEric Anholt1-1285/+2
removes a little bit of debugging leftovers. Summary: exa.c -> exa.c (miscellaneous code) exa_accel.c (all acceleration code) exa_migration.c (migration logic) exaasync.c -> exa_unaccel.c (software fallbacks) exapict.c -> exa_render.c (render extension stuff) exaoffscreen.c -> exa_offscreen.c exaPriv.h -> exa_priv.h
2005-11-06Fix a bug where a system memory pixmap got a wrong address if memcpy()Thomas Hellstrom1-1/+1
fallback was used for downloading from screen.
2005-10-20EXA: The "optimization" for using a fill operation instead of 1x1 copiesThomas Winischhofer1-3/+3
checked the destination drawable's dimensions (!) instead of the tile's. Really....