Commit Graph

44 Commits

Author SHA1 Message Date
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
Keith Packard
c57944cd9a Check for mmio before restoring crtc/crtc2 pitch registers 2004-07-24 17:02:49 +00:00
Keith Packard
9565d9e0cf Correct pitch so that accelerator can run on 1400x1050 screens. Add a few
more register sets for cursors.
2004-07-22 18:17:59 +00:00
Eric Anholt
8853f93318 Add support for a8b8g8r8 and x8b8g8r8 pictures, which showed up frequently
with metacity usage.
2004-07-19 12:07:01 +00:00
Eric Anholt
adf4b38f49 Breakage in last commit to this file: pCurPriv->area isn't set up until
Enable, these days.
2004-07-19 11:42:49 +00:00
Eric Anholt
d2e74e419d Set the right number of texture coordinates for r200 Render support (still
disabled, needs to be tested).
2004-07-19 11:19:12 +00:00
Eric Anholt
cefcb7f123 - Add Radeon picture transform support.
- On R128, don't refer to an old Composite's mask transform when the
    current Composite doesn't have a mask.
- Staticize some global variables in r128_composite.c.
2004-07-19 11:16:13 +00:00
Eric Anholt
9fe216a458 Use the offscreen memory manager as much as possible to do the reservation
of memory at startup. Do some drive-by cleanups while I'm here
    (sorry!).
2004-07-19 07:53:54 +00:00
Eric Anholt
e2bb9f38cd Add support for transforms of textures on R128. 2004-07-19 07:20:01 +00:00
Eric Anholt
7c466d64c3 Clean up Rage 128 composite code. Now it composites more operations
correctly and is simpler.
2004-07-03 10:23:03 +00:00
Keith Packard
7ff67f2872 Separate out off-screen allocation from Init. Fix Enable to update
off-screen addresses. Wrap RandR to update off-screen addresses.
Set off_screen_base and memory_size fields correctly.
2004-06-28 00:48:51 +00:00
Keith Packard
5b75aae2cf Add ARGB cursor support for Radeon cards. 2004-06-26 04:13:03 +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
Eric Anholt
c3bc6dd551 Align scratch area offsets to the offscreen byte alignment. 2004-06-10 09:50:59 +00:00
Eric Anholt
cf3f95d216 Oops, testers reported that the last patch actually didn't work (conflicts
occurred), so the R300 PDMA doesn't work. Disable.
2004-06-10 08:37:28 +00:00
Eric Anholt
0b7647ee35 Bug #242: Fix setup of R300 cards, by providing R300 CP code from
volodya-project and initializing PDMA.
2004-06-10 05:57:31 +00:00
Eric Anholt
cade317d31 Overhaul of the ATI driver:
- Add monochrome hardware cursor support.
- Try to auto-detect AGP support for DRI on Radeons. And fail. Detect it
    properly on R128.
- Set up card for pseudo-DMA if possible. Convert 2D rendering code to
    prepare DMA packets only. Use generic code to decode DMA packets to
    MMIO if PDMA is unavailable. Add WIP code to support "real" DMA without
    DRM support.
- Dispatch pending DMA commands when the server sleeps. Otherwise some
    things, such as typing in an xterm, wouldn't show up for a time.
- Fix Radeon Composite acceleration in many ways, and add Rage 128
    Composite acceleration. Disable them both due to still-not-understood
    issues they have. They fail with In, Out, AtopReverse, and Xor, and
    text rendering is strange.
- Add textured XV support for R100 and Rage 128. No brightness/sat
    controls, but it does support multiple ports, and cooperates with
    Composite.
- Add WIP code for hostdata uploads.
- Many cleanups and fixes.
2004-05-17 20:18:02 +00:00
Eric Anholt
2ec70aa701 Disable GLX visuals code on !GLXEXT, and remove a useless prototype. 2004-01-25 05:31:24 +00:00
Eric Anholt
01e9cc858a - Add glx visuals code based on XFree86's Radeon driver.
- Reserve areas for back/depth/span when USING_DRI && GLXEXT. This would be
    better in a TransitionTo3d, but we'd need to work with the offscreen
    memory manager for that.
- Misc. fixes to ati_dri.c for DRI+GLX. Needs more work still.
2004-01-25 01:30:33 +00:00
Eric Anholt
f2bedd17af Oops, turn fallback output back off. 2004-01-25 01:16:19 +00:00
Eric Anholt
26c5a8dfdd Whitespace cleanup. 2004-01-25 01:04:12 +00:00
Eric Anholt
6c97b277d9 Support 1x1 repeat sources in R128's Blend. 2004-01-11 00:10:34 +00:00
Eric Anholt
9270256565 Change PCI ID information field to be one of r128, r100, r200, r300. This
is all the information we need so far. Put that information into atic,
    and use it correctly in the code (unlike before).
2004-01-09 08:43:48 +00:00
Eric Anholt
6d8001f468 Compile fixes for non-DRI case and for non-C99 compiler. 2004-01-08 20:18:13 +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
5a2c23f8a1 Speed things up slightly by removing Z values from emitted vertices and by
emitting as a tri fan rather than a tri list. A rect list would save an
    additional vertex (out of 4) per rectangle, but there's no measurable
    speed difference and the tri fan may be useful when transforms come
    into play.
2004-01-07 02:30:29 +00:00
Eric Anholt
34d1529731 - Correctly set the texture coordinate set source for the second texture
unit.
- Re-enable Radeon's Composite accel now that fonts work again.
2004-01-04 20:47:30 +00:00
Eric Anholt
3db761a17b - Add more Composite operations, including Saturate, to Radeon Composite
accel. I don't 100% trust that the math works for Saturate, but I can't
    tell from existing information.
- Fix texture pitch fallback checks.
- Fallback when src or mask have transforms.
- Disable Radeon Composite accel until the offset thing is fixed.
- Set offscreenPitch to 64 on Radeon thanks to new information and a kaa
    fix. Fixes acceleration at width!=1024.
2004-01-03 11:46:57 +00:00
Eric Anholt
354f8f7e94 Some strange \240 character snuck into the original commit of this file. 2003-12-31 23:24:33 +00:00
Eric Anholt
5f947b04da There's never a copy between different depths. Remove the check. 2003-12-30 08:45:53 +00:00
Eric Anholt
c8eb20a08e - Add new Composite hook for kdrive drivers, which only ensures that the
pixmaps are offscreen and don't have alpha maps. It is the last case
    checked before going to software fallback
- Use the new Composite hook in the ati driver to implement acceleration of
    most Composites that get done in an xcompmgr environment on r100 series
    cards. It is only available when using the DRM. There are still some
    corruption issues, but the DRI is still non-default and I need to get
    this into version control.
2003-12-30 08:23:56 +00:00
Eric Anholt
adfc1ed8e1 Add dependency lines so that servers are rebuilt when server libraries are
changed.
2003-12-29 09:04:20 +00:00
Eric Anholt
df03e80ae9 Merge dri-0-1-branch to trunk. Notable changes:
- Add libdrm and libdri. Portions of the DRI extension are stubbed out.
- Use the DRM in the ATI driver when available. This provides a minor
    performance improvement in x11perf, and opens the possibility of using
    the 3d hardware for acceleration in the future.
- Implement solid fill acceleration for Composite in KAA.
- Implement Blend hook for Composite and use it on r128.
- Fix a bug of mine that resulted in overuse of offscreen memory.
- Fix many miscellaneous bugs in ATI driver and add PCI IDs.
2003-12-29 06:24:01 +00:00
Eric Anholt
9cdd6fd9e3 - Add fbdev mode-setting backend to Xati. It and vesa are compiled in when
available, with fbdev being used by default.
- Use depth 16 by default when vesa backend is used.
- Add MMIO defines for PowerPC (should be in a common location).
Many thanks for Michel Daenzer for much of this code.
2003-12-01 04:33:36 +00:00
Eric Anholt
ec7f553930 Add more RV250 PCI IDs. 2003-12-01 03:15:13 +00:00
Eric Anholt
d221c484f9 Remove sys/io.h inclusion from some files that didn't need it, and change
asm/io.h to sys/io.h in vga.c, which newer Linux complains about.
2003-12-01 01:46:42 +00:00
Eric Anholt
d803918a9f Add new Radeon 9200 PCI IDs. 2003-11-25 22:39:54 +00:00
Eric Anholt
d461855a73 - Fix Radeon offscreen pixmap pitch alignment.
- Remove usleeps from idle and waitavail code, recommended by keithp.
- Add a workaround for apparent broken acceleration with Rage 128 and
    offset alignment with 8-bit acceleration (24-hack and plain 8-bit).
- Minor cleanup of setup code.
2003-11-23 10:12:04 +00:00
Eric Anholt
8e09afe657 Add RV250 PCI IDs. 2003-11-23 02:08:16 +00:00
Eric Anholt
b3247251fb - Fix a bug in pitch alignment for offscren pixmaps.
- Add 24-bit acceleration for Xati using the 8-bit trick from mach64.
- Add offscreen pixmap support to Xati.
2003-11-20 07:49:46 +00:00
Eric Anholt
41dde24b22 - Fix confusion of depth/bitsPerPixel in ati_draw.c
- Disable acceleration with 24bpp due to apparent broken acceleration.
    Accel at 24bpp was the cause of the crashes when people tried to use
    any depth over 16. XFree86 doesn't support 24 either.
- Disable at < 8bpp, too.
- Add the other Rage 128 PCI IDs.
- Remove unnecessary setting of scissor registers (only default scissor
    gets used).
2003-11-20 00:05:56 +00:00
Eric Anholt
7abbcce422 - Add PCI information (device/vendor id, bus location) to KdCardAttr to
help with ati, and future DRM drivers.
- Add new "ati" kdrive driver. It has ancestry in the r128 driver from
    andersca, but took a detour through being the WIP SiS 300 driver on the
    way. It supports Radeons (tested on QD VIVO and 7500) and Rage 128.
    Current limitations include that it requires depth 16 and that the
    other Rage 128 PCI IDs aren't included yet.
2003-11-19 08:32:38 +00:00