Commit Graph

181 Commits

Author SHA1 Message Date
Eric Anholt 3366b68365 Rearrange and rename EXA code to be a bit more logically organized. Also
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
2006-02-02 20:09:14 +00:00
Thomas Hellstrom 890ed0e082 Fix a bug where a system memory pixmap got a wrong address if memcpy()
fallback was used for downloading from screen.
2005-11-06 16:40:59 +00:00
Thomas Winischhofer 1f43d218cc EXA: The "optimization" for using a fill operation instead of 1x1 copies
checked the destination drawable's dimensions (!) instead of the
    tile's. Really....
2005-10-20 21:45:40 +00:00
Eric Anholt 744aa34ca5 Add an additional meaning to the "dirty" flag. Now, if !dirty && !area, the
pixmaps's contents are undefined, so we won't need to upload the
    undefined contents in MoveIn. Use the ExaCheck* for async ops as well,
    so that dirty is always tracked. While the performance impact for my ls
    -lR test was not significant (though the avoiding-upload path was being
    hit), it's likely to be important for the upcoming Get/PutImage
    acceleration from ajax.
2005-10-15 02:19:09 +00:00
Eric Anholt 55efb41f6c If a window background is a 1x1 pixmap, read the value out and go to
exaFillRegionSolid rather than sending piles and piles of Copies to the
    hardware.
2005-10-12 07:35:20 +00:00
Benjamin Herrenschmidt 13f958fbe8 Add missing {Prepare,Finish}Access() wrappers for the tile pixmap in the
fallback case
2005-10-10 05:58:41 +00:00
Eric Anholt ecaa46380e Bugzilla #4616:
- Merge various fb/ bits of COMPOSITE support from xserver, which weren't
    necessary before due to cw hiding the issues. Fixes offset calculations
    for a number of operations, and may pull some fixes that cairo has
    wanted for XAA as well.
- Add a new call, miDisableCompositeWrapper(), which a DDX can call to keep
    cw from getting initialized from the damage code. While it would be
    cleaner to have each DDX initialize it if it needs it, we don't have
    control over all of them (e.g. nvidia).
- Use the miDisableCompositeWrapper() to keep cw from getting set up for
    screens using EXA, because EXA is already aware of composite. Avoiding
    cw improved performance 0-35% on operations tested by ajax in x11perf.
2005-10-02 08:28:27 +00:00
Adam Jackson aa74468aa5 sparse cleanups. s/0/NULL/ and mark a few things static. 2005-09-30 02:03:45 +00:00
Eric Anholt 58abce3f90 - Use the dirty flag (which should be set correctly all the time,
particularly thanks to Prepare/FinishAccess) to avoid DFS/memcpy on
    pixmap move-out if it's unnecessary. This was disabled in KAA because
    cache misuse on ATI made me guess that this code was wrong.
- Unwrap Glyphs on closescreen.
2005-09-28 20:01:37 +00:00
Eric Anholt 361a9eb953 - Change migration-in rule slightly: previously, if your score was less
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-09-21 10:27:53 +00:00
Eric Anholt 6a29c4cec1 Add support for hardware accelerating tiled background painting. One
example of this is the root weave, which paints slightly slower on SiS
    now in my testing. However, according to keithp some apps use this
    feature for a sort of cheap backing store, which this could help with
    significantly. While I haven't done much performance testing with it,
    it will at least rule out one possible source of terrible performance.
2005-09-21 07:43:01 +00:00
Eric Anholt a1bcf25a1f Break EXA ABI while we still can. Add coordinates to the UploadToScreen
hook so we can upload a subset of a pixmap, and convert the current
    drivers to respect that. Use this support to directly UploadToScreen in
    exaGlyphs, providing a 47.4% +/-2.4% decrease in wall time for ls -lR
    programs/Xserver in an antialiased gnome-terminal on an M6 (n=3, caches
    hot). I would have bumped major version, only I can't tell what the
    EXA_VERSION_* is supposed to be doing as opposed to the module version.
2005-09-18 02:32:23 +00:00
Eric Anholt 074913c8a9 - Don't try to upload 0 byte-per-pixel (PICT_a1) data using
RADEONHostDataBlit.
- Disable the shortcut for switching from 3d to 3d in radeon_exa.c. It
    appears that we do need the cache flush here, thought it's not clear
    why. Disable the 2d to 2d shortcut while here, since I'm unsure of what
    we're doing. Exposed by the following bit:
- Bug #4485: Add a new routine, exaGlyphs, to handle font drawing. Glyphs
    were being accumulated in from non-migratable scratch pixmaps, causing
    the destination pixmap to move towards screen but the migration
    necessary for source never to happen, leading to abysmal performance.
    Instead, copy the scratch glyph data into a real pixmap first, then
    composite from that into the destination, allowing for migration. time
    ls -lR from programs/Xserver showed 26.9% (+/- 6.3%) decrease in wall
    time (n=3).
- Create exaDrawableUse* wrapping exaPixmapUse*, but which are aware of
    windows needing backing store. Makes migration code prettier, and
    ensures that composited windows will be migrated as normal when we turn
    off cw for EXA. (issue brought up by keithp)
2005-09-17 20:02:02 +00:00
Daniel Stone c3d6799cee Bug #594: CAN-2005-2495: Fix exploitable integer overflow in pixmap
creation, where we could create a far smaller pixmap than we thought,
    allowing changes to arbitrary chunks of memory. (Søren Sandmann
    Pedersen)
2005-09-13 01:33:19 +00:00
Eric Anholt 1c003ccf5d Add a pair of hooks, PrepareAccess() and FinishAccess(), which get called
around CPU access to the framebuffer. This allows the hardware to set
    up swappers to deal with endianness, or to tell EXA to move the pixmap
    out to framebuffer if insufficient swappers are available (note: must
    not fail on front buffer!).
Submitted by: benh
2005-09-11 19:08:10 +00:00
Eric Anholt 0c74799af4 Remove existing broken maxX/maxY code for composite (results in infinite
loops, doesn't deal with failure, doesn't present the interface to
    drivers that I expected) and instead replace it with a simple fallback
    to software when coordinate limits could be violated. Act similarly in
    other acceleration cases as well.
The solution I want to see (and intend to do soon) is to (when necessary)
    create temporary pictures/pixmaps pointing towards the real ones' bits,
    with the offsets adjusted, then render from/to those using adjusted
    coordinates.
2005-08-30 04:41:04 +00:00
Adam Jackson 0926cf79c0 Add diagnostic messages for exaDriverInit failure cases. 2005-08-26 20:21:57 +00:00
Eric Anholt 0711502f18 Bugzilla #4226: Change the pixmap migration strategy for the CopyNtoN case.
Now, if either source or dest were in framebuffer, try to get both
    there, but prefer system memory for both otherwise. Required making
    exaasync.c go through the try-acceleration path. This significantly
    improves window resizing under composite, because previously the
    pattern of creating a new pixmap and copying default contents from the
    screen caused a fallback every time due to the new destination pixmap
    being in system memory.
2005-08-24 23:48:11 +00:00
Eric Anholt 55c5c6953a Bugzilla #4090: Introduce getters for pixmap pitch and offset, to
simplify/clarify it for driver writers who probably don't want to know
    what pPixmap->devPrivate.ptr or pPixmap->devKind mean. Converts the sis
    driver to use them, and bumps the EXA module minor version.
2005-08-24 22:43:27 +00:00
Eric Anholt 8fd250e5e4 Bugzilla #4089: Fix crashes in !EXA_OFFSCREEN_PIXMAPS case by not trying to
do migration when the EXA pixmap private is NULL.
2005-08-24 21:51:28 +00:00
Eric Anholt ebedc8bbb5 - Fix the exa pixmap offset/pitch alignment to deal with non-POT alignment
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-08-14 19:46:55 +00:00
Chris Lee cc67bd187f EXA support in the modular build. 2005-08-06 23:34:09 +00:00
Zack Rusin 3c92389185 Patch from Thomas Winischhofer to kick out all pixmaps to system ram upon a
VT switch and vice versa when returning.
2005-07-09 14:15:35 +00:00
Zack Rusin e84648df7d mark drawable as dirty on copying/painting windows 2005-07-08 17:07:52 +00:00
Zack Rusin 4ab73a73f4 heh, oops (thanks Thomas) 2005-07-08 07:43:00 +00:00
Zack Rusin d0dc574adb Check vtSema before accelerating primitives and sync in fallbacks only if
we got vtSema
2005-07-07 15:05:02 +00:00
Zack Rusin 5e50ae22bf remove the temporary debugging output 2005-07-04 18:55:53 +00:00
Zack Rusin e34f31762e This fixes the close screen mess (crash reported by Thomas). Also hide the
private Exa screen definition. Properly cleanup on screen close and do
    not delete the private screen in the DriverFini call.
2005-07-04 14:15:57 +00:00
Daniel Stone e03198972c Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
    source files in the xserver/xorg tree, predicated on defines of
    HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
    <X11/fonts/foo.h>.
2005-07-03 07:02:09 +00:00
Zack Rusin aabb868920 removing all debugging output from the default build :) 2005-07-01 13:30:29 +00:00
Zack Rusin 30c019e847 Adding the new acceleration architecture: Exa. It's meant to replace XAA in
the coming months.
2005-07-01 08:56:12 +00:00