Bug 6017 - EXA support for mach64
Summary: EXA support for mach64
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Acceleration/EXA (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high enhancement
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 6877
  Show dependency treegraph
 
Reported: 2006-02-24 03:55 UTC by George -
Modified: 2006-08-04 17:21 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
exa for mach64 (45.84 KB, patch)
2006-02-24 03:57 UTC, George -
no flags Details | Splinter Review
exa for mach64 - try 1 (52.27 KB, patch)
2006-03-01 00:18 UTC, George -
no flags Details | Splinter Review
exa for mach64 - try 2 (53.24 KB, patch)
2006-03-04 13:47 UTC, George -
no flags Details | Splinter Review
exa for mach64 - try 3 (66.13 KB, patch)
2006-03-05 23:13 UTC, George -
no flags Details | Splinter Review
exa for mach64 - try 4 (76.29 KB, patch)
2006-03-07 07:54 UTC, George -
no flags Details | Splinter Review
exa for mach64 - try 4 (73.08 KB, patch)
2006-03-07 09:22 UTC, George -
no flags Details | Splinter Review
exa for mach64 - try 5 (60.25 KB, patch)
2006-03-08 14:14 UTC, George -
no flags Details | Splinter Review
exa for mach64 - try 6 (61.29 KB, patch)
2006-03-10 01:05 UTC, George -
no flags Details | Splinter Review
exa for mach64 - try 7 (61.63 KB, patch)
2006-03-13 03:14 UTC, George -
no flags Details | Splinter Review
exa for mach64 - try 8 (62.51 KB, patch)
2006-03-31 04:57 UTC, George -
no flags Details | Splinter Review

Description George - 2006-02-24 03:55:58 UTC
I made a small update of http://aeris.hypair.net:8001/exaati-messy.patch .
It basically adds useEXA and DRISync.

I hope this is ok with the original author, does not duplicate other work
and helps a little to get exa for mach64 someday.

Comments are welcome (esp. with pointers to relevant code, doc, tools if any).

@16bpp: seems ok
@24bpp: has artifacts at window borders

0000:01:00.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro AGP
1X/2X (rev 5c)
Comment 1 George - 2006-02-24 03:57:24 UTC
Created attachment 4731 [details] [review]
exa for mach64
Comment 2 George - 2006-03-01 00:18:52 UTC
Created attachment 4778 [details] [review]
exa for mach64 - try 1

This patch reorders module loading for ati similar to radeon (exa required
fbGlyph symbols from fb).

I also rewritten UploadToScreen to follow closely mach64UploadLocalSubImage
from the dri driver. It does not work, the machine *locks* when I try to access
the allocated DMA buffer. DMA buffer allocation seems ok, I get a pointer to
the address at which the drm reports that DMA buffers get allocated.

Any help or guidance with this ? Which mesa progs exercise
mach64UploadLocalSubImage in mach_dri.so ?

thanks,
george.
Comment 3 George - 2006-03-04 13:47:21 UTC
Created attachment 4815 [details] [review]
exa for mach64 - try 2

With this patch:

24-bit seems to work now (only changed align requirements) in addition to 16bpp
and it seems faster than 16bpp ...

there is also my latest effort for UploadToScreen: it uses hostdata blits
directly similar to CPUToScreenColorExpand from XAA; it does *not* work
either, the produced colors are irrelevant; 
any pointer that may help with this ?
Comment 4 George - 2006-03-05 23:13:48 UTC
Created attachment 4826 [details] [review]
exa for mach64 - try 3

- UploadToScreen using hostdata blits works now but it is disabled by default 
  (radeon XAA says memcpy is faster).
  Is there a typical xorg way to profile upload/download ?

- I also started isolating the XAA offscreen memory management code.
  Currently, exa has a cursor (both hw/sw) but no xv or dri.
Comment 5 George - 2006-03-07 07:54:16 UTC
Created attachment 4847 [details] [review]
exa for mach64 - try 4

This is an updated version of the exa patch for mach64,
it implement offscreen memory management for EXA (cursor, xv, dri).

I plan to profile UploadToScreen to see if hostdata blits were worth the time,
but other than that or bug fixes, I do not plan to do any more work in the near

future.

Thus, I think that the patch is worth an initial review or testing in order to
decide if it feasible to include basic solid/copy exa support for mach64 in
the 7.1 release.

regards,
george.
Comment 6 George - 2006-03-07 07:55:23 UTC
change title, http://wiki.x.org/wiki/ExaStatus points here.
Comment 7 George - 2006-03-07 09:22:02 UTC
Created attachment 4850 [details] [review]
exa for mach64 - try 4

merge atimach64iodri.h back to atimach64io.h
Comment 8 George - 2006-03-08 14:14:28 UTC
Created attachment 4861 [details] [review]
exa for mach64 - try 5

This is a cleaned up version with hostdata blits completely dropped.

Profiling showed that plain memcpy is about 4x to 5x faster and
hostdata blits spend most of its time polling the FIFO.
Comment 9 George - 2006-03-10 01:05:26 UTC
Created attachment 4870 [details] [review]
exa for mach64 - try 6

Port to new EXA API.
Comment 10 George - 2006-03-13 03:14:09 UTC
Created attachment 4906 [details] [review]
exa for mach64 - try 7

Use pATI->NeedDRISync for EXA also, avoids unnecessary sync operations for
EXA accelerated functions when DRI is not running.
Comment 11 Eric Anholt 2006-03-30 17:11:40 UTC
Looking at just the EXA acceleration bits, they're looking pretty good to me.  I
suspect the DRI locking could be simplified, but I haven't looked at it
carefully enough, and I'm getting tired.

If you don't have a CVS account yet, you should probably apply for one :)
(http://www.freedesktop.org/wiki/AccountRequests)
Comment 12 George - 2006-03-31 04:57:11 UTC
Created attachment 5134 [details] [review]
exa for mach64 - try 8

In reply to comment #11)
> Looking at just the EXA acceleration bits, they're looking pretty good to me.
 
> I suspect the DRI locking could be simplified, but I haven't looked at it
> carefully enough, and I'm getting tired.
> 

Drop the DRIUnmarkSync macros. Add comments for DRIMarkSync macros.

> If you don't have a CVS account yet, you should probably apply for one :)
> (http://www.freedesktop.org/wiki/AccountRequests)

However tempting this may be, its also a bit scaring, Maybe after libv lands
the xf86-video-mach64 module.
Comment 13 George - 2006-05-09 02:47:11 UTC
The attached patch has been merged in the following repository:
git//git.freedesktop.org/~libv/xf86-video-mach64. xf86-video-mach64 is still in
development but we intend to to have it distribution ready in time for 7.2.
Comment 14 Colin Macdonald 2006-06-20 15:56:32 UTC
I can't find the repository: git//git.freedesktop.org/~libv/xf86-video-mach64

I'd like to poke around with the new split mach64 driver.  Where is the
repository for it?
Comment 15 George - 2006-06-20 19:06:58 UTC
(In reply to comment #14)
> I can't find the repository: git//git.freedesktop.org/~libv/xf86-video-mach64
> 
> I'd like to poke around with the new split mach64 driver.  Where is the
> repository for it?

git-clone git://git.freedesktop.org/~libv/xf86-video-mach64
             ^ (sorry for the typo)

You may also want to poke with render acceleration from bug #6877.
Comment 16 Colin Macdonald 2006-06-20 19:21:51 UTC
gah, copy-paste without thinking, bad Colin no banana.
Comment 17 George - 2006-08-04 17:21:11 UTC
Commited to HEAD.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.