Eric Anholt ([info]anholt) wrote,
@ 2008-10-21 23:12:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Entry tags:moblin, x.org

doing it right
Things are looking up in the Intel driver. The GEM work has landed in Linus's master, meaning that at this point we can worry about just fixing our bugs, and know that it's going to end up in 2.6.28.

But what gets me even more excited than getting our first major kernel merge done is that we're starting to create a culture of review surrounding our driver. Keith started by insisting on posting patches instead of git trees, which meant that I read his patches and found issues before they were queued for upstream. I started posting patches in retaliation, and he kept NAKing them for needing improvements (which I've usually got around to) or being obsoleted by better work he did. Now we've got the rest of the team joining the party. While it has slowed things down a bit, it's also nice -- the internal TODO list of "someone committed some junk and I need to go fix it up when I get some time" is no longer growing out of control, and stability is definitely increasing.

The majority of the improvements in the last week have been in vblank handling. The vblank-rework changes had gone through a series of QA cycles before I merged them, but there were some issues that cropped up in integrating them with the GEM changes, and there were some plain old bugs we found when we started trying to use them on our desktops. We also fixed some VT switching bugs that would have hurt suspend/resume, and a couple more G4X issues.

My highest priority now is sorting out our failures with batchbuffers being too large. Our testcases up until now have had texture load below the size of the aperture. However, with more interesting apps like sauerbraten or Virtual Forbidden City, we're running into a problem where we accumulate a batchbuffer for execution that can't be loaded into the aperture all at once, and you get an error message and no rendering. Dave Airlie had fixed this in classic mode with his check_aperture changes, but we never did them for GEM, since figured we'd have the whole aperture available instead of just 32MB. But when a single mipmapped texture is 24MB, we run out of aperture quickly anyway. There are a few things we're planning on doing to resolve the problem:


  • Implement check_aperture on GEM so that we can flush the batch when it's likely going to be too big for the aperture. This will avoid having rendering dropped on the floor for being too big.
  • Fix counting of aperture space consumed in check_aperture. Right now we just sum up all the sizes of buffers targeted by relocations, but if you keep referencing the same big buffer over and over you'll flush too often.
  • Implement PPGTT support for new chipsets. This gives us a 2GB virtual address space for your batchbuffers to play in instead of 256 or 512MB. I'm trying to avoid saying "that'll be enough for anybody", but it'll certainly make a lot of apps happier. This'll be a bit of work, as we don't have a PCI aperture mapping to that address space, so we can't use some of our old tricks the same way. However, it should be a pretty significant win on any serious 3D workload.


We're also looking into getting an appropriate API into the kernel for our transient mappings of the aperture. One of the sticking points in getting GEM merged was a hack we were doing with the kernel mapping APIs on CONFIG_HIGHMEM x86. By actually sitting down and writing the API we need, we should get improved performance in PAT non-MTRR environments (like the G[M]45 where we don't get an MTRR slot), and improved performance on 64-bit where we couldn't do the CONFIG_HIGHMEM hack, for a 20% to 200% improvement depending on which case of failure occurred. By being in a kernel tree, we can submit a single patch to the kernel community showing the API we want and how we plan to use it, and get much better feedback than we've been able to in the past. In this case, Ingo came up with fun ideas for how we can get the advantages of our atomic mapping path on CONFIG_HIGHMEM x86 without the scheduling restrictions of actually being atomic, which would be awfully convenient for one of our code paths.

For those looking to run the latest hotness, here's the list:
kernel: drm-intel-next in my tree (still has some bugfixes to be merged)
libdrm: 2.4.0 (nothing major has happened since then)
xf86-video-intel: 2.5.0 (nothing major has happened since then)
dri2proto master
inputproto master
xserver: master (be sure to update your input drivers too!)
mesa: master

That's 2 things with version numbers on them compared to 2 weeks ago. The X server would be in the list too, but we missed that the glyph cache didn't make it into the 1.5 series, which is critical for 2D performance.



(15 comments) - (Post a new comment)

Nice work !
(Anonymous)
2008-10-22 01:49 pm UTC (link)
You guys do some really nice work. It's a pity Intel doesn't manufacture heavy discret graphics accelerators. Some cards people could buy and stick in their desktop. I'd buy one instantly, and I'm sure I'm not alone.

(Reply to this) (Thread)

Re: Nice work !
[info]kellyclowers
2008-10-22 10:04 pm UTC (link)
one word: larrabee

(Reply to this) (Parent)(Thread)

Re: Nice work !
(Anonymous)
2008-10-23 03:20 pm UTC (link)
I was talking about hardware, not vaporware.

(Reply to this) (Parent)

XVMC and documentation release
(Anonymous)
2008-10-22 09:04 pm UTC (link)
Is it possible to get an XVMC implementation that is not obfuscated? I mean the current implementation contains gibberish hex code and cannot be improved by anyone outside Intel.

Also, will Intel publish documentation covering chipsets newer than G950?

Thanks!

(Reply to this) (Thread)

Re: XVMC and documentation release
[info]anholt
2008-10-22 10:43 pm UTC (link)
If you mean the *.g4b in the 965 branch, that's the compiled output of the *.g4a and *.g4i, that we distribute with the code so that you don't have to install the assembler to build our driver. If you mean that *.g4a is too hard to understand, that's the actual assembly language used for the ISA. Sorry.

Also, Intel has published documentation for newer than the GMA 950 (aka 945). It's the Gen4 BSpec published on the website. It's the 950 and older chips that aren't documented.

(Reply to this) (Parent)(Thread)

Re: XVMC and documentation release
(Anonymous)
2008-10-23 01:08 am UTC (link)
Oh, I see. Thanks for the clarification about the source of the *.g4b and *.g4a files. Regarding the docs, I was referring to GMA X4500 and GMA 500, but Michael from Phoronix said Keith Packard is working to publish those.

Intel is by far the most FOSS-friendly graphics company -- keep up the great work!

(Reply to this) (Parent)

Maximum screen resolution
(Anonymous)
2008-10-23 06:44 pm UTC (link)
When will I be able to use my 24"-TFT with a resolution of 1920x1200 without disabling DRI or having a dead zone on my monitor that redraws everything I'm moving inside that zone?

It only happens when I'm exceeding the maximum of 2048x2048. I'm using a GM965 and I'd buy the new Dell Latitude with and integrated Intel-chipset, if it'd at least be possible in a next release.

Thank you. :)

(Reply to this)

I dunno about improving stability
(Anonymous)
2008-10-23 10:10 pm UTC (link)
I just upgraded to:
xf86-video-intel 2.5.0 and libdrm 2.4.0
(everything else stayed the same)
xorg-server 1.5.2, intel-dri 7.2, mesa 7.2, libgl 7.2, kernel 2.6.26.6
(BTW I use ArchLinux so most of these things are vanilla or very close to vanilla)

And now, when EXA is used and I try to get a dual-screen setup (xrandr --output VGA --mode 1024x768 --right-of LVDS) I get cloned output, but the X server thinks (and shows info) that it has dual screen.

Switching to XAA corrects this.. in other words.. EXA has been unusable for a long time on this driver.

(Reply to this) (Thread)

Re: I dunno about improving stability
[info]anholt
2008-10-24 03:27 am UTC (link)
I'm sorry EXA hasn't been working for you. Have you reported your bug?

(Reply to this) (Parent)(Thread)

Re: I dunno about improving stability
(Anonymous)
2008-10-24 01:41 pm UTC (link)
This is it :)

(Reply to this) (Parent)(Thread)

Re: I dunno about improving stability
[info]anholt
2008-10-24 02:18 pm UTC (link)
Blog comments are not bug reports. If you don't file it on bugzilla, it doesn't exist.

(Reply to this) (Parent)(Thread)

Re: I dunno about improving stability
(Anonymous)
2008-10-29 11:30 pm UTC (link)
I already have too much bugzilla acounts... but anyway.. what's the bugzilla for this driver.

(and I find it appaling that intel can't reproduce this on themselves but ..)

(Reply to this) (Parent)

Additional requirements
[info]hilbertschema
2008-10-24 02:03 pm UTC (link)
In addition to the entries mentioned above, xextproto, x11proto, libxtrans are needed from master to compile the xserver.

(Reply to this)

Some questions, how to test GEM
[info]cgbplbkbybr
2008-12-03 08:40 am UTC (link)
1.
My motherboard on iG35 chipset(GMA X3500)
Xorg version currently installed 1.4.0.90
I build latest stable versions libdrm, mesa and latest linux-2.6.28-rc7
All work(except compiz+XV), but when start any ogl-application, i see message «Failed to initialize GEM. Falling back to classic»
I look into mesa-dri code part intel_screen.c:

if (intelScreen->driScrnPriv->dri2.enabled)
gem_supported = GL_TRUE;
else if (intelScreen->driScrnPriv->ddx_version.minor >= 9 &&
gem_kernel &&
intelScreen->front.bo_handle != -1)
gem_supported = GL_TRUE;
else
gem_supported = GL_FALSE;

and add additional messages for debug, then found that problem with intelScreen->front.bo_handle - its value -1. What does this mean and what I need to do GEM work?

2.
Is there hope to see OpenGL 2.0 on this chipset(currently only 1.4)?

3.
I also have eeePC with GMA900 - do give GEM any advantages on such graphics?

(Reply to this) (Thread)

Re: Some questions, how to test GEM
(Anonymous)
2009-02-05 04:19 am UTC (link)
I found this:

http://lkml.org/lkml/2008/12/24/105

So if I understand correctly, if you have PAE enabled (which I do in my kernel, 2.6.18-gentoo-r1) GEM will be disabled.. This is quite annoying but I know Linus will make everything better.

(Reply to this) (Parent)


(15 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…