summaryrefslogtreecommitdiff
path: root/exa
AgeCommit message (Collapse)AuthorFilesLines
2009-10-01exa: avoid infinite loops if UTS sw fallbacks.Michel Dänzer1-5/+5
The upload in finish access can cause an infinite loop if UTS returns FALSE in here. Fixes fd.o bug #24246. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit b5fcc5553eb784c9f4826936e839079c0cdee55a)
2009-09-27EXA: Fix mixed pixmaps crash with missing / failing UploadToScreen hook.Michel Dänzer1-12/+14
For the recent mixed pixmaps changes, I failed to realize (or hit in my testing) a problem which can occur if the driver doesn't provide an UploadToScreen hook or provides one which can fail: There can be a crash in exaMemcpyBox() because exaCopyDirtyToFb() passes pExaPixmap->fb_ptr to exaCopyDirty(), but that's normally NULL with driver allocated pixmaps. The solution is to make exaCopyDirty*() no longer rely on pExaPixmap->fb_ptr but use pPixmap->devPrivate.ptr after PrepareAccess instead. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24167 . (cherry picked from commit 73ae547d5e687ef10dea45801fc627e10ac4b659)
2009-09-26EXA: Extend mixed pixmaps scheme to allow driver PrepareAccess hook to fail.Michel Dänzer6-216/+232
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. (cherry picked from commit 1818cbd70fc1f2e1487b4c678e67e28f1265c0ef)
2009-09-25EXA: Fix some issues pointed out by clang.Michel Dänzer3-10/+8
Remove dead variables, fix use of uninitialized values, that kind of thing. (cherry picked from commit 096f21bb7a1217443d8a03529b1a2938518eb24f)
2009-09-08EXA: Only take special code path for 1x1 fill for pixmaps.Michel Dänzer1-0/+1
It doesn't make sense for windows. Also double-check that the data pointer is valid. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=23461 (not sure that could happen on master even without this, but just in case)
2009-09-04EXA: Stop hiding solid or gradient pictures from the driver.Michel Dänzer1-183/+200
Add support for solid pictures in exaTryDriverSolidFill(), but otherwise just pass solid and gradient pictures to the driver Composite hook. While we're at it, clean up the logic to detect Composite operations which are effectively solid fills or copies. This should also fix some false negatives and positives.
2009-09-03EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_mixed.Michel Dänzer1-1/+3
Otherwise we may incorrectly clobber it to NULL on repeated PrepareAccess calls.
2009-08-15exa: clarify createpixmap2 new pitch returnDave Airlie1-1/+3
2009-08-14exa: fix CreatePixmap2 to be useful for tiling.Dave Airlie3-21/+28
This adds a pitch return so that the driver can align the pitch to any value it wishes and not just the one it gave to EXA at startup.
2009-08-08exa: more safetyMaarten Maathuis2-1/+2
2009-08-08exa: minor cleanupMaarten Maathuis1-10/+9
2009-08-08exa: Fix the broken upload fallback for "mixed"Maarten Maathuis1-18/+20
- Replace it with something wfb friendly while i'm at it.
2009-08-07exa: one can never be too carefulMaarten Maathuis1-1/+2
2009-08-07exa: fix a potential loophole in "mixed"Maarten Maathuis1-11/+13
- Always free sys_ptr before setting the pixmap to pinned.
2009-08-06exa: delay malloc for "mixed"Maarten Maathuis3-10/+17
2009-08-06exa: implement exaMoveInPixmap for "mixed"Maarten Maathuis5-3/+59
- 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: Use damage to optimise away useless copies.Maarten Maathuis2-8/+69
2009-08-06exa: A simple 3rd backend implementation.Maarten Maathuis10-58/+460
- 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 Maathuis7-331/+590
- 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-08-04EXA: Simplify exaGetPixmapFirstPixel using GetImage.Michel Dänzer1-45/+24
2009-08-04Add support for RENDER BGRA formats.Michel Dänzer1-5/+25
2009-07-21EXA: Make Prepare/FinishAccess tracking resilient to repeated / nested calls.Michel Dänzer3-61/+60
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-21EXA: Fix up some issues introduced by 00fe4a297744c81b40f0243fb56ad848a9be6a2b.Michel Dänzer2-6/+8
* Check all pixmaps involved for damage records, fixes visual corruption due to the screen pixmap never having one. * Fix an array size and remove a now superfluous assignment.
2009-07-20EXA: Bail earlier from exaDoPutImage if the driver has no UploadToScreen hook.Michel Dänzer1-6/+3
Also remove dead code associated with access_prepared local variable.
2009-07-20EXA: Completely eliminate exaDoMigration calls for drivers that manage pixmaps.Michel Dänzer4-125/+154
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-07-10EXA: Only pass CT_YXBANDED to RECTS_TO_REGION() if that is really true.Michel Dänzer1-1/+11
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22642 .
2009-06-09exa: driver pixmaps enabled if either CreatePixmap or CreatePixmap2 presentBen Skeggs1-1/+1
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änzer4-8/+297
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-05-15EXA: Always damage glyph cache pixmap manually after uploading a glyph.Michel Dänzer1-36/+37
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-05-15EXA: Take GC client clip type into account for migration.Michel Dänzer4-24/+25
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18950 . Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-04-23exa: add missing exa.h header includeDave Airlie1-4/+3
2009-04-23exa: missed exa.h changeDave Airlie1-0/+3
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-04-23exa: avoid offscreen pixmap swapped out flag for driver pixmapsDave Airlie1-0/+3
2009-04-10exa: implement UTS based upload through CopyAreaMaarten Maathuis1-19/+51
- Some image viewers (eog, gqview) trigger the CopyArea path of Xext/shm.c - I'm not aware of any code path that wouldn't like UTS and trigger this code. - miDoCopy should handle src coordinate clipping. - Overlapping blits are obviously not an issue (both would have to be offscreen or not).
2009-04-09EXA: If the driver can't composite to an a8 mask, try an argb mask for glyphs.Michel Dänzer1-2/+31
Signed-off-by: Michel Dänzer <daenzer@vmware.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: remove a few pExaPixmap checks.Maarten Maathuis1-20/+12
- And make some fatal for a debug build.
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 Maathuis3-16/+86
2009-03-04exa: avoid a potential Prepare/FinishAccess inbalance.Maarten Maathuis1-5/+7
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 Maathuis3-27/+22
- 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: whitespaceMaarten Maathuis1-4/+1