summaryrefslogtreecommitdiff
path: root/exa/exa_offscreen.c
AgeCommit message (Collapse)AuthorFilesLines
2009-05-18EXA: Allocate from the end of free offscreen memory rather than from the start.Michel Dänzer1-31/+14
This way we don't always need to scan over previously allocated areas when looking for an available one, and there might be less fragmentation. Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-05-18EXA: Defragment offscreen memory.Michel Dänzer1-8/+223
At most once per second, under the following circumstances: * We can't satisfy an offscreen memory allocation, but there seems to be enough offscreen memory available in total. or * The server has been idle for at least 100ms, and there is more than one available offscreen area. Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-04-23exa: avoid offscreen pixmap swapped out flag for driver pixmapsDave Airlie1-0/+3
2009-02-27Revert "EXA: Handle separate alpha maps properly in Composite fallback."Michel Dänzer1-6/+53
This reverts commit 170cf1270dff38d3cce7f5ba5b940d1c0d70eff5. Conflicts: exa/exa_render.c
2009-02-24EXA: Handle separate alpha maps properly in Composite fallback.Michel Dänzer1-53/+6
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 . As this can't work without new EXA_PREPARE_AUX* indices, this requires a major version bump, so we can also drop the UploadToScratch driver hook and ExaOffscreenSwap*(). So this also fixes http://bugs.freedesktop.org/show_bug.cgi?id=20213 . Moreover, introduce EXA_DRIVER_KNOWN_MAJOR to break compilation of drivers which may not be able to handle EXA_PREPARE_AUX*, giving instructions how to make them build again in the #error message. Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade1-4/+4
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-28Make visible symbols required by xorg modules.Paulo Cesar Pereira de Andrade1-4/+4
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-04-21EXA: Offscreen memory eviction improvements.Michel Dänzer1-15/+34
* Make sure available areas are considered to have no eviction cost. This seems to help for https://bugs.freedesktop.org/show_bug.cgi?id=15513 but I'm afraid that may just be coincidence. * Only calculate eviction cost of each area once for each eviction pass. Safeguard against potential (though unlikely) division by zero. * Cosmetic enhancements: Name eviction cost related variables 'cost' instead of 'score' to emphasize that smaller values are better, update Doxygen file comment to the way eviction works now.
2008-03-31EXA: Optimize the eviction scanning loop in exaOffscreenAlloc.Fredrik Höglund1-48/+58
Reduce the cost of the inner loop, by keeping a set of pointers to the first and the last areas in the series, subtracting the cost of the first area from the score, and adding the cost of the last area while walking the list. This commit also moves the scanning loop from exaOffscreenAlloc into a separate function. Idea by Michel Dänzer.
2008-03-31EXA: Improve the algorithm used for tracking offscreen pixmap use.Fredrik Höglund1-22/+14
Replace the current score keeping algorithm with a rolling counter that's incremented in ExaOffscreenMarkUsed, with the previous value being stored in the area. exaOffscreenAlloc uses the difference between the counter value and the value in the area when deciding which area to evict. It now also takes the size of the areas into account, and favors evicting smaller areas. The credit for these ideas goes to Michel Dänzer.
2007-07-03ExaOffscreenMarkUsed: Don't crash when there's no offscreen memory.Dodji Seketeli1-1/+1
2007-04-29EXA: Fix OffscreenValidate build with DEBUG_OFFSCREEN enabled.Michel Dänzer1-1/+1
2007-04-29EXA: Fix exaEnableDisableFBAccess for nested disables and enables.Michel Dänzer1-2/+4
2007-01-24Bug #7639: Only swap out pixmaps (rather than everything) on VT switch in EXA.Eric Anholt1-10/+60
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-12-19Merge branch 'master' into exa-damagetrackMichel Dänzer1-5/+0
Conflicts: exa/exa_accel.c exa/exa_migration.c
2006-06-18Add options to disable EXA acceleration for Composite/UTS/DFS, and always printEric Anholt1-5/+0
out how much memory EXA is managing for offscreen pixmaps.
2006-06-12Track per-drawable damage to minimize UTS and DFS transfers.Michel Dänzer1-0/+1
Based on work by Eric Anholt.
2006-03-31Revert mistaken commit to exa_unaccel.c. Should have been toEric Anholt1-1/+1
exa_offscreen.c: Correct a typo in debug-only offscreen validation code. (Wang Zhenyu)
2006-03-09Do a first pass of doxygen documentation of EXA. This removes theEric Anholt1-0/+49
corresponding pieces of exa-driver.txt, which were becoming stale. Hopefully the documentation will stay much more up-to-date this way. Many thanks to jbarnes for writing exa-driver.txt which was used a lot in writing this documentation.
2006-03-09Rearrange EXA driver structures so that there's a hope of maintaining ABIEric Anholt1-18/+18
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-6/+1
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-11<sys/limits.h> -> <limits.h> so we can compile on non-BSD OS'esAlan Coopersmith1-1/+1
2006-02-10Remove libcwrapper usage from xorg server modules. The libcwrapper is onlyEric Anholt1-1/+5
of (marginal) use in the drivers, and that usage remains.
2006-02-02Rearrange and rename EXA code to be a bit more logically organized. AlsoEric Anholt1-1/+1
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-10-13Fix stupid mistake in yesterday's allocator commit, would cause exa toBenjamin Herrenschmidt1-1/+2
consider a random available memory size
2005-10-11Fix a couple of bugs in the offscreen allocator. One mostly harmless wasBenjamin Herrenschmidt1-16/+18
causing our search loop for evictable blocks to possibly skip a good candiate, and another was the allocator would occasionally use area->offset as if it was the base of the pixmap, while for a pixmap that is not in available state, it is not. This caused some funny miscalculation leading to overlapping pixmaps and accesses beyond the end of the framebuffer. To make things cleared, I renamed save_offset to base_offset, made sure it's the one used everywhere in the allocator, and only align "offset" for the client at the end of exaOffscreenAlloc().
2005-09-30sparse cleanups. s/0/NULL/ and mark a few things static.Adam Jackson1-4/+4
2005-09-21- Change migration-in rule slightly: previously, if your score was lessEric Anholt1-2/+3
than the max, it was bumped, and then if you were above the threshhold you got moved in. Instead, do the above-threshhold check separate from score starting out less than max. While this will likely make thrashing cases worse, I hope it will fix some issues with long term performance (think of an xcompmgr with a backbuffer it's doing only accelerated operations to. If some new pixmap comes in and bumps it out, even once, it will never get a chance to re-migrate because its score will be maxed). Change migration-out to be the same way for symmetry, though it shouldn't ever affect anything. - Fix a lot of debugging output, both in terms of printing quality, and completeness. The fallback debugging covers a lot more now, pointing out new areas for improvement. Debugging toggles are now centralized in exaPriv.h.
2005-08-24Fix a bug where NULL could be dereferenced during the pixmap kick-outEric Anholt1-3/+3
process by referencing the correct offscreen area. Also drive-by the comments related to these for clarity.
2005-08-14- Fix the exa pixmap offset/pitch alignment to deal with non-POT alignmentEric Anholt1-1/+2
requirements. MGA, notably, uses a multiple of 3 in some cases. - Rename the pixmap offset/pitch alignment fields to more clearly state their meaning.
2005-07-09Patch from Thomas Winischhofer to kick out all pixmaps to system ram upon aZack Rusin1-0/+20
VT switch and vice versa when returning.
2005-07-01removing all debugging output from the default build :)Zack Rusin1-0/+2
2005-07-01Leave debugging output for only the interested parties.Zack Rusin1-1/+1
2005-07-01Adding the new acceleration architecture: Exa. It's meant to replace XAA inZack Rusin1-0/+374
the coming months.