Commit Graph

480 Commits

Author SHA1 Message Date
Adam Jackson
291e89d4f2 Remove NEED_LINEHELPER BC cruft for pre-R6 DDXes. 2006-04-30 19:16:14 +00:00
Eric Anholt
3d4ca57b69 Add a helper for the Component Alpha Over case, which breaks the operation
down into an OutReverse and an Add. Turn off the fallback to software
    glyphs when component alpha, now that we expect all (new) drivers to be
    able to support it. Also, make Xephyr fall back in the CA Over case to
    exercise this code. This speeds up my rgb24text and ls -lR in
    gnome-terminal by a factor of 5.
2006-04-26 18:27:40 +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
c947d796aa Missed in previous commit: 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:18:43 +00:00
Donnie Berkholz
ba632f697a Fix kdrive build by linking in libexa before KDRIVE_LIBS. 2006-04-17 07:10:31 +00:00
Adam Jackson
b2097b99a2 ../stub 2006-04-02 21:45:03 +00:00
Eric Anholt
ccca76b808 Clean up warnings and a debug printf. 2006-04-01 23:41:23 +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
5c04610f8a Add a dependency on EXA, so it rebuilds when the library does. The manual
indicated I shouldn't do this, but experience indicates I should.
2006-03-30 21:21:59 +00:00
Eric Anholt
3cf46cc1e3 Add an UploadToScreen implementation, for testing PutImage support, and
make the DownloadFromScreen more robust.
2006-03-30 05:15:58 +00:00
Eric Anholt
4bb5ab0b44 Add a DownloadFromScreen implementation, used for testing GetImage
acceleration, and set the migration scheme to Always on init (since
    this is all for testing, and Always should make migration happen more
    frequently than Greedy).
2006-03-29 22:03:18 +00:00
Eric Anholt
d695579848 If fakexa is enabled, create a larger buffer in the Ximage, but keep the
same width/height for front-buffer drawing. The fakexa code then uses
    this extra space for offscreen pixmaps. Note that this tones down the
    absurdity of fakexa's offscreen pixmap alignment requirements (odd
    alignment is too weird, so stick with "24", which is still strange but
    exists out there). It also fixes a couple of bugs in the fakexa
    implementation revealed by using offscreen pixmaps.
2006-03-10 21:36:24 +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
Eric Anholt
b7d2dfc1e5 Add appropriate MIT license. Oops. 2006-03-07 20:06:15 +00:00
Eric Anholt
9d8c0e4bcb Add a new flag to ephyr, "-fakexa", which turns on an EXA acceleration
implementation that calls fb to get its work done. The purpose is to
    have a trusted EXA driver for use with testing changes to the core of
    EXA. However, fakexa has not received much testing yet, lacks offscreen
    pixmaps support, and doesn't reliably provide garbage when EXA doesn't
    get its syncing right. All of these should be fixed soon.
2006-03-07 19:57:46 +00:00
Keith Packard
8987b2c1ef Make more extensions optional in build (for kdrive). Fix kdrive build for
actual hardware. Fix kdrive pointer signed/unsigned types. Add
    kdrive-required YX rotation functions. Replace rgb text file loading
    with static rgb color table.
2006-02-16 07:17:31 +00:00
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
a8cec1b656 Merge from kdrive: use RECT_PRIM to avoid tearing in xvideo. 2006-02-10 09:00:02 +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
Daniel Stone
2949c705f1 Add all subdirs used to DIST_SUBDIRS, and files to EXTRA_DIST.
Attempt to build xeglmodule.c, not xglxmodule.c.
Add xf86Sbus.h to EXTRA_DIST, as _HEADERS doesn't appear to get the same
    treatment as _SOURCES in terms of automatically DISTing.
2006-01-10 03:23: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
27d79ab2bc s/XSERVER/KDRIVE/ 2005-12-27 23:03:15 +00:00
Adam Jackson
72817714a0 Remove Imakefiles. 2005-12-27 23:01:27 +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
Matthew Allum
4220a0c4cc Make Xephyr work without shadow fb 2005-08-05 09:08:32 +00:00
Damien Ciabrini
4047191124 Added hardware support for transformation matrix (zoom, rotation, etc...).
Fixed the composition function for RGB and A8 format. Avoid syncing
    hardware after HW fills or copies.
2005-07-06 15:34:22 +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
Matthew Allum
0929f79c1b Another Xephyr focus/modifier fix 2005-06-30 13:39:00 +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
Matthew Allum
5620122206 Fix issues with focus in and modifiers from host confusing Xephr 2005-06-23 16:50:07 +00:00
Matthew Allum
a668b6c11a redo tslib 2005-06-23 16:34:07 +00:00
David Reveman
2eab094816 Build fixes 2005-06-13 16:38:06 +00:00
Eric Anholt
d24ed90547 Axe a few dead fields from the port priv struct and add my name to the
"Copyright" line of the license to ati_video.c that already has my name
    in the text.
2005-06-10 02:14:44 +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
e11e60b361 Greatly improve the correctness and performance of the MGA render
implementation. Includes cache flushing to prevent bad first reads of
    the framebuffer, fixing blending of many formats, falling back on many
    unsupported operations, and falling back early to prevent migration.
    Passes all of rendercheck except some of the blend (!) tests.
2005-06-09 21:59:26 +00:00
Matthew Allum
92b3775ae8 TSLib fixes. Add fullscreen support to ephyr 2005-06-09 16:22:27 +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
Eric Anholt
c4b3fcda98 Move the draw tracing supplies into ati_draw.h, and do some touchups on it.
(When tracing drawing, I want to know what I'm drawing to, at a
    minimum).
2005-02-21 03:44:10 +00:00
Eric Anholt
de34b0eefc Extend the filter support to R200, and do the check for filter settings in
Check rather than Prepare, to avoid migration of things we won't be
    able to accelerate.
2005-02-21 03:05:55 +00:00
Søren Sandmann Pedersen
35bd81dfec Fri Feb 11 14:28:22 2005 Søren Sandmann <sandmann@redhat.com>
When COMPOSITE is enabled, call CopyWindow even when the pixels "don't
    move" on screen.
Don't reject modes that are not supported by the unused monitor.
2005-02-11 19:38:04 +00:00
Keith Packard
aab9a8dd99 Add initial evdev framework 2005-02-09 03:56:35 +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
5ca5fe7111 Add an OUT_RING_REG macro for use with DMA_PACKET0, which is like OUT_RING
but includes debugging to ensure that the reg being submitted is the
    one that follows in the packet. Convert most uses of OUT_RING to it,
    and convert a couple of OUT_REG sets to DMA_PACKET0/OUT_RING_REG. Also,
    add checking to see if more registers are submitted to a DMA_PACKET0
    than should be, to avoid hangs during stupid mistakes (checking for
    less isn't done).
2005-01-27 05:25:57 +00:00
Eric Anholt
0bd459488b Move the bailing out due to ATIUploadToScreen() being unfinished up
farther, so that the traces aren't as confusing.
2005-01-27 03:52:49 +00:00
Eric Anholt
a973af4a9a Remove an unused field. 2005-01-27 03:50:48 +00:00
Keith Packard
8813898ef6 Fix R100 text by forcing the 3d engine to idle before executing more 3d
commands. Add docs for the ISYNC_CNTL register, which doesn't quite do
    what we want.
2005-01-25 06:04:21 +00:00
Eric Anholt
33155b4fd3 Finish converting RB2D_DSTCACHE to RB3D_DSTCACHE. Remove an extra pixel
cache flush in the idle function. Init an extra reg for r200, and
    annotate the TCL_BYPASS better. Also, clean up some style nits from the
    last commit.
2005-01-25 03:37:05 +00:00
Keith Packard
3b1f1508b1 Add tracing. Hack Radeon cache registers to use 3D addresses. Works on M6 2005-01-25 02:39:48 +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
Eric Anholt
8a1bee8ea9 Silence a warning about uninitialized variable (though it would be). 2005-01-25 01:38:26 +00:00
Keith Packard
d7263b11f0 Reinitialize offscreen memory before enabling cursor on VT switch-to 2005-01-20 20:51:27 +00:00
Eric Anholt
13c6b2f0b6 Add a set of macros for dealing with the repeated code to wait for a while
reading a register/attempting DMA. Now it'll wait for a certain number
    of seconds rather than a certain number of times through the loop
    before deciding that it's timed out and resetting the hardware. Also,
    add more timeout handling, and reset the draw state after resetting the
    engine.
2005-01-20 16:22:04 +00:00
Eric Anholt
dbe45c7159 Use RadeonSwitchTo3D() instead of doing the WAIT_UNTIL ourselves (RST3D()
also does DC_FLUSH, which may be important).
2005-01-20 07:28:02 +00:00
Eric Anholt
fc43c15494 Add R200 XV support, and make R100 (hopefully) use linear filtering instead
of nearest. Also, use RadeonSwitchTo3D instead of doing the WAIT_UNTIL
    ourselves.
2005-01-20 07:09:00 +00:00
Eric Anholt
7775506534 Make R200 PDMA work -- primary queue sizes are now 9 bits, not 8. 2005-01-20 01:09:48 +00:00
Keith Packard
ff433adba3 Prefer 32bpp to 24bpp. Fix 16 color planar mode (!) 2005-01-19 06:35:28 +00:00
Eric Anholt
106703edf6 Back out the previous day's broken R200 "fix" -- the same number of coords
are always emitted. Fix the real problem, which was not enough regs
    being initialized in ati_draw.c. Fix a typo that was resulting in alpha
    coming out as 0 * src or 0 * broken instead of src * 1 or src * mask.
    Assign the blending results to R0, as appears to be necessary. Unbreak
    the dst-alpha-blend-with-no-dst-alpha code. Yow. And set the right DMA
    count for the r200 traps code.
2004-12-22 18:39:41 +00:00
Eric Anholt
fa0677ab43 Fix r200 render (for real this time?) by setting tex1_comp_cnt right for
non-mask rendering. Reenable it. Also, R200TexFormats was used instead
    of R100 in one place. Harmless so far, because the formats were in the
    same order.
2004-12-21 09:51:47 +00:00
Eric Anholt
4b0247b9e0 Whitespace nit. 2004-12-21 09:49:30 +00:00
Matthew Allum
47935dd7f0 Xephyr on Xorg fix 2004-12-06 22:29:31 +00:00
Phil Blundell
2620676306 Patch from Florian Boor <florian.boor@kernelconcepts.de>:
Check return value from ts_config. (TslibInit): Likewise.
2004-12-01 19:43:29 +00:00
Phil Blundell
df2f2ff5a4 Re-read "fix" structure from kernel after mode selection, in case line
pitch has changed.
2004-11-28 23:20:17 +00:00
Matthew Allum
2b75c19ea2 minor Xephyr fix 2004-11-24 17:50:50 +00:00
Matthew Allum
a96254234f XEphyr -parent switch fixes 2004-11-24 17:08:06 +00:00
Phil Blundell
636a9e7868 Don't leave stale pointers hanging around after ts_close(). (TslibFini):
Likewise.
2004-11-13 18:03:16 +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
Matthew Allum
d7f46f71d8 Xephyr grab fix 2004-11-11 14:55:30 +00:00
Matthew Allum
50cdff7ee2 Xephyr improvements 2004-11-09 11:36:49 +00:00
Matthew Allum
81a3b6fe27 Add support to Xephyr for lower depths than hosts 2004-11-08 22:39:47 +00:00
Phil Blundell
e0cc487149 Add epson.
Build Makefile in hw/kdrive/epson.
2004-10-20 18:06:58 +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
Phil Blundell
cbd5fbcb7e Import Epson 13806 driver from Costas Stylianou:
New files.
2004-10-20 08:20:51 +00:00
Eric Anholt
b600fcda38 Fix the R200 Render code. Composite and Trapezoids are now supported just
as well as on R100.
2004-09-20 03:12:00 +00:00
Eric Anholt
90ff3688cd Unbreak the AGP DRI case. That was quite a pile of broken code. 2004-09-19 10:57:31 +00:00
Phil Blundell
0d95bdfbab Only set screen parameters if resolution has changed from current values.
Patch from scoony@noos.fr.
2004-09-14 23:08:10 +00:00
Eric Anholt
ba3b6fd23b Add proper PCI/AGP detection, based on Mike Harris's code for Radeon, but
using the MMIO mirror of the bits instead of config space.
2004-09-14 06:26:54 +00:00
Eric Anholt
80dc84d067 - Fix a segfault on VT switch with DRI. Still dies due to cursor allocation
troubles.
- Move the RemoveBlockAndWakeupHandlers to match
    RegisterBlockAndWakeupHandlers.
- Enable R100 trapezoid "acceleration" when DRI is working, so that it can
    be exposed and worked on.
2004-09-12 23:22:31 +00:00
Eric Anholt
ab50679aab Fix a bad argument missed in the previous commit for ATIDRIDMA* functions. 2004-09-12 23:01:24 +00:00
Eric Anholt
2d069b1d19 Move the RegisterBlockAndWakeupHandlers to before DRI initialization. The
change to use that instead of manual wrapping made the DMA dispatch
    come after the lock had been dropped, causing lots of pain.
2004-09-12 22:21:12 +00:00
Eric Anholt
27b5a65f05 Reset the CCE/CP on engine reset, and make the ATIDRIDMA functions take a
more useful argument.
2004-09-12 20:31:39 +00:00
Eric Anholt
fcd52d276f Add missing kaa.h include for kaaInitTrapOffsets. 2004-09-12 20:19:15 +00:00
Eric Anholt
b5d406e8c8 Fix handling of is_agp. is_agp is whether the card is actually AGP, while
using_agp should say whether AGP is being used as part of DMA/DRI.
2004-09-12 20:02:10 +00:00
Eric Anholt
7cab70d1cb Improve error handling, especially in the DRI case. Do some FatalErrors
instead of ErrorFs for things that are really bad, and put limits on
    some loops. Now, sometimes instead of hanging the entire system, we
    (mostly-) cleanly drop to console when the card has hung.
2004-09-12 19:52:51 +00:00
Eric Anholt
0cd662ea80 - Add disabled WIP trapezoid code for R128 and R100. The R128 rendering is
not doing an add of 1 per triangle like I hoped, and instead seems to
    be saturating all the pixels or something. The R100 acceleration
    renders pretty well, with some gaps. Note that both are slower than
    software due to lack of DMA to submit vertices.
- Mostly fix R128 and Radeon transform support, including supporting
    bilinear filtering on R128. Subpixel offsets are still probably an
    issue (reported by rendercheck), but I want to make 100% sure about my
    understanding of the protocol before changing everybody, including fb.
- Add support for dst formats without alpha to R128 Composite.
- Remove the R128 Blend code, which has long outlived its usefulness. (I
    kept it around for one reason: It could be useful for the w/h > 1024
    case with no mask and a non-src op. That seems pretty infrequent and
    not worth the trouble).
2004-09-11 09:28:19 +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
Matthew Allum
501dcf37aa cursor fixes 2004-09-08 11:31:49 +00:00
Matthew Allum
20918ab480 avoid ephyr breakage when tslib enabled 2004-09-07 19:00:04 +00:00
Matthew Allum
8bf6ea903b fixes to Xephyr debug mode 2004-09-07 12:44:19 +00:00
Matthew Allum
2753c8e2c8 see changelog 2004-09-01 15:30:58 +00:00
Matthew Allum
7c0aaa53bf '-dpi' fixes for Xephyr 2004-09-01 11:13:36 +00:00
Matthew Allum
16ff3a8727 Actuall select events for -parent option 2004-09-01 08:31:20 +00:00
Matthew Allum
2d065c4c33 Added ephyr server sources 2004-08-31 16:33:05 +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