Commit Graph

69 Commits

Author SHA1 Message Date
Michel Dänzer
29586101dc EXA: Only record damage generated by rendering operations.
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-24 20:01:41 +02:00
Owen Taylor
13fd225630 EXA: Clean up debug messages 2008-04-28 21:00:55 +02:00
Owen Taylor
fcb5949928 EXA: Fix overlapping glyphs in glyph cache
Allocate each cache at a different vertical position in the
per-format pixmap. Fix width/height confusion when choosing
the cache for a glyph.
2008-04-28 21:00:54 +02:00
Owen Taylor
40eb14c948 EXA: Add exaCompositeRects()
Add a function to composite multiple independent rectangles
from the same source to the same destination in a single
operation: this is useful for building a glyph mask.
2008-04-28 21:00:54 +02:00
Owen Taylor
54184110f6 EXA: Use a single large glyph cache pixmap
Add back exaGlyphs(); the new version copies the glyph images
onto a single large glyph pixmap and draws from their to the
destination surface. This reduces the management of small
offscreen areas and will allow us to avoid texture unit setup
between each glyph.
2008-04-28 21:00:54 +02:00
Tilman Sauerbeck
3f081b4de5 EXA: Set pixmap->accel_blocked on the screen pixmap, too. 2008-04-21 23:07:39 +02:00
Fredrik Höglund
93d876891d EXA: Improve the algorithm used for tracking offscreen pixmap use.
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.
2008-03-31 21:15:50 +02:00
Bernardo Innocenti
e6ea3147bf exa: make the prototype for exaGetPixmapFirstPixel() public
This fixes a warning in amd_drv which is using it.

Signed-off-by: Bernardo Innocenti <bernie@codewiz.org>
2008-01-14 13:09:13 -05:00
Eamon Walsh
1603130236 Merge branch 'master' into XACE-SELINUX
Conflicts:

	Xext/xace.c
	Xext/xace.h
2007-11-14 13:35:50 -05:00
Michel Dänzer
9bee1c6912 EXA: Disable problematic optimization of dest pixmap migration by default.
Also add some code comments about these optimizations.
2007-11-07 19:01:24 +01:00
Eamon Walsh
b633d54b94 Merge branch 'master' into XACE-SELINUX
Conflicts:

	GL/glx/glxscreens.c
	hw/xnest/Screen.c
	render/glyph.c
	render/glyphstr.h
	render/render.c
2007-10-25 12:19:30 -04:00
Eamon Walsh
c3f7b86255 Merge branch 'master' into XACE-SELINUX
Conflicts:

	os/access.c
2007-10-17 15:00:54 -04:00
Eric Anholt
439edc768e Merge branch 'glyph-pixmaps'
Conflicts:

	configure.ac
	exa/exa_render.c
2007-10-02 12:14:04 -07:00
Dave Airlie
31555af000 exa: add a pixmap private pointer for drivers to retrieve. 2007-10-02 13:57:55 +10:00
Eamon Walsh
27612748e0 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/devices.c
2007-09-26 07:47:29 -04:00
Tilman Sauerbeck
ae8b4f7dcf EXA: Added pitch limitations.
Drivers can now specify the max pitches that the accelerator supports.
2007-09-25 16:43:06 +02:00
Eamon Walsh
97c150b61b Merge branch 'master' into XACE-SELINUX
Conflicts:

	afb/afbpntwin.c
	afb/afbscrinit.c
	afb/afbwindow.c
	cfb/cfb.h
	cfb/cfballpriv.c
	cfb/cfbscrinit.c
	cfb/cfbwindow.c
	configure.ac
	fb/wfbrename.h
	hw/xfree86/xf4bpp/ppcIO.c
	hw/xfree86/xf4bpp/ppcPntWin.c
	hw/xfree86/xf4bpp/ppcWindow.c
	hw/xfree86/xf8_32bpp/cfbscrinit.c
	mfb/mfb.h
	mfb/mfbpntwin.c
	mfb/mfbscrinit.c
	mfb/mfbwindow.c
	mi/miexpose.c

Note: conflicts caused by devPrivates rework vs. paintwindow changes.
2007-09-19 07:25:55 -04:00
Eric Anholt
e4d11e58ce Remove the PaintWindow optimization.
This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive.  This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it.  No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
2007-09-13 00:08:53 +00:00
Michel Dänzer
5f7da4da8d EXA: Use exaShmPutImage for pushing glyphs to scratch pixmap in exaGlyphs. 2007-09-07 18:41:33 +02:00
Michel Dänzer
be922b3048 EXA: exa(Shm)PutImage improvements.
Improve exaShmPutImage performance and reuse its core in exaPutImage as it
seems faster than the previous code when the driver doesn't provide an
UploadToScreen hook.

Make sure all damage records are notified of the damage incurred by actual
ShmPutImage calls.

Remove superfluous manual damage tracking for actual PutImage calls.
2007-09-07 18:41:33 +02:00
Michel Dänzer
ea92ea4156 EXA: exaGetImage improvements.
Use the new migration infrastructure to cache FB bits we need in the system
copy, for the benefit of repeated calls.
2007-09-07 18:41:32 +02:00
Michel Dänzer
a634c9b034 EXA: RENDER improvements.
Exclude bits that will be overwritten from migration.

Use exaGlyphs even when Composite can't be accelerated, to avoid PolyFillRect
roundtrip via offscreen memory.

Initialize mask pixmap in exaGlyphs in FB in addition to system if the driver
provides Composite hooks to avoid migration overhead.

Remove manual damage tracking where superfluous.
2007-09-07 18:41:32 +02:00
Michel Dänzer
2e0895a4ba EXA: Improvements for trapezoids and triangles.
Only migrate once in exaTrapezoids/Triangles instead of every time in
exaRasterizeTrapezoid/AddTriangles. Adapt manual damage tracking to new
infrastructure.

Also move definition of NeedsComponent() closer to where it's used.
2007-09-07 18:41:31 +02:00
Michel Dänzer
6c9d7ed61b EXA: Hide pixmap pointer outside of exaPrepare/FinishAccess whenever possible.
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-07 18:41:30 +02:00
Michel Dänzer
962eddd7a2 EXA: Support partial migration of pixmap contents between Sys and FB.
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-07 18:41:30 +02:00
Michel Dänzer
5c7ee3f47f EXA: Track valid bits in Sys and FB separately.
Also consolidate exaCopyDirtyToFb/Sys.
2007-09-07 18:41:29 +02:00
Michel Dänzer
8cfcf9973c EXA: Migrate out pixmap in exaPrepareAccess.
Also fix exaFinishAccessGC not to use the same index for tile and stipple.
2007-09-07 18:41:29 +02:00
Dave Airlie
e510a77ba4 EXA: Add a couple of missing exaPrepare/FinishAccess calls. 2007-09-07 18:41:29 +02:00
Eamon Walsh
4017d31902 devPrivates rework: since API is already broken, switch everything
over to new system.

Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
2007-08-28 09:28:25 -04:00
Adam Jackson
ae7f71a8b3 Implement core protocol backing store exclusively in terms of Composite.
Composite's automatic redirection is a more general mechanism than the
ad-hoc BS machinery, so it's much prettier to implement the one in terms
of the other.  Composite now wraps ChangeWindowAttributes and activates
automatic redirection for windows with backing store requested.  The old
backing store infrastructure is completely gutted: ABI-visible structures
retain the function pointers, but they never get called, and all the
open-coded conditionals throughout the DIX layer to implement BS are gone.

Note that this is still not a strictly complete implementation of backing
store, since Composite will throw the bits away on unmap and therefore
WhenMapped and Always hints are equivalent.
2007-08-25 15:08:20 -04:00
Michel Dänzer
5d9e2c2821 EXA: Improve ShmPutImage.
Share as much code with exaPutImage as possible, and fall back to fbShmPutImage
when that fails.
2007-08-24 14:03:14 +02:00
Fredrik Höglund
daee59b170 EXA: Wrap Trapezoids to prevent excessive migration of the alpha pixmap.
miTrapezoids creates an alpha pixmap and initializes the contents
using PolyFillRect, which causes the pixmap to be moved in for
acceleration. The subsequent call to RasterizeTrapezoid won't be
accelerated by EXA, which causing the pixmap to be moved back out
again.

By wrapping Trapezoids and using ExaCheckPolyFillRect instead of
PolyFillRect to initialize the pixmap, we avoid this roundtrip.
2007-08-16 23:49:07 +02:00
Carl Worth
a2af34d5a8 Use per-screen Pixmaps for glyphs
Instead of system-memory data which prevents accelerated
compositing of glyphs, (at least without forcing an upload
of the glyph data before compositing).
2007-08-02 22:49:56 -07:00
Michel Dänzer
cc648e609d EXA: Export ExaOffscreenMarkUsed.
Can be used to inform EXA that an offscreen area is used outside of EXA.
2007-05-22 10:51:56 +02:00
Michel Dänzer
a261e13250 EXA: Remove DrawableDirty.
Convert the remaining callers to PixmapDirty.
2007-04-29 23:49:35 +02:00
Michel Dänzer
567f18a09b EXA: FillRegion{Solid,Tiled} improvements.
* Support planemasks, different ALUs and arbitrary tile origin.
* Leave damage tracking and non-trivial fallbacks to callers.
* Always migrate for fallbacks.

This is in preparation for using these from more other functions.
2007-04-29 23:46:49 +02:00
Michel Dänzer
d3f8667341 EXA: Fix exaEnableDisableFBAccess for nested disables and enables. 2007-04-29 23:44:27 +02:00
Eric Anholt
7a12952fd4 Bug #7639: Only swap out pixmaps (rather than everything) on VT switch in EXA.
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.
2007-01-24 13:34:58 -08:00
Eric Anholt
cfbc7379f0 Export exaMove{In,Out}Pixmap(). 2006-12-28 13:15:11 -08:00
Michel Dänzer
9563b2eea2 EXA: Lots of damage tracking fixes.
Mostly due to exaDrawableDirty() now calculating the backing pixmap coordinates
internally, for cases where they aren't trivially known. There's a new
exaPixmapDirty() function for the other cases.
2006-12-19 18:57:22 +01:00
Michel Dänzer
4334860e69 Merge branch 'master' into exa-damagetrack
Conflicts:

	exa/exa_accel.c
	exa/exa_migration.c
2006-12-19 16:29:26 +01:00
Eric Anholt
48c871564d Move EXA_PM_IS_SOLID() to the public API, since drivers will want it frequently. 2006-06-26 15:57:32 +02:00
Michel Dänzer
f9f33b72e3 Track per-drawable damage to minimize UTS and DFS transfers.
Based on work by Eric Anholt.
2006-06-12 20:19:11 +02:00
Eric Anholt
8738bc295b Improve EXA fallback debugging output to include the locations of pixmaps.
This is being used in tracking down recent compositing performance
    regressions.
2006-04-27 20:27:27 +00:00
Eric Anholt
074dc9a023 Add an option to verify at the point of migration that pixmaps which aren't
marked dirty are in fact not dirty. This will hopefully help catch
    issues like the previous commit. Leave it on in fakexa.
2006-04-25 16:47:23 +00:00
Eric Anholt
b17a4de83e Add a new migration scheme, called "Smart" for lack of a better name. This
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-04-18 19:14:07 +00:00
Eric Anholt
5f95146fcf Export exaPrepare/FinishGC to the rest of EXA, and use it in the ImageGlyph
implementation to avoid unprepared access to the tile. Also, relocate
    the fbGetDrawable to avoid using a stale dest pointer after
    exaSolidBoxClipped() may have migrated it. Revealed by xtest.
2006-04-01 22:35:16 +00:00
Eric Anholt
c720ffe875 Use fb's depth-to-planemask computation, which doesn't suffer from getting
a 1 planemask at depth 32. Fixes Get/PutImage xtest tests.
2006-04-01 22:17:44 +00:00
Eric Anholt
2e38fedd29 Add an option to EXA for the DDX to request that EXA hide the pixmap's
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-31 19:41:28 +00:00
Eric Anholt
759033703c Remove the exaAsyncPixmapGCOps mostly-unaccelerated ops vector, and always
plug in the accelerated one, even if the destination pixmap is
    currently offscreen. This was a leftover from when kaa originally got
    accelerated offscreen pixmap support, and its only concievable use was
    to avoid a little overhead on ops to in-system pixmaps that weren't
    going to get migrated. At this point, we probably care more about just
    getting everything accelerated that we easily can, which should happen
    with the new migration support.
2006-03-30 21:44:36 +00:00