Virtuous blogs jbarnes' braindump

05/07/09

English (US)   pageflipping, blocking, etc.  -  Categories: Announcements [A]  -  @ 08:23:56 pm

Lots of activity lately: Eric just landed a major cleanup to the 2D driver, there’s been lots of bug activity, and I’ve been hacking some more on the page flipping & DRI2 swap buffers support.

bugs

We still have way too many bugs open (but isn’t that always the case when the bug count is > 0?), but I spent a lot of time the last couple of weeks closing stuff out, fixing issues and generally troubleshooting configuration issues people have been having with the bleeding edge KMS, UXA and DRI2 code.

One particularly annoying issue was reported by Mateusz Kaduk. While we were debugging it recently, we found that for some reason IER (the interrupt enable reg of the GPU) was getting cleared sometime after the kernel driver was loaded (and had enabled it successfully!). During that time Dariush discovered that running vbetool to save the graphics state seemed to trigger the bug. So the VBIOS (which is ultimately what vbetool ends up running) disables interrupts behind our back, ouch! Take this as yet more evidence that the VBIOS really shouldn’t be run after you’ve booted and loaded a proper driver. Mateusz and I also worked out a workaround for the problem, which I posted here; not sure if we’ll actually ship that yet though, since the distro configs that called vbetool at boot time seem to have been fixed.

tearing

tear free shampoo

On the page flipping and swap buffers front, I’ve been having heavy discussions with Jakob Bornecrantz and Kristian Høgsberg lately about how things ought to work. I’m actually using one set of my code on the machine I’m typing on now, and it seems solid, but it has a few shortcomings we’d like to address. Overall there were a couple of issues we felt were important:

Beyond that there are the implementation details of how the new DRI2 protocol looks and what the exact sequence looks like on the display server and client side. Kristian is re-working things to require more of the display server (which should help Wayland), so hopefully we’ll see this work committed soon. It’s about time we had a way to enable tear-free compositing window managers.

Update: forgot to mention which bits I’m using:

other features

And since that wasn’t keeping me busy enough, I’ve been hacking on some other features lately, namely GPU reset and framebuffer compression for KMS. The first feature is tied in with some of the error handling improvements we’ve wanted for a long time. Recent GPU hangs (which are just plain hard to figure out) have motivated us to create some tools for dumping GPU command buffers, and to improve our handling of errors in the kernel. So I’ve got some code to capture error state when the GPU detects a failure, and also some code to reset the GPU which we can use if we encounter a hang or other fatal error. They both need a little more work though; we want to capture an error record right when we receive an error interrupt, so I need to create an error structure and export it through debugfs. Once that works reliably, I should be able to hook up the GPU reset code. That should make GPU hangs non-fatal; and if we’re lucky won’t even be noticeable to the end user. Framebuffer compression also needs a little more work; right now it just supports 965 and before; I need to add support for the G4x series and do some more testing to make sure it’s working as expected. Ah the fun never ends.

9 commentsTrackback (0)

Comments:

Comment from: Alex [Visitor] Email · http://www.bennee.com/~alex
I appreciate the work you guys are doing in cleaning up X. I can see the dawn of a new cleaner system coming, I just wish my hardware was so "special". Anyway you may want to look at your RSS feed. The URL for the post was "http://virtuousgeek.org/blog/46@http://virtuousgeek.org/blog/" which your server didn't like very much.
PermalinkPermalink 05/08/09 @ 08:27
Comment from: jbarnes [Member] Email
Huh, I'll look at that, thanks.
PermalinkPermalink 05/08/09 @ 10:48
Comment from: jbarnes [Member] Email
Forgot to mention which bits I'm using:
- dri2-swapbuffers branches of dri2proto, mesa, xserver and xf86-video-intel
- kms-pageflip from the drm tree
- i915-dri2-swapbuffers-15.patch from the "[RFC] DRI2 swapbuffers (yes yet again)" thread on dri-devel@lists.sourceforge.net
PermalinkPermalink 05/14/09 @ 17:59
Comment from: Dereck [Visitor] Email · http://launchpad.net/~dereck
Please keep up the great work and blogin'! I love hearing about this low level stuff that I dream of being able to work on someday. :)
PermalinkPermalink 05/15/09 @ 13:56
Comment from: Joakim [Visitor] Email · http://xbmc.org
Hi Jesse,

I just spotted the thread "[Intel-gfx] [RFC] DRI2 swapbuffers (yes yet again)".

Where someone chimes in on D3D's PRESENT_INTERVAL_1_OR_IMMIDIATE (if i remember the exact define). Ie allow faster presents than refreshrate if late.

This would wreak havoc on opengl video playback apps like ours (xbmc), where we seldom render at refreshrate speed, but tearing is totally unaccceptable.

Imho, the standard behaviour aught to be to always sync when that glx extension is set. The problem for wine seem quite minor in this case. They could just aswell just turn of the feature in that case.


PermalinkPermalink 06/05/09 @ 06:27
Comment from: TrueTom [Visitor] Email
Does vsync support include OpenGl applications in windowed mode?
PermalinkPermalink 07/13/09 @ 16:41
Comment from: jbarnes [Member] Email
Yes; those will end up going through the DRI2 CopyRegion call, which will always try to sync.
PermalinkPermalink 07/13/09 @ 16:52
Comment from: TrueTom [Visitor] Email
That is great news.Thank you guys for all your great work.
PermalinkPermalink 07/14/09 @ 01:17
Comment from: vesa [Visitor] Email
Nice to see problems getting solved :)

I'd like to poit you to project FRC (Frame Rate Control) and consider what kind of work is needed for getting that functionality included to official drivers. The project pages: http://frc.easy-vdr.de/
Longer discusion and background: http://www.phoronix.com/forums/showthread.php?t=18108

This is a shameless plug, but at least the 'good cause' is on my side :D

Best regards and thank you for your hard work!
PermalinkPermalink 07/21/09 @ 09:03

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 software | blog hosting | Francois