Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38549 - xorg-x11 newport hardware acceleration patch
Summary: xorg-x11 newport hardware acceleration patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: MIPS Linux
: High enhancement
Assignee: Gentoo X packagers
URL: http://www.mindwerks.net/~psi/mips/ne...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-17 14:50 UTC by Bret Curtis (RETIRED)
Modified: 2005-01-22 11:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
XFree86 hardware accelerated newport driver patch (newport_accel.patch,158.56 KB, patch)
2004-01-17 14:54 UTC, Bret Curtis (RETIRED)
Details | Diff
Updated patch. (newport_accel.patch,158.64 KB, patch)
2004-01-18 09:28 UTC, Bret Curtis (RETIRED)
Details | Diff
patch to accelerate 24bpp mode for the newport driver (newportaccel_xorg.diff,64.11 KB, patch)
2004-11-01 10:45 UTC, Stephen Becker (RETIRED)
Details | Diff
newport-accel-4.patch (newport-accel-4.patch,63.34 KB, patch)
2004-11-01 19:16 UTC, Adam Jackson
Details | Diff
newport-accel-5.patch (newport-accel-5.patch,63.48 KB, patch)
2004-11-01 19:33 UTC, Adam Jackson
Details | Diff
fixes a typo in newport-accel-5.patch (newport-accel-6.patch,63.94 KB, patch)
2004-11-09 16:57 UTC, Stephen Becker (RETIRED)
Details | Diff
this diff modifies the 5200_all_6.8.0-newport-accel.patch to the newest version of dominik's driver (newportversion10.diff,10.79 KB, patch)
2004-11-12 14:39 UTC, Stephen Becker (RETIRED)
Details | Diff
latest accel patch , with fix for swapped red and blue (newport_accel_rel11.diff,64.78 KB, patch)
2004-11-17 01:18 UTC, Dominik Behr
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bret Curtis (RETIRED) gentoo-dev 2004-01-17 14:50:43 UTC
Patch for XFree86 to allow hardware acceleration on the newport video subsystem. This patch only effects the mips arch that uses the newport.

Reproducible: Always
Steps to Reproduce:
1.Apply patch
2.Compile
3.Behold XFree86

Actual Results:  
http://www.mindwerks.net/~psi/mips/screenshot2.jpeg  CPU overhead on SGI Indy
workstation is dramatically reduced and allows for more functionality while in X.


There are known bugs, HWcursor "true" cursor isn't quite visable, but HWcursor
"false" makes for strange artifacts.  XFree86 configure doesn't generate a
XF86Config file.
Comment 1 Bret Curtis (RETIRED) gentoo-dev 2004-01-17 14:54:27 UTC
Created attachment 24009 [details, diff]
XFree86 hardware accelerated newport driver patch
Comment 2 Bret Curtis (RETIRED) gentoo-dev 2004-01-17 15:00:29 UTC
With this particular patch, XFree86 must be compiled statically as dlopen() hasn't been implemented yet, but is forth comming.  This patch has yet to make it into XFree86's cvs.
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2004-01-17 20:54:10 UTC
Have you made this patch cleanly against gentoo's xfree as opposed to vanilla xfree?
Comment 4 Bret Curtis (RETIRED) gentoo-dev 2004-01-17 22:40:56 UTC
Correct, this patch applied cleanly to the xfree86-4.3.99.902.ebuild after putting the patch into XFree86-4.3.99.902-patches-0.1.tar.bz2 and re-running the digest. I watched the auto patcher take the patch and apply it.  The results can been seen in the screenshot.  Still testing it out, GTK+2 text isn't displaying much of anything right now, but standard gtk+ apps are just fine.  I would rather  run X with this patch than without at the moment, at least for further testing in MIPS.
Comment 5 Donnie Berkholz (RETIRED) gentoo-dev 2004-01-17 23:15:29 UTC
OK, I'll get it added in the next patchset.
Comment 6 Bret Curtis (RETIRED) gentoo-dev 2004-01-18 09:28:25 UTC
Created attachment 24027 [details, diff]
Updated patch.

Did some checking to make sure everything went cleanly against both XFree86 CVS
and then against Gentoo and noticed some inconsistancies with location of
patched files, this will take of it.

--- xc/programs/Xserver/hw/xfree86/drivers/newport.orig/newport_window.c       
1970-01-01 01:00:00.000000000 +0100
+++ xc/programs/Xserver/hw/xfree86/drivers/newport/newport_window.c    
2003-12-02 15:36:27.000000000 +0100
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2004-01-18 10:14:58 UTC
By the way, this patch will only be applied on USE=static.
Comment 8 Stephen Becker (RETIRED) gentoo-dev 2004-11-01 10:45:50 UTC
Created attachment 43083 [details, diff]
patch to accelerate 24bpp mode for the newport driver

TCMAN's latest, greatest, and final XAA re-write of the newport acceleration
patch is attached here now.  It should apply against all xorg-x11 ebuilds with
no problems (tested 6.8.0-r1 and 6.8.0-r2).
Comment 9 Stephen Becker (RETIRED) gentoo-dev 2004-11-01 10:50:43 UTC
One more comment...this patch doesn't necessarily need USE="static" anymore.  You just have to make sure to load the xaa module in your xorg.conf.
Comment 10 Adam Jackson 2004-11-01 19:16:32 UTC
Created attachment 43120 [details, diff]
newport-accel-4.patch

here's a better version.  this one knows how to load XAA for itself, and also
has Render acceleration that will actually do something on 6.8 - no conformance
guarantees, but then 6.7 Render accel was never conformant so this is no big
deal.

if this works out i'd like to see it applied upstream too, if the author is
willing.
Comment 11 Adam Jackson 2004-11-01 19:33:42 UTC
Created attachment 43121 [details, diff]
newport-accel-5.patch

woops, missed a spot, set up the legal destination formats too.

since i mentioned conformance, the canonical Render conformance test is called
rendercheck:

http://freedesktop.org/~xapps/release/rendercheck-1.0.3.tar.bz2

which i'll post an ebuild for in the next few days.  the Render setup hooks in
6.7 and before only passed the source picture format, so you _cannot_ write a
conformant Render accel using the old hooks.
Comment 12 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-03 00:36:52 UTC
Fixed in 6.8.0-r2 in CVS. Please test.
Comment 13 Stephen Becker (RETIRED) gentoo-dev 2004-11-09 16:57:25 UTC
Created attachment 43627 [details, diff]
fixes a typo in newport-accel-5.patch
Comment 14 Stephen Becker (RETIRED) gentoo-dev 2004-11-09 16:58:05 UTC
reopened so that the new patch with a typo fix is committed
Comment 15 Stephen Becker (RETIRED) gentoo-dev 2004-11-11 06:15:03 UTC
Ok, don't commit the new patch just yet.  TCMAN updated his driver to a revision #10.  I am testing it right now, and will post a diff against the patch currently in the xorg patchset.
Comment 16 Stephen Becker (RETIRED) gentoo-dev 2004-11-12 14:39:49 UTC
Created attachment 43830 [details, diff]
this diff modifies the 5200_all_6.8.0-newport-accel.patch to the newest version of dominik's driver

Dominik released a version 10 of his newport accel driver.  This version was
written specifically with xorg-x11 in mind.  The attached patch is a diff
against the current newport patch in the xorg-x11 patchset which will update it
to the new driver.  It will also fix the spelling mistake.
Comment 17 Stephen Becker (RETIRED) gentoo-dev 2004-11-12 14:44:17 UTC
Just in case anybody wants to see it, the full diff of version 10 against a stock xorg-x11 source tree is located at

http://dev.gentoo.org/~geoman/newportaccel.diff
Comment 18 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-15 09:01:56 UTC
Ajax, could you please vet the patch in comment #16?
Comment 19 Adam Jackson 2004-11-15 09:15:52 UTC
looking at patches to patches makes my eyes go all crossy.  the patch in comment #17 looks fine though.

if there are no objections - and if Dominik doesn't beat me to it - i'll open a bug upstream to get this included.  i'd still like to see rendercheck results though.
Comment 20 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-15 09:44:29 UTC
Rendercheck has an ebuild in portage now, so just emerge and test.
Comment 21 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-16 22:01:43 UTC
Added to 6.8.0-r2 in patchset 0.2.7.
Comment 22 Dominik Behr 2004-11-17 01:18:53 UTC
Created attachment 44142 [details, diff]
latest accel patch , with fix for swapped red and blue

rel10 + fixes apps that use RENDER like gnome-term, gvim, xchat2
Comment 23 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-17 09:47:54 UTC
Please reopen when adding things that require action on our part.
Comment 24 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-17 10:39:56 UTC
Added to 6.8.0-r4 in patchset 0.2.8.
Comment 25 Stephen Becker (RETIRED) gentoo-dev 2004-11-18 14:58:19 UTC
Dominik, you need to make sure you obsolete the proper stuff if you have a new patch.  Donnie, the patch in comment 22 is actually newer than the one in xorg-6.8.0-r4 now.  It fixes a small problem with font color swapping in gtk+2 apps that was only recently confirmed to be a problem with the driver.  Hopefully we can get this stuff upstream so we can get rid of this bug!  Dominik? ;)
Comment 26 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-18 15:31:44 UTC
Stephen, please diff it with the 5200 patch in the patchset 0.2.8. They should be the same. If they aren't, I screwed up.
Comment 27 Stephen Becker (RETIRED) gentoo-dev 2004-11-18 15:46:01 UTC
Hmmm, they are the same.  Dominik, are you *sure* you fixed the color problems?  I'm still having problems with it.
Comment 28 Dominik Behr 2004-11-19 00:29:41 UTC
Well it seems it fixes some of the color problems - namely gvim - that uses RENDER. I tried xchat2 and compared it to my other computer and red and blue is still reversed. I suspect it must be an application or gtk2 problem. The colorformat that the driver reports to X in xf86SetWeight at init time and then accepts internally from XAA is XBGR (in 32bit word). I suspect some widgets in gtk2 do not check the color format and pass XRGB or the app itself passes XRGB color to gtk2.
Comment 29 Stephen Becker (RETIRED) gentoo-dev 2005-01-16 14:28:28 UTC
Ok, the newport patch in the xorg-x11 patchset needs to be reverted to the one in comment #17 (http://dev.gentoo.org/~geoman/newportaccel.diff), because the later versions incorrectly try to fix the xaa color swapping problem which is described and fixed in https://bugs.freedesktop.org/show_bug.cgi?id=1895
Comment 30 Donnie Berkholz (RETIRED) gentoo-dev 2005-01-20 00:47:38 UTC
This is in 6.8.1.902 patchset 0.1.2 -- please test ASAP. I want to push it to 6.8.0-r4 and get that stabled for the release if possible.
Comment 31 Stephen Becker (RETIRED) gentoo-dev 2005-01-20 10:24:46 UTC
Tested and working!  Go ahead and add it to the 6.8.0-r4 patchset.
Comment 32 Stephen Becker (RETIRED) gentoo-dev 2005-01-21 15:25:23 UTC
patch has been comitted to 6.8.0-r4, closing this bug now
Comment 33 Donnie Berkholz (RETIRED) gentoo-dev 2005-01-21 16:05:11 UTC
Please post a bug at bugs.freedesktop.org with this patch, and stick the URL here.
Comment 34 Stephen Becker (RETIRED) gentoo-dev 2005-01-22 11:25:59 UTC
https://bugs.freedesktop.org/show_bug.cgi?id=2356

freedesktop.org bug for inclusion of this patch upstream