Commit Graph

152 Commits

Author SHA1 Message Date
Eric Anholt
50e2ff9a25 Remove the waitSync from KdDisableScreen and push it off to drivers'
disableAccel hook, which is more correct anyway. This makes kdrive.c
    not have any knowledge of kaa, opening the way for using exa from
    kdrive.
2006-02-15 03:20:55 +00:00
Benjamin Herrenschmidt
2dc7b5e0d9 Move call to xf86WrapperInit() to OsVendorInit() in xf86Init.c and remove
stubs in other DDX.
2006-02-13 04:43:40 +00:00
Eric Anholt
5f45776ef3 Add missing HAVE_DIX_CONFIG_H which caused issues with mismatched screen
structure interpretations, and remove a bunch of unused junk from
    kdrive-config.h. Xephyr almost works on my amd64.
2006-02-12 10:30:47 +00:00
Eric Anholt
4fafba61d5 Remove libcwrapper damage from GLX (requires fresh Mesa HEAD), and get it
compiling in kdrive.
2006-02-11 03:03:45 +00:00
Eric Anholt
efc3fab7f4 Make kdrive (i.e. Xephyr only) buildable on FreeBSD and probably other OSes
without linux VT switching, fbdev, and vm86 support.
2006-02-10 07:52:05 +00:00
Adam Jackson
49a9249239 Make kdInputMachine static const, shrinks .data a bit. 2005-12-29 21:11:41 +00:00
Adam Jackson
05c139d4cd Enough build fixes to get {sdl,ephyr,fake} to link. 2005-12-28 10:02:54 +00:00
Adam Jackson
7fd73d2953 Build fixes: XSERVER_LIBS -> KDRIVE_LIBS, config.h -> kdrive-config.h 2005-12-27 08:29:50 +00:00
Keith Packard
a11ce76b06 Build with modular X.org libraries and headers.
composite/compwindow.c Don't damage unmoved windows. Let border clip reset
    leave damage alone, pending actual damage for painting.
2005-08-08 06:25:21 +00:00
Damien Ciabrini
c48f631cdb Fix offset alignment code in the offscreen memory allocator to prevent
textures from being allocated in the next free memory area.
2005-07-06 13:57:41 +00:00
Lars Knoll
d8a98454e3 Add support for gradients and solid fills to Render.
Changed the semantics of the Convolution filter a bit. It now doesn't try
    to normalize the filter values but leaves this to the client. This
    gives more reasonable behaviour in the limit where the filter
    parameters sum up to 0.
2005-06-29 11:57:16 +00:00
Eric Anholt
75065f3a54 Perform a warnings sweep on hw/kdrive. A number of these were my fault, but
some come from others.
2005-06-09 23:22:55 +00:00
Eric Anholt
545c082cf9 - Replace the syncAccel hook in the kdrive structure with a pair of hooks
in the kaa structure: markSync and waitMarker. The first, if set,
    returns a hardware-dependent marker number which can then be waited for
    with waitMarker. If markSync is absent (which is the case on all
    drivers currently), waitMarker must wait for idle on any given marker
    number. The intention is to allow for more parallelism when we get
    downloading from framebuffer, or more fine-grained idling.
- Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and
    kaaWaitSync. These will need to be refined when KAA starts being smart
    about using them. Merge kpict.c into kasync.c since kasyn.c has all the
    rest of these fallback funcs.
- Restructure all drivers to initialize a KaaInfo structure by hand rather
    than statically in dubious order.
- Whack the i810 driver into shape in hopes that it'll work after this
    change (it certainly wouldn't have before this). Doesn't support my
    i845 though.
- Make a new KXV helper to avoid duplicated code to fill the region with
    the necessary color key. Use it in i810 and mach64 (tested).
2005-06-09 10:44:45 +00:00
Keith Packard
b4b27e9eaa Force DPMS normal on screen enable
Add placeholder for bit used to redirect input
Add macrovision register defines
2005-02-28 20:45:15 +00:00
Keith Packard
db2c83551c hw/kdrive/ati/radeon_composite.c Support linear filtering
Change how touch screens work -- make them just another 'mouse' device. Add
    unfinished (and unused) code to accelerate tiled fills.
2005-02-08 22:43:54 +00:00
Eric Anholt
6eaca06dac Fix a leak of a region when the driver's CheckComposite fails. 2005-01-25 01:40:18 +00:00
Keith Packard
d7263b11f0 Reinitialize offscreen memory before enabling cursor on VT switch-to 2005-01-20 20:51:27 +00:00
Phil Blundell
36d9e01c0d New global variable. (KdProcessArgument): Set it to TRUE on -nozap switch.
(KdUseMsg): Add help for -nozap and -rgba switches.
Declare.
Honour dontZap flag.
2004-11-13 16:41:00 +00:00
Phil Blundell
258c9016a0 Block SIGIO before disabling input fds. (KdEnableInput): Unblock it after
enabling them again.
2004-10-20 18:02:32 +00:00
Eric Anholt
396100dd23 - Don't require Imrecise mode for Trapezoid acceleration. It looks like we
might be able to do Precise in hardware, so leave it up to the driver.
- Add a helper function for computing a set of offsets for smooth trapezoid
    rasterizing using many sharp trapezoids.
2004-09-11 09:23:12 +00:00
Eric Anholt
6ec9ecd591 Add a set of three hooks for accelerating trapezoids, and use it for the
RasterizeTrapezoid screen function. These hooks will be called for
    imprecise, non-sharp trapezoids with A8 destinations.
Note that the current main consumer of trapezoids, cairo, is requesting
    precise, sharp trapezoids by not changing the default Picture
    attributes, but gets non-sharp effects in software because fb bases its
    choice of sharp/non-sharp on the mask format being A8 vs A1, and cairo
    asks for A8. Follow fb's (poor?) example by ignoring the sharp setting
    and basing the choice off of the mask being A8.
2004-08-30 22:16:46 +00:00
Eric Anholt
ccaf332ce3 Rather than initially place pixmaps in framebuffer based on a size
heuristic, delay the decision until the first
    kaaPixmapUse{Screen|Memory}, and put it in framebuffer if UseScreen was
    called. Provides a significant improvement in cairo speeds (100%
    speedup in cairogears here) and is likely to improve text performance
    as well.
2004-08-30 16:43:10 +00:00
Keith Packard
f15f881727 Eliminate bogus rate check in fbdevModeSupported. Hmm. Potentially bogus
rate selection necessary for Mac fbdev
Don't know about fb changes to pixmaps, so can't track dirt.
Add Mac specific 1280x854 mode. Warn when requested mode isn't found.
Add ability to soft-boot video cards.
Add region expand request. FIXME: need test cases
2004-07-26 17:14:27 +00:00
Eric Anholt
aeb78eaa98 Commit the rest of the dirty optimization from 20040703 and add a missing
header include. I don't know how this happened, but I'm going to blame
    a "few" fscks having happened between testing the code and committing
    (due to other driver changes that made me not blame dirty for the
    failures I saw) for disappearance of kasync.c changes. Fixes a lot of
    corruption.
2004-07-08 08:21:25 +00:00
Eric Anholt
b467673528 Remove duplicate protos in kdrive.h. 2004-07-08 06:57:58 +00:00
Carlos Romero
f96ef08d48 Initial kdrive XKB/XINPUT support, use --enable-xkb --enable-xinput 2004-07-07 19:21:07 +00:00
Eric Anholt
0207015669 Add a "dirty" flag to the pixmap private. Clear it when setting up an
offscreen pixmap area, and set it when any rendering occurs. When
    moving a pixmap out of offscreen, don't read data back if it wasn't
    dirtied (compared to the system memory copy).
2004-07-03 09:16:30 +00:00
Eric Anholt
d5db59bd79 Add an offscreen area scoring to improve choosing offscreen areas to kick
out when allocation can't find a free area of the requested size. When
    offscreen pixmaps get used, the offscreen area's score is increased by
    a constant value. Every certain number of increases, all offscreen area
    scores get decreased by a fraction. When choosing a set of areas to
    remove for a new allocation, the set of areas with the smallest total
    score is chosen for removal. While this is not the smartest system, it
    prevents things like always removing the first offscreen area in memory
    (likely the most recent) to be kicked out when doing replacing.
2004-06-29 20:37:51 +00:00
Eric Anholt
4ffde8a6b3 - Pass the right pixel mask (all ones) in to PrepareSolid in the
solid-fill-based composite acceleration.
- Use a real pixmap when doing an UploadToScratch (For pDrawable->type ==
    DRAWABLE_WINDOW, you need to get the backing pixmap).
- Pass back the x/y offsets from kaaGetOffscreenPixmap unconditionally,
    because they'll be used in the scratch case.
- Turn on the Render acceleration for Rage 128 and Radeon 100-series at
    last!
2004-06-10 19:22:58 +00:00
Keith Packard
f8a1dd3ce7 Add top-level build support for GL X server (not working yet)
Fix a few allocation bugs with alternate visual ids Allow for non-8/8/8
    alternate visuals
Turn off any existing shadow before enabling it again (avoids
    re-registering existing damage)
Add some validation code to catch re-registered damages
2004-06-04 16:10:50 +00:00
Keith Packard
932efe8e6d Allow for multiple composite-based visuals, then add an RGB24 visual in
addition to the ARGB32 one. This allows 'glitz' to run on top of any X
    server using mesa.
Switch to using 32bpp for depth 24 pixmaps (even when the frame buffer is
    not depth 24).
2004-05-21 03:32:27 +00:00
Keith Packard
b9d920f3dc Fix SYNC_ALWAYS (debugging) code to use mach64WaitIdle instead of
KdCheckSync -- the boolean used in the latter won't be set yet.
Oops. == instead of =.
Must sync hardware before rasterizing trapezoids in case the mask is in
    off-screen memory and has just been erased. Yes, it is silly to place
    masks in off-screen memory. That's a separate issue.
2004-05-20 05:27:03 +00:00
Keith Packard
94648799c8 Pin header-only pixmaps in memory.
Off-screen reallocation could have used a stale pointer.
Separate framebuffer mapping computation from actual frame buffer mapping.
    Now map the frame buffer from vesaEnable so that VT switch shares the
    same mapping code. This makes sure any shadow framebuffer is allocated
    again.
2004-05-20 02:42:20 +00:00
Eric Anholt
834537e212 Make kaaMoveInPixmap public. This will be used by the ATI driver's xvideo
support to ensure that the destination is in framebuffer.
2004-05-17 07:19:49 +00:00
Eric Anholt
85f46e0bcd Add new CheckComposite hook. This allows a driver to avoid the migration of
pixmaps for a Composite operation if the operation can't be supported.
    This hook is optional.
2004-05-17 07:14:23 +00:00
Eric Anholt
74b2a76947 Add new flag, KAA_OFFSCREEN_ALIGN_POT, which tells KAA to align pixmap
pitches to a power-of-two number of bytes. Useful for Render
    acceleration on older cards.
2004-05-14 00:34:28 +00:00
Eric Anholt
2bea33e881 Don't let the visible screen get "migrated" offscreen, which manifests
itself as a hang.
Reported by: Ginokas <ginokas@free.fr>
2004-05-14 00:27:29 +00:00
Eric Anholt
40354e7618 Add generic functions for copying packed/planar XV data, copied from
mach64.
2004-05-13 22:57:15 +00:00
Eric Anholt
2e330e980f Move fourcc.h to a generic location in src/. 2004-05-13 21:41:48 +00:00
Warren Turkal
a27ffd2678 completely get rid of NeedNestedPrototypes
completely get rid of NeedVarargsPrototypes
remove a lot of NeedFunctionPrototypes
ansify many function declarations
2004-02-18 02:12:44 +00:00
Warren Turkal
b146ef1548 Moving toward a working input extension. 2004-02-15 15:04:57 +00:00
Jaymz Julian
bd20c8d340 Polling input mode for the kdrive os layer. And a moose! 2004-02-05 09:09:51 +00:00
Jaymz Julian
af798d2774 More NULL checks. These ones are more useful than the last (which just made
debugging a bunch of problems easier), since you can implement less in
    the basic simplest case driver now (not that i'm lazy, mind :-p)
2004-02-04 16:08:27 +00:00
Anders Carlsson
a265167f19 Add IPAQ modeline by Dennis Noordsij. 2004-01-14 10:00:00 +00:00
Eric Anholt
5d51dfc69c Use the scratch area for Composite when one of src or dst is in memory. 2004-01-09 08:40:32 +00:00
Eric Anholt
b27729ec88 - Add a new UploadToScratch kaa hook for putting the data for a single
pixmap into temporary offscreen storage. Subsequent UploadToScratch may
    clobber the data of previous ones. This allows hardware acceleration of
    composite operations on glyphs.
- Add a new UploadToScreen kaa hook for doing the actual moving of data to
    framebuffer. This would allow us to do things like hostdata blits or
    memcpy to agp and then blit.
- Add an UploadToScreen on ATI which is just memcpy, but which will be
    replaced with a hostdata blit soon.
- Add UploadToScratch on ATI and reserve 64k of scratch space. This
    provided a 3x speedup of rgb24text on my Radeon.
2004-01-08 08:16:24 +00:00
Eric Anholt
cff782078c - Don't forget to UNINIT miComputeCompositeRegion's regions
- Fix a bit of whitespace nearby.
2004-01-04 20:51:53 +00:00
Eric Anholt
9f1a92cd09 - Call appropriate Done function for Composite.
- Don't allow src transforms for Copy acceleration.
- Minor whitespace fixes.
2004-01-03 21:52:14 +00:00
Eric Anholt
d15acfa79b Split the various attempts at accelerating Composite into separate
functions. Along with making things more readable, it fixes a problem
    where the coordinates would get messed up if acceleration failed due to
    things like pixmaps being in the wrong locations.
2004-01-03 11:25:27 +00:00
Eric Anholt
1e1a35e20c Actually align the offset of allocated offscreen areas. 2004-01-03 11:17:44 +00:00