Bug 8414

Summary: [mach64] DownloadFromScreen
Product: xorg Reporter: George - <fufutos610>
Component: Driver/mach64Assignee: Xorg Project Team <xorg-team>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high CC: alexdeucher
Version: unspecifiedKeywords: patch
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmablit - DDX
none
dmablit - DRM
none
EXA/DRI mem "sharing"
none
dmablit - DDX - try 1
none
dmablit - DRM - try 1
none
dmablit - DDX - try 2
none
dmablit - DRM - try 2 none

Description George - 2006-09-24 11:49:22 UTC
This bug tracks development of accelerated DownloadFromScreen for mach64.
Comment 1 George - 2006-09-24 11:50:48 UTC
Created attachment 7143 [details] [review]
dmablit - DDX
Comment 2 George - 2006-09-24 11:51:30 UTC
Created attachment 7144 [details] [review]
dmablit - DRM
Comment 3 George - 2006-09-24 11:54:19 UTC
Created attachment 7145 [details] [review]
EXA/DRI mem "sharing"

This is a hack for "sharing" framebuffer memory between EXA and DRI. It allows
to load the DRM module without statically taking offscreen memory from EXA for
DRI back and depth buffers.
Comment 4 George - 2006-09-24 12:07:06 UTC
These are my current patches which have received a couple of hours testing, they
seem ok sofar.

They copy extensively from via_dmablit which is:
Copyright (C) 2005 Thomas Hellstrom, All Rights Reserved.

Functionality wise, the current mach64 dmablit implementation is tailored for
EXA UTS/DFS. Among other things, it hijacks the DMA descriptor ring, assumes a
single call at a time, VT switch does not work, ...

Performance wise, the memcpy-based UTS/DFS have an average throughput 155 MB/s
and 6.5 MB/s here. The dmablit-based UTS/DFS get 105 MB/s and 52 MB/s for
typical desktop usage.

As expected, the big win is dmablit DFS which gets a speedup of 8x and greatly
offloads the CPU when opening more than 3 windows (on an 8 MB card) or switching
workspaces.
Comment 5 George - 2006-10-01 15:09:43 UTC
Created attachment 7228 [details] [review]
dmablit - DDX - try 1
Comment 6 George - 2006-10-01 15:17:35 UTC
Created attachment 7229 [details] [review]
dmablit - DRM - try 1

These patches should run ok with DRI and VT switches. They reserve space for
the SG list similar to the DMA ring and the two are forced to run in sync (this
was done for AGP, but not PCI, cards for now). They also add parameter
checking, comments, etc.

I got two lockups in 3 days with the previous patch. This patch handles the
case where VBLANK and BUSMASTER interrupts coincide, I haven't had any lockups
in the rest 4 days, but this maybe because of luck, interrupt handling needs to
become less crude.
Comment 7 George - 2006-10-08 08:26:45 UTC
Created attachment 7286 [details] [review]
dmablit - DDX - try 2
Comment 8 George - 2006-10-08 08:34:07 UTC
Created attachment 7287 [details] [review]
dmablit - DRM - try 2

- drop the separate allocation for the SG list, increase the space for the DMA
  ring to 32 KB and use it for the SG list also

- profile for software fallbacks in the DDX

- add option to enable/disable DFS

These patches also cause lockups. This and the irq handling part are the two
remaining isssues.
Comment 9 George - 2006-10-08 08:35:31 UTC
Comment on attachment 7286 [details] [review]
dmablit - DDX - try 2

Of course, this is not obsolete yet.
Comment 10 George - 2006-10-26 06:27:36 UTC
Comment on attachment 7145 [details] [review]
EXA/DRI mem "sharing"

committed (23cec754158c94b43225b2070fc0a0b003e7bd25)
Comment 11 Daniel Stone 2007-02-27 01:33:41 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 12 Matt Turner 2010-12-03 12:21:02 UTC
Please send this patch to xorg-driver-ati@lists.x.org  and xorg-devel@lists.x.org. Posting it in a bug report makes it quite easy to ignore. :\

Actually, the DRM bits need a ton of work, since mach64 DRM isn't even upstream anymore.
Comment 13 Adam Jackson 2018-06-12 19:10:13 UTC
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.

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.