summaryrefslogtreecommitdiff
path: root/exa/exa.c
AgeCommit message (Collapse)AuthorFilesLines
2011-06-30Fix UTF-8 encodingMatěj Cepl1-2/+2
Report to find out all non-UTF-8 files created by cat extensions |xargs -I XXXX find . -name \*.XXXX |while read FILE ; do if ( iconv -f utf8 -t ucs2 $FILE >/dev/null 2>/dev/null ) ; then /bin/true else echo $FILE fi done >>report Signed-off-by: Matěj Cepl <mcepl@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> [Daniel: git am failed for me, so I redid it. The method listed in the commit message also failed, so I just used file/grep/iconv. The results are the same though.] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-02exa: Only call driver FinishAccess hook if PrepareAccess hook succeeded.Maarten Maathuis1-1/+2
Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-10Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter.Eric Anholt1-2/+1
In all these cases, any rendering implied by this damage has already occurred, and we want to get the damage out to the client. Some of the DamageRegionAppend calls were explicitly telling damage to flush the reportAfter damage out, but not all. Bug #30260. Fixes the compiz wallpaper plugin with client damage changed to reportAfter. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-07-13EXA: Finish access to pixmap if it's prepared at destruction time.Michel Dänzer1-0/+23
Previously we assumed every pixmap destroyed during a software fallback was also created during a software fallback and had access prepared, but that's not always true. Fixes a server abort Reported-by: 邓逸昕 <bupt.dengyixin@gmail.com> Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05Fix exa_priv.h declarations of privatesKeith Packard1-6/+3
exa_priv.h exposes the privates to the rest of the exa code, and yet the declarations of the privates wasn't fixed when the exa.c versions were. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05Change the devPrivates API to require dixRegisterPrivateKeyKeith Packard1-9/+15
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-06-05Rename region macros to eliminate screen argumentKeith Packard1-3/+3
This is a combination of a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole tree: $ git ls-files | grep -v '^fix-' | xargs ./fix-region And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. The hand-done changes involve removing functions from dix/region.c that duplicate inline functions in include/regionstr.h, along with their declarations in regionstr.h, mi.h and mispans.h. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-20EXA: Wrap Glyphs even without Composite acceleration.Michel Dänzer1-1/+4
In order to avoid migration ping-pong when accumulating glyphs in a mask picture. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov1-4/+4
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-21Merge remote branch 'vignatti/for-keith'Keith Packard1-8/+6
Conflicts: exa/exa.c Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-21exa: don't need to check for NULL pointer if we already assumed it has a valueTiago Vignatti1-8/+6
the alternative would be to check ps in the beginning of the function. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Michel Dänzer <michel@daenzer.net>
2010-04-19unifdef -B -DRENDER to always include RENDER codeKeith Packard1-10/+0
This patch was created with: git ls-files '*.[ch]' | while read f; do unifdef -B -DRENDER -o $f $f; done Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-21exa: exaFinishAccess: Overrun of static array "pExaScr->access" of size 6 at ↵Oliver McFadden1-2/+2
position 6 with index variable "i" Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-29EXA/mixed: Handle results of software fallbacks in DamageReport hook.Michel Dänzer1-6/+0
This is more elegant and probably also slightly more correct than doing it at FinishAccess time. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-08EXA: ExaDoPrepareAccess return value fixes.Michel Dänzer1-11/+19
Only return TRUE if the GPU copy is being accessed, and preserve the return value on repeated / nested calls for the same pixmap. exaPrepareAccessReg_mixed could get inconsistent return values e.g. when the same pixmap is both the destination and source of an operation, potentially resulting in a crash. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-03Revert "exa: a few small pitch related changes"Maarten Maathuis1-9/+2
This reverts commit 99d88ef69d5f7dbf99ca605eceb92f42230a89f4. - Some pixmaps under classic have a sys_pitch which is 0, no idea why. This is causing rendering corruption. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-28exa: a few small pitch related changesMaarten Maathuis1-2/+9
- Setting pitch before exaCopyDirty* is not needed. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-28exa: s/PixmapIsOffscreen/PixmapHasGpuCopy and ↵Maarten Maathuis1-15/+15
s/pExaPixmap->offscreen/pExaPixmap->use_gpu_copy - Fixup some variable names as well. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-28exa: handle pixmap create/destroy in lower layersMaarten Maathuis1-112/+33
- Pixmaps that are created during a fallback are automatically prepared access. - During the fallback accelerated ops are blocked to prevent new/scratch gc's from triggering accelerated ops on mapped pixmaps. - A few cases of incorrect wrapping (on the top level pointer instead of between damage and (w)fb) have been removed. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-26EXA: Try to minimize UploadToScreen calls for mixed pixmaps.Michel Dänzer1-2/+12
If there are several software fallbacks affecting the system memory copy of the same pixmap, only copy the results back to the driver pixmap when it's used for acceleration again, or in the BlockHandler, whichever happens first.
2009-09-26EXA: Extend mixed pixmaps scheme to allow driver PrepareAccess hook to fail.Michel Dänzer1-51/+27
If the PrepareAccess hook fails, use the DownloadFromScreen hook to retrieve driver pixmap contents to a system RAM copy, perform software rendering on that and copy the results back using the UploadToScreen hook. Use the classic migration logic to minimize transfers (which as a bonus allows slightly cleaning up some of the existing mixed pixmap code). This enables things that weren't possible before with driver-allocated pixmap storage: If some (or all) GPU pixmap storage can't be mapped directly by the CPU, this can be handled between the PrepareAccess and DownloadFrom/UploadToScreen hooks, e.g.: * Radeon KMS on big endian machines can fail PrepareAccess if the pixmap requires byte-swapping and swap bytes in DownloadFrom/UploadToScreen. * Environments where GPU and CPU don't have a shared address space at all. Here the driver PrepareAccess hook will always fail and leave all transfers between GPU / CPU storage to the Download/From/UploadToScreen hooks. Drivers which can handle all pixmaps in the PrepareAccess hook should notice little if any difference.
2009-08-08exa: more safetyMaarten Maathuis1-1/+1
2009-08-06exa: delay malloc for "mixed"Maarten Maathuis1-1/+11
2009-08-06exa: implement exaMoveInPixmap for "mixed"Maarten Maathuis1-0/+32
- This can be used to force creation of driver pixmap. - Not for 1 or 4 bpp. - Driver can still fail (driver) pixmap creation.
2009-08-06exa: A simple 3rd backend implementation.Maarten Maathuis1-9/+33
- Based on driver pixmaps with some changes (completely transparent to driver). - It helps with the problem of known software fallbacks, such as trapezoids. - exaDoMigration is now called for all cases that provide a do_migration hook. - exa_migration.c is renamed to exa_migration_classic.c
2009-08-06exa: Split out some classic and driver allocated pixmap code into seperate filesMaarten Maathuis1-288/+38
- Create a few seperate functions and a few private function pointers. - Replace a few if conditions with a check for pExaPix->pDamage instead. - This is in preperation of a third scheme that lies somewhere in between. - Code clarity would have suffered (i started working on it and didn't like the mess).
2009-07-21EXA: Make Prepare/FinishAccess tracking resilient to repeated / nested calls.Michel Dänzer1-51/+46
Use reference counting and do nothing unless the reference count transitions to/from 0. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=22822 . As a bonus, this avoids calling the driver Prepare/FinishAccess hooks more than once per pixmap and operation. Also update the Doxygen documentation for the PrepareAccess driver hook to better match current reality.
2009-07-20EXA: Completely eliminate exaDoMigration calls for drivers that manage pixmaps.Michel Dänzer1-11/+16
2009-07-14exa: switch to byte counting functions.Peter Hutterer1-3/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Michel Dänzer <michel@daenzer.net>
2009-06-09exa: driver pixmaps enabled if either CreatePixmap or CreatePixmap2 presentBen Skeggs1-1/+1
2009-05-18EXA: Defragment offscreen memory.Michel Dänzer1-0/+53
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: add CreatePixmap2 hook for driver pixmaps.Dave Airlie1-4/+7
This adds a revised pixmap hook for driver pixmaps, which is required to support tiling on various chips. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-03-19exa: Accept scratch pixmaps with offscreen memory as such.Maarten Maathuis1-5/+13
2009-03-18exa: round of fb_pitch to the next byteMaarten Maathuis1-2/+2
2009-03-18exa: check if the pixmap is pinned for unsupported AUX indices.Maarten Maathuis1-0/+2
2009-03-13exa: allow exaModifyPixmapHeader to set sys_ptr for EXA_HANDLES_PIXMAPSMaarten Maathuis1-6/+8
- exaModifyPixmapHeader would save sys_ptr if needed, but it would be NULL'ed afterwards. - This is needed to support pixmaps that are not offscreen.
2009-03-04exa: fix a serious issue in exaChangeWindowAttributes (and some more related ↵Maarten Maathuis1-12/+90
things) - fbChangeWindowAttributes can create pixmaps (and access them) without use preparing access. - Also handle the destroyed pixmaps by finishing them first. - Switch to DEST indices again in exaCreatePixmapWithPrepare, because they are obviously being rendered to. - Also avoid calling FinishAccess on pixmaps that are destroyed (and their memory potentially invalid).
2009-03-04exa: fix unwrapping of ModifyPixmapHeader upon CloseScreen.Maarten Maathuis1-3/+3
- Cleanup wrapping too.
2009-03-04exa: increase/rework safety checks in Prepare/FinishAccess.Maarten Maathuis1-16/+65
2009-03-04exa: simplify exaPixmapIsOffscreenMaarten Maathuis1-13/+13
- This includes properly handling the framebuffer.
2009-02-27exa: fixup aux indices and ensure that the indices are used as they should be.Maarten Maathuis1-17/+12
- In a previous patch i forgot to add a FALSE somewhere it seems. - Rename AUX indices so the driver (think of driver managed pixmaps) can do optimisations based upon them. - Fix one abuse of DEST index now that we have the AUX indices (same reason as above).
2009-02-27exa: fixup exaAssertNotDirty.Maarten Maathuis1-3/+10
- Do the right thing based on prepare access.
2009-02-27EXA: Handle separate alpha maps properly in Composite fallback, take two.Michel Dänzer1-0/+13
Preserve the EXA ABI by introducing a new driver flag EXA_SUPPORTS_PREPARE_AUX. If the driver doesn't set this flag, we have to assume any Prepare/FinishAccess driver hooks can't handle the EXA_PREPARE_AUX* indices, so we move out such pixmaps at PrepareAccess time. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 . Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-26EXA: Stop tracking damage for pixmaps subject to ModifyPixmapHeader.Michel Dänzer1-0/+9
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-17exa: exaPixmapDirty should use official damage functions.Maarten Maathuis1-8/+2
- Otherwise other users will not be notified of damage.
2009-02-16exa: fix performance regression from 736b6fbd2c941b6276066cd1503523edebe7bf3dMaarten Maathuis1-3/+12
- 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-08dix: always NULL pGC->tile.pixmap in Create{Scratch}GC.Maarten Maathuis1-1/+0
2009-02-08exa: fix exaValidateGC.Maarten Maathuis1-29/+55
- use DEST in the createPixmap wrapper, because stipple already takes MASK (in case someone uses swappers). - Anticipate some of the less common situations when fbValidateDrawable will access tile related pixmaps.
2009-02-06exa: use proper wrapping in exa.cMaarten Maathuis1-71/+70
2009-02-06exa: properly wrap GC functionsMaarten Maathuis1-68/+165