Virtuous blogs jbarnes' braindump

01/28/09

English (US)   dri2, performance, and tiling  -  Categories: Announcements [A]  -  @ 07:38:49 pm

We recently started supporting DRI2 in xf86-video-intel and the Mesa drivers, but since then people have started to report performance problems, especially on pre-965 chips (and even crashes on older chips).

I recently looked into those problems, with a couple of theories in mind. Some of the problems reported were so bad, I thought for sure there must be another vblank related bug hiding somewhere, causing apps to timeout and hang for a few seconds. Another theory was that our lack of tiled rendering on pre-965 was at least partly responsible. Turns out that a real win, especially on low end platforms (going from ~5fps to ~30fps on some platforms & apps).

On pre-965 chips though, in order to render to tiled surfaces, so-called fence registers must be set up surface’s properties (stride, size, tiling mode and address). Until recently we didn’t have a way of making fence registers available in the kernel, but with that code (added to support GTT based mapping in userspace), it was a small effort to get tiled rendering going on pre-965. However, only X tiling is supported at the moment. Mesa uses standard blits to copy data around in some cases, and on pre-965 only X tiled objects can be blitted with the 2D engine. Once we change that we can see how much of a win Y tiling will be on pre-965 (almost surely not as much as going from no tiling to X tiling, but it could be worth a few fps).

But that’s not all. With GEM, tiling parameters need to be known so that software based tiled access can work. Unfortunately on some machines the necessary configuration information (which is stored in the MCH memory config registers) isn’t available, since the BIOS may disable the registers or not allocate I/O space for them. My Eee is one such machine, so I was able to code and test a patch to make the MCH data available where it wasn’t otherwise (additional testing appreciated, see the intel-gfx@lists.freedesktop.org archives for the patch).

On the KMS front, things are coming together. X comes up *much* faster with KMS enabled, and VT switch is nearly instantaneous. All this is great, but there are still some bugs related to framebuffer resize and rotate, and suspend/resume is a little off when mode setting is enabled. Hopefully we can fix most of these before 2.6.29 proper comes out.

10 commentsTrackback (0)

Comments:

Comment from: Wang Xu [Visitor] Email
I've tried the current master of libdrm and xf86-video-intel,
using xf86-video-intel 2.6.1, it got an front tiling buffer rejection, and glxgears around 820 fps;
while using xf86-video-intel master, after an filing buffer rejection, it try to allocate again, then glxgears fps only reached around 660 fps...

My system is a Thinkpad X60 with 945GM
PermalinkPermalink 01/30/09 @ 16:26
Comment from: jbarnes [Member] Email
You'll need to upgrade your kernel as well, with the execbuffer tiling patches. You should be able to use Eric's drm-intel-next branch (from git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel.git), along with git master of xf86-video-intel and libdrm and get tiled rendering (be sure you use UXA as your accelmethod though).

If you see something in your kernel log about "can't read MCHBAR", then you'd also need the MCHBAR allocation patch I posted (see the intel-gfx list archives for that).
PermalinkPermalink 01/30/09 @ 16:55
Comment from: pafnucy [Visitor]
Thousands with i915 count on you.
PermalinkPermalink 02/04/09 @ 06:46
Comment from: f [Visitor]
Any luck?
PermalinkPermalink 02/17/09 @ 13:45
Comment from: jbarnes [Member] Email
f,

Yeah the patches have been tested and included in the upstream kernel. Several related fixes have also gone in recently, so if you have a 9xx and have had poor performance, it's worth trying out the latest bits again. Please report problems or questions to the intel-gfx@lists.freedesktop.org mailing list.
PermalinkPermalink 02/17/09 @ 14:35
Comment from: anarsoul [Visitor] Email
Out of curiosity, did you test your tiling patches on systems with dual-channel memory configuration?
I'm asking because tiling works fine for me on single channel and doesn't work at all (with huge performance regression) on dual channel.
I'm using gma950 on lenovo 3000 n100 laptop.
PermalinkPermalink 03/05/09 @ 09:39
Comment from: jbarnes [Member] Email
anarsoul, no I didn't have that config handy when testing. But there are some issues with dual channel configs & tiling; we don't properly support the address swizzling in many of those cases. We have a plan for doing it, but it will be tricky and hasn't been coded yet.
PermalinkPermalink 03/06/09 @ 20:51
Comment from: Johnny [Visitor] Email
So... dual-channel support is somewhat tricky and for that reason people with dual-channel are stuck with kernel rejecting tiling. How can we help? I mean many people with 915 and dual-channel memory are yearning for speed improvements...
PermalinkPermalink 03/22/09 @ 08:57
Comment from: jbarnes [Member] Email
You can subscribe to intel-gfx and volunteer for testing. Eric is working hard on fix now, and I'm sure he'd appreciate having testers he could do some back & forth with...
PermalinkPermalink 03/22/09 @ 22:44
Comment from: wasmachine [Visitor] Email · http://www.wasmachinekeuze.nl/
I'll subscribe to intel gfx thanks!
PermalinkPermalink 05/24/09 @ 13:36

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

Trackback address for this post:

This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

Trackbacks:

No Trackbacks for this post yet...

Pingbacks:

No Pingbacks for this post yet...

powered by b2evolution free blog software

Contact the admin - Credits: blog soft | affordable hosting | adsense