1 |
On Thu, 2 Apr 2009 22:19:17 +0200 |
2 |
Pongrácz István <pongracz.istvan@×××××.com> wrote: |
3 |
|
4 |
> Could you explain this GEM technology a little bit more? |
5 |
> I installed gentoo-sources-2.6.29 + lates (2.6.3) intel driver, but I get |
6 |
> half performance than with 2.5.x intel driver. |
7 |
|
8 |
|
9 |
AFAIK you need a fairly recent xorg-server and mesa to use GEM. |
10 |
That's not a problem for me, since I use ebuilds from x11 overlay, but |
11 |
since 2.6.29 kernel hit the main tree already, I suppose all the |
12 |
xorg-related stuff should be sufficiently new, but probably still |
13 |
marked as ~arch. |
14 |
|
15 |
I have the following userspace: |
16 |
x11-base/xorg-server-1.6.0 |
17 |
media-libs/mesa-9999 |
18 |
x11-libs/libdrm-9999 |
19 |
x11-drivers/xf86-video-intel-2.6.99.902 |
20 |
|
21 |
As you can see mesa and libdrm are live ebuilds, but from my experience |
22 |
they are fairly stable. Still prehaps it's best to stick to the main |
23 |
tree if it'll suffice. |
24 |
|
25 |
|
26 |
Then there are some settings. |
27 |
|
28 |
First of all, it's "i915 DRM" kernel setting. I've tried to make it |
29 |
work with kernel modesetting in 29, but sometimes it gives me a black |
30 |
screen on X start, so I don't use it. |
31 |
Check that dri use flag is enabled, but that should be fairly obvious. |
32 |
I have nptl flag enabled too, but dunno if it's related. |
33 |
|
34 |
Then, there's xorg.conf. Mine looks like this (only relevant sections): |
35 |
|
36 |
|
37 |
Section "Module" |
38 |
Load "glx" |
39 |
Load "extmod" |
40 |
Load "record" |
41 |
Load "dbe" |
42 |
Load "dri" |
43 |
Load "xtrap" |
44 |
Load "freetype" |
45 |
EndSection |
46 |
|
47 |
|
48 |
Section "ServerFlags" |
49 |
Option "AIGLX" "True" |
50 |
EndSection |
51 |
|
52 |
Section "Extensions" |
53 |
Option "Composite" "Enable" |
54 |
Option "RENDER" "Enable" |
55 |
EndSection |
56 |
|
57 |
Section "DRI" |
58 |
Mode 0666 |
59 |
EndSection |
60 |
|
61 |
|
62 |
Section "Device" |
63 |
Identifier "IGP" |
64 |
Driver "intel" |
65 |
VendorName "Intel Corporation" |
66 |
BoardName "Mobile GM965/GL960 Integrated Graphics Controller" |
67 |
BusID "PCI:0:2:0" |
68 |
Option "DRI" "true |
69 |
Option "AccelMethod" "EXA" # UXA |
70 |
EndSection |
71 |
|
72 |
|
73 |
I'd suggest trying at least AIGLX flag and DRI / AccelMethod in device |
74 |
(I've seen suggestions to choose UXA method for it's quality at the |
75 |
cost of reduced performance, but never tried myself). |
76 |
|
77 |
With that I get about 60 FPS, but that seems to be expected behavior - |
78 |
you also need to set up dri for more. |
79 |
|
80 |
|
81 |
I've used x11-misc/driconf for setting up .drirc (which I've also |
82 |
copied to /etc/drirc, but that's probably unnecessary for single-user |
83 |
system). |
84 |
|
85 |
In my case, it looks like this: |
86 |
|
87 |
<driconf> |
88 |
<device screen="0" driver="i915"> |
89 |
<application name="Default"> |
90 |
<option name="force_s3tc_enable" value="false" /> |
91 |
<option name="no_rast" value="false" /> |
92 |
<option name="fthrottle_mode" value="2" /> |
93 |
<option name="bo_reuse" value="1" /> |
94 |
<option name="vblank_mode" value="0" /> |
95 |
<option name="allow_large_textures" value="2" /> |
96 |
</application> |
97 |
</device> |
98 |
<device screen="0" driver="i965"> |
99 |
<application name="Default"> |
100 |
<option name="force_s3tc_enable" value="false" /> |
101 |
<option name="no_rast" value="false" /> |
102 |
<option name="fthrottle_mode" value="2" /> |
103 |
<option name="always_flush_cache" value="false" /> |
104 |
<option name="always_flush_batch" value="false" /> |
105 |
<option name="bo_reuse" value="1" /> |
106 |
<option name="vblank_mode" value="0" /> |
107 |
<option name="allow_large_textures" value="2" /> |
108 |
</application> |
109 |
</device> |
110 |
</driconf> |
111 |
|
112 |
|
113 |
And that's probably all I did to set it up, but I might miss something |
114 |
out, because of unreliable memory. |
115 |
The setup works for both 28 and 29 kernels, giving fairly good |
116 |
performance for both native and wine OpenGL games. Before that, |
117 |
'software' rendering options yielded better results. |
118 |
|
119 |
Hope that helps. |
120 |
I didn't really went into low-level specifics of "how it all works" |
121 |
myself, but planning to examine the topic a bit more closely, someday. |
122 |
|
123 |
-- |
124 |
Mike Kazantsev // fraggod.net |