Commit Graph

181 Commits

Author SHA1 Message Date
Maarten Maathuis da8ea41a54 exa: increase/rework safety checks in Prepare/FinishAccess. 2009-03-04 16:51:09 +01:00
Maarten Maathuis 10334cf7e6 exa: simplify exaPixmapIsOffscreen
- This includes properly handling the framebuffer.
2009-03-04 16:51:09 +01:00
Maarten Maathuis 7bfad37f77 exa: fixup aux indices and ensure that the indices are used as they should be.
- 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-27 22:26:52 +01:00
Maarten Maathuis ed00515ec5 exa: fixup exaAssertNotDirty.
- Do the right thing based on prepare access.
2009-02-27 17:11:35 +01:00
Michel Dänzer 4cfb36f6ad EXA: Handle separate alpha maps properly in Composite fallback, take two.
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-27 16:37:28 +01:00
Michel Dänzer b26c136ee9 EXA: Stop tracking damage for pixmaps subject to ModifyPixmapHeader.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-26 10:35:44 +01:00
Maarten Maathuis 3175646b10 exa: exaPixmapDirty should use official damage functions.
- Otherwise other users will not be notified of damage.
2009-02-17 19:25:35 +01:00
Maarten Maathuis 46eeaf82e2 exa: fix performance regression from 736b6fbd2c
- 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-16 17:41:51 +01:00
Maarten Maathuis 1cb5afdf1e dix: always NULL pGC->tile.pixmap in Create{Scratch}GC. 2009-02-08 18:59:17 +01:00
Maarten Maathuis 6fd8fe9cb9 exa: fix exaValidateGC.
- 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-08 18:43:15 +01:00
Maarten Maathuis 6fabf24949 exa: use proper wrapping in exa.c 2009-02-06 18:42:38 +01:00
Maarten Maathuis 015c99a4ad exa: properly wrap GC functions 2009-02-06 18:42:38 +01:00
Maarten Maathuis 5e6a06fe69 exa: add GC private 2009-02-06 18:42:38 +01:00
Maarten Maathuis 3534a5e5d9 exa: Allow drivers to set non-NULL devPrivate.ptr for !offscreen pixmaps. 2008-12-26 16:38:27 +01:00
Maarten Maathuis 1567b7243f exa: A more correct fix. 2008-12-21 00:08:56 +01:00
Maarten Maathuis 2db7b66863 exa: a few cleanups
- Some warnings silenced.
- Some whitespace cleanup.
2008-12-19 23:12:37 +01:00
Paulo Cesar Pereira de Andrade 49f77fff14 Rework symbol visibility for easier maintenance
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-12-03 05:43:34 -02:00
Paulo Cesar Pereira de Andrade d6cbd4511e Export symbols defined in the sdk.
This is the biggest "visibility" patch. Instead of doing a "export"
symbol on demand, export everything in the sdk, so that if some module
fails due to an unresolved symbol, it is because it is using a symbol
not in the sdk.

  Most exported symbols shouldn't really be made visible, neither
advertised in the sdk, as they are only used by a single shared object.

  Symbols in the sdk (or referenced in sdk macros), but not defined
anywhere include:
XkbBuildCoreState()
XkbInitialMap
XkbXIUnsupported
XkbCheckActionVMods()
XkbSendCompatNotify()
XkbDDXFakePointerButton()
XkbDDXApplyConfig()
_XkbStrCaseCmp()
_XkbErrMessages[]
_XkbErrCode
_XkbErrLocation
_XkbErrData
XkbAccessXDetailText()
XkbNKNDetailMaskText()
XkbLookupGroupAndLevel()
XkbInitAtoms()
XkbGetOrderedDrawables()
XkbFreeOrderedDrawables()
XkbConvertXkbComponents()
XkbWriteXKBSemantics()
XkbWriteXKBLayout()
XkbWriteXKBKeymap()
XkbWriteXKBFile()
XkbWriteCFile()
XkbWriteXKMFile()
XkbWriteToServer()
XkbMergeFile()
XkmFindTOCEntry()
XkmReadFileSection()
XkmReadFileSectionName()
InitExtInput()
xf86CheckButton()
xf86SwitchCoreDevice()
RamDacSetGamma()
RamDacRestoreDACValues()
xf86Bpp
xf86ConfigPix24
xf86MouseCflags[]
xf86SupportedMouseTypes[]
xf86NumMouseTypes
xf86ChangeBusIndex()
xf86EntityEnter()
xf86EntityLeave()
xf86WrapperInit()
xf86RingBell()
xf86findOptionBoolean()
xf86debugListOptions()
LoadSubModuleLocal()
LoaderSymbolLocal()
getInt10Rec()
xf86CurrentScreen
xf86ReallocatePciResources()
xf86NewSerialNumber()
xf86RandRSetInitialMode()
fbCompositeSolidMask_nx1xn
fbCompositeSolidMask_nx8888x0565C
fbCompositeSolidMask_nx8888x8888C
fbCompositeSolidMask_nx8x0565
fbCompositeSolidMask_nx8x0888
fbCompositeSolidMask_nx8x8888
fbCompositeSrc_0565x0565
fbCompositeSrc_8888x0565
fbCompositeSrc_8888x0888
fbCompositeSrc_8888x8888
fbCompositeSrcAdd_1000x1000
fbCompositeSrcAdd_8000x8000
fbCompositeSrcAdd_8888x8888
fbGeneration
fbIn
fbOver
fbOver24
fbOverlayGeneration
fbRasterizeEdges
fbRestoreAreas
fbSaveAreas
composeFunctions
VBEBuildVbeModeList()
VBECalcVbeModeIndex()
TIramdac3030CalculateMNPForClock()
shadowBufPtr
shadowFindBuf()
miRRGetScreenInfo()
RRSetScreenConfig()
RRModePruneUnused()
PixmanImageFromPicture()
extern int miPointerGetMotionEvents()
miClipPicture()
miRasterizeTriangle()
fbPush1toN()
fbInitializeBackingStore()
ddxBeforeReset()
SetupSprite()
InitSprite()
DGADeliverEvent()

  SPECIAL CASES
o defined as _X_INTERNAL
	xf86NewInputDevice()
o defined as static
	fbGCPrivateKey
	fbOverlayScreenPrivateKey
	fbScreenPrivateKey
	fbWinPrivateKey
o defined in libXfont.so, but declared in xorg/dixfont.h
	GetGlyphs()
	QueryGlyphExtents()
	QueryTextExtents()
	ParseGlyphCachingMode()
	InitGlyphCaching()
	SetGlyphCachingMode()
2008-11-29 23:56:06 -02:00
Paulo Cesar Pereira de Andrade 31285d063e Make visible symbols required by xorg modules.
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-11-28 01:55:11 -02:00
Keith Packard 8767fc8d47 Wrap AddTraps in exa and damage.
This fine (and unused) function wasn't ever wrapped which made it not work
under exa.

(cherry picked from commit 06e7e1d048)
2008-10-23 09:56:45 -04:00
Dave Airlie 5bf3f0fd4e exa: make sure pixmap devPrivate.ptr is NULL at create time 2008-09-26 08:59:30 +10:00
Julien Cristau b4762c0245 exa: disable shared pixmaps
They got re-enabled in ee7c684f21
("Reimplement ShmPutImage.")
2008-09-16 17:13:42 +02:00
Dave Airlie 0466b8811c exa: drop cw.h inclusion
this doesn't seem to be needed, at least I can't see any warning without it.

I'd like to build EXA into a driver and cw.h isn't exported
2008-09-01 09:57:25 +10:00
Maarten Maathuis 1861250cd7 {damage,exa}: sanitise damage
- Redo damage naming for more consistency.
- Call post submission functions only where appropriate.
- EXA can now live without it's odd damage workarounds.
2008-08-29 22:15:23 +02:00
Tomas Carnecky ebea78cdba Prepare for array-index based devPrivates.
TODO: static indices can be made just an int; some indices
can be combined.
2008-08-28 18:05:40 -04:00
Adam Jackson ee7c684f21 Reimplement ShmPutImage.
There's no reason to not just dispatch this straight into the GC.  As a
bonus, if you do so, damage wraps correctly, and thus swcursor works.
The side effect is it's no longer possible to override ShmPutImage with
ShmRegisterFuncs().

Also remove the (broken) damage tracking for same from EXA, since it didn't
work right, and is now superfluous.
2008-08-28 10:12:28 -04:00
Michel Dänzer f227fbf74f EXA: Inline Prepare/FinishAccessWindow into only caller, ChangeWindowAttributes.
Also check the requested mask in addition to the GC state before doing work.
2008-08-19 11:36:12 +02:00
Michel Dänzer 825b3fe11d EXA: Don't use exaGlyphs if the driver doesn't provide a PrepareComposite hook.
It's buggy without Composite acceleration (leading to cropped glyphs) and not
really useful in that case anyway. The bug probably still needs to be found and
fixed for drivers that provide a PrepareComposite hook but can't accelerate
text rendering though.
2008-08-19 11:22:40 +02:00
Maarten Maathuis 421b7e8f12 exa: fix assert logic thinko from 361a9eb953
- I guess failing PrepareAccess is rare, since this a 3 year old bug.
2008-08-17 19:57:02 +02:00
Michel Dänzer 4212599c92 EXA: Make sure damage tracking code is inactive if the driver manages pixmaps.
It was always supposed to be like that... It was only recently pointed out (in
a rather convoluted way) that it was not in fact the case.
2008-08-08 12:17:58 +02:00
Daniel Stone e882ee7056 EXA: Remove unnecessary #includes
There wasn't actually any font code here, so no problem.
2008-08-05 01:17:32 +03:00
Alan Hourihane 528b4e36ad Set driverPriv immediately on CreatePixmap.
If it's NULL anyway, we bail, if not, it lets
ModifyPixmapHeader know about the private.
2008-06-18 22:34:02 +01:00
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 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
Tilman Sauerbeck 26c1801a27 EXA: Update sys_pitch/fb_pitch in exaModifyPixmapHeader.
exaModifyPixmapHeader now also only evaluates arguments that have a
meaningful value.
2008-04-21 23:07:39 +02:00
Tilman Sauerbeck f133d85778 EXA: Update pixmaps' accel_blocked field in ModifyPixmapHeader. 2008-04-14 12:48:13 +02:00
Eamon Walsh 2d17f47cc7 Merge branch 'master' into XACE-SELINUX
Conflicts:

	hw/xnest/Pixmap.c
	include/dix.h
2007-11-19 18:10:46 -05:00
Ben Skeggs c89b543198 exa: set driverPriv to NULL before it might get used later with garbage 2007-11-17 18:20:49 +10:00
Eamon Walsh a52c9b2a59 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/dispatch.c
	dix/property.c
	hw/xfree86/common/xf86VidMode.c
	include/xkbsrv.h
	render/glyph.c
	xkb/xkbActions.c
2007-11-05 19:08:36 -05:00
Aaron Plattner f2e310132f Add CreatePixmap allocation hints.
These hints allow an acceleration architecture to optimize allocation of certain
types of pixmaps, such as pixmaps that will serve as backing pixmaps for
redirected windows.
2007-11-04 16:11:28 -08: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
Eric Anholt 4b14c9a9cd Replace calls to Glyphs screen hook with CompositeGlyphs and remove dead code.
Not all of the DDX/miext Glyphs hook implementations have been removed, but
they should be.
2007-10-19 16:34:54 -07:00
Eamon Walsh c3f7b86255 Merge branch 'master' into XACE-SELINUX
Conflicts:

	os/access.c
2007-10-17 15:00:54 -04:00
Dodji Seketeli 6aab6a6e2a EXA: dude, don't validation driver hooks twice ! 2007-10-08 13:25:38 +02:00
Dodji Seketeli 604ebb5a6d Merge Xephyr-XV/GL stuff into master 2007-10-03 16:14:08 +02:00
Dave Airlie 566dd3b7d7 exa: add new flags to denote driver handles all pixmap migration/hiding 2007-10-03 12:01:37 +10:00
Dave Airlie 1df1fee82d exa: make sure we set fb_ptr to NULL 2007-10-03 11:56:04 +10:00
Dodji Seketeli 95fadbd402 Add basic Exa driver entry point validation.
In exaDriverInit(), quickly check if the programmer forgot to set some
mandadory driver hooks, in that case display a meaningful error message.
2007-10-02 16:45:01 +02:00
Kristian Høgsberg f15af2ae60 exa: only setup offscreen allocator if driver doesn't provide CreatePixmap 2007-10-02 14:03:48 +10:00
Dave Airlie ffb58f4fa8 exa: add hooks for drivers to take over pixmap allocation
This adds hooks for the driver to access Create/DestroyPixmap and ModifyPixmapHe
ader.

It allocates a 0 sized pixmap using fb and calls the driver routine to do
work of allocating the actual memory.

ModifyPixmapHeader is mainly required for hooking the screen pixmap which
isn't create by normal methods
2007-10-02 14:03:39 +10:00
Dave Airlie 31555af000 exa: add a pixmap private pointer for drivers to retrieve. 2007-10-02 13:57:55 +10:00
Tilman Sauerbeck cfe549d1ba EXA: Added back the maxPitchPixels initialization code.
This doesn't add real value yet, but it will be useful once I add code
that splits large render operations into smaller parts if necessary.
2007-09-27 22:36:52 +02:00
Michel Dänzer 6d5c1e0d89 EXA: Remove bogus pitch checks.
exaCreatePixmap should handle all cases correctly.
2007-09-27 13:35:23 +02: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
Tilman Sauerbeck edd8817083 EXA: Check ABI compatibility earlier.
If the driver isn't compatible to the server, all bets are off anyway wrt
the contents of the fields that we're validating, which can lead to bogus
error messages.
2007-09-22 13:52:56 +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 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
Eric Anholt bc2d516f16 Fix overly-restrictive integer overflow check in EXA pixmap creation.
The result was that at 32bpp, pixmaps of width 8192 or greater couldn't be
created, due to treating a pitch value as a width.
2007-08-22 08:59:10 -07: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
Dodji Seketeli 5657fb065c exaDriverInit: Fail if pScreenInfo or a member of it is invalid.
EXA may attempt to use the invalid value and crash otherwise.
2007-07-17 12:12:02 +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
Thomas Hellstrom f8482967ae Add an EXA driver callback to determine whether a pixmap is
"offscreen" in exa terms, which means accessible to the GPU.
Bump exa minor. The change is backwards-compatible.
2007-04-04 14:04:52 +02:00
Eric Anholt 6ed08949af Move libcw setup to the only renderer requiring it (XAA).
Additionally, protect libcw setup behind checks for Render, to avoid
segfaulting if Render isn't available (xnest).

The previous setup was an ABI-preserving dance, which is better nuked now.
Now, anything that needs libcw must explicitly initialize it, and
miDisableCompositeWrapper (previously only called by EXA and presumably binary
drivers) is gone.
2007-03-27 17:31:28 -07:00
Eric Anholt 083b790515 Switch the default migration heuristic for EXA to "always".
This has been what has been used the most successfully post-damagetrack.
The current thinking is that:
1) We should be able to accelerate basically everything.  So we don't need to
   try to migrate trees of pixmaps permanently out of framebuffer to speed
   CPU drawing up.
2) Migration is cheaper in the thrashing case, so we don't want to go to a lot
   of effort to try (and fail badly) to find a working set.
2006-12-28 13:21:25 -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 6b1e354dbb EXA: Disable SHM pixmaps.
See https://bugs.freedesktop.org/show_bug.cgi?id=6772 .
2006-12-19 15:24:19 +01:00
Michel Dänzer 7e4717683d exaDrawableDirty: Fix initialization of BoxRec.
This will hopefully fix the partial window corruption experienced by some
people.
2006-10-15 18:12:28 +02:00
Daniel Stone 68b0678254 exa: only disable cw when COMPOSITE is built 2006-07-21 15:18:20 -04:00
Jens Granseuer 179737d4a0 Bug 7145: fix build with gcc 2.95 & other c89 compilers
Move variable declarations to start of blocks as required by c89
2006-06-30 15:56:40 -07:00
Michel Dänzer 930b9a069a Bug #6818: Avoid infinite loop in exaLog2() with negative arguments. 2006-06-24 15:21:17 +02:00
Eric Anholt 6aaf0e5b58 Add options to disable EXA acceleration for Composite/UTS/DFS, and always print
out how much memory EXA is managing for offscreen pixmaps.
2006-06-18 19:47:51 -07: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 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 6afa814ab1 Pull out fb's tile handling during fbValidateGC so we can do the necessary
exaPrepare/FinishAccess()es. Revealed by xtest with fakexa.
2006-04-01 23:28:17 +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
Eric Anholt 14aafc258c Change EXA so that exaMoveOutPixmap() retains the framebuffer copy of the
pixmap, and damage is tracked so that a later exaMoveInPixmap won't
    result in an upload if no upload is necessary. This will likely improve
    the performance of the "Always" migration scheme significantly, and is
    a step in the path to more exact damage tracking between framebuffer
    and system memory.
2006-03-16 18:43:55 +00:00
Eric Anholt c1601717d5 Add a new migration scheme, "always", which will move pixmaps to their
desired location always (unless they don't fit in FB, in which case
    they all get moved out for software rendering). The default remains as
    before, but can be controlled by the MigrationHeuristic xorg.conf
    option (which is intentionally not documented, as it may be
    short-lived). This is part of the exa-damagetrack work, which appears
    stable in testing with fakexa, unlike the work as a whole.
2006-03-15 01:20:08 +00:00
Eric Anholt a90cff266c Add more doxygen documentation, including notes on WaitMarker() and
MarkSync() that I noticed were needed while reading the VIA driver.
2006-03-15 00:13:52 +00:00
Eric Anholt 693e42114f Move migration logic to a new function, exaDoMigration(). This is largely a
manual conversion to allow for different migration schemes to be
    implemented reasonably, but does include some minor improvements such
    as accounting for pinned pixmaps not being acceleratable, and for our
    current GetImage and GetSpans not being accelerated.
2006-03-14 21:30:12 +00:00
Eric Anholt 5b1a7b478f Move the exaDrawableDirty in exaPrepareAccess to exaFinishAccess, which is
after the drawing is done. Previously, a failed PrepareAccess could
    have migrated and cleared the dirty flag before the damage was ever
    done.
2006-03-10 21:32:34 +00:00
Eric Anholt ab35c3fbc1 Do a first pass of doxygen documentation of EXA. This removes the
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-09 23:18:15 +00:00
Eric Anholt 2822cbc1fb Rearrange EXA driver structures so that there's a hope of maintaining ABI
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-03-09 06:04:07 +00:00
Jesse Barnes e7f0b84fa7 fix exaInitCard by making it a real function 2006-02-28 05:20:20 +00:00
Eric Anholt dc0354104c Move EXA implementation up to the top level and remove its XFree86
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-16 00:14:11 +00:00
Eric Anholt 5e2a7af23b Move the frequently-repeated code to get the pixmap that backs a drawable
to a new function, exaGetDrawablePixmap().
2006-02-02 21:07:06 +00:00