Bug 17486 - [GEM EXA]regression compiz-fusion 0.7.x broken on GM965
Summary: [GEM EXA]regression compiz-fusion 0.7.x broken on GM965
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.3 (2007.09)
Hardware: x86 (IA32) Linux (All)
: high major
Assignee: Eric Anholt
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks: 17233 intel-mesa-blocker
  Show dependency treegraph
 
Reported: 2008-09-08 11:12 UTC by Tobias Hain
Modified: 2008-09-17 05:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log with EXA after running compiz-fusion (21.31 KB, text/plain)
2008-09-08 11:12 UTC, Tobias Hain
no flags Details
a more recent Xorg.0.log (30.23 KB, text/plain)
2008-09-16 07:23 UTC, Tobias Hain
no flags Details

Description Tobias Hain 2008-09-08 11:12:58 UTC
Created attachment 18746 [details]
Xorg.0.log with EXA after running compiz-fusion

System : Dell XPS M1330
Chipset: GM965 with 2 * 1GB memory in dual channel configuration
OS : Ubuntu 8.04.1 in 32-Bit

tested with git tip components of 09/08/2008:
libdrm: (master)2880c86eb246aceeb5c750e27259a7b6d8897328
mesa 3d: (master)11d694b1bb0cb384d802d7e0e252cf5119febb98
xserver: (master)2db1afbf2e56d8743c701d81a5797001ce9e5c52
xf86-video-intel: (master)b9ef0ed7d7b96eca6394cd0d367369ec511d1bcd
gem kernel (eric's 2.6.27-rc4)1063ef90845d7c84f4799ac34bd23ef37860bdc0
http://cgit.freedesktop.org/~anholt/linux-2.6/commit/?h=drm-gem-merge&id=1063ef90845d7c84f4799ac34bd23ef37860bdc0
compiz-fusion: 0.7.4-0ubuntu7 (the compiz-kde module for kde 3.5.9 requires compiz-fusion 0.7.4 and doesn't allow me to easily switch to a more recent compiz version such as 0.7.6)

Running compiz freezes the desktop. The mouse point can still be moved, but nothing selected or changed. The GUI looks frozen, but the machine didn't crash (e.g. can connect to it via ssh). The only suspicious event written to Xorg.0.log at the moment when running compiz:

exaCopyDirty: Pending damage region empty!

With Non-GEM intel driver and xserver, mesa, libdrm versions of Ubuntu 8.04.1  compiz-fusion works fine and this message is not written to Xorg.0.log. I've never seen compiz-fusion working with GEM and EXA. But I have seen it working with GEM + UXA, however at the moment that one breaks in a similar way.

Everything else looks fine:
Checking for Xgl: not present.
xset q doesn't reveal the location of the log file. Using fallback /var/log/Xorg.0.log
Detected PCI ID for VGA: 00:02.0 0300: 8086:2a02 (rev 0c) (prog-if 00 [VGA controller])
Checking for texture_from_pixmap: not present.
Trying again with indirect rendering:
Checking for texture_from_pixmap: present.
Checking for non power of two support: present.
Checking for Composite extension: present.
Comparing resolution (1280x800) to maximum 3D texture size (2048): Passed.
Checking for nVidia: not present.
Checking for FBConfig: present.
Checking for Xgl: not present.
/usr/bin/compiz.real (video) - Warn: No 8 bit GLX pixmap format, disabling YV12 image format
Comment 1 Gordon Jin 2008-09-09 07:01:41 UTC
Shuang, have you seen this issue?
Comment 2 liuhaien 2008-09-10 19:48:11 UTC
(In reply to comment #1)
> Shuang, have you seen this issue?
> 

(In reply to comment #1)
> Shuang, have you seen this issue?
> 

yes ,it also happens on our gm965.
Comment 3 Tobias Hain 2008-09-11 05:23:03 UTC
I have seen this message

exaCopyDirty: Pending damage region empty!

also on compiz working environments (TTM based ones) and also on non-compositing environments (GEM based). Therefore I assume this message is unrelated. Unfortunately I don't see any suspicious other debugging information.
Comment 4 Eric Anholt 2008-09-15 15:33:12 UTC
It's working nicely now on my systems with GEM and UXA and DRI2.  Marking this as a blocker, though, since we want to make sure the EXA case is working as well.
Comment 5 Tobias Hain 2008-09-16 07:21:22 UTC
I updated all libdrm, mesa, xserver, 2d intel drivers, but EXA compiz still breaks.

One thing I noticed on GM965 is that glxinfo fell recently back to the Software Rasterizer and I have no clue why:

OpenGL vendor string: Mesa Project
OpenGL renderer string: Software Rasterizer
OpenGL version string: 2.1 Mesa 7.3-devel

instead of prior:

OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) 965GM 20061102 x86/MMX/SSE2
OpenGL version string: 1.4 Mesa 7.1

I tested (master) and (intel-2008-q3) branch. Xorg looks like AIGLX is fine with accelerated support:

(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
(II) AIGLX: enabled GLX_texture_from_pixmap with driver support
(II) AIGLX: Loaded and initialized /opt/gfx-test/lib/dri/i965_dri.so
(II) GLX: Initialized DRI GL provider for screen 0

I'm attaching up-to-date EXA Xorg.0.log.

--

The UXA side behaves similar. Running a DRI2 enabled git tip xserver and (dri2) branch 2d driver with tiling disabled on GM965 I can get Xorg to fly. The first thing I noticed is that screen updates are extremely slow. Looks like no 2d accel in place. Checking Xorg.log reveals:

(II) UXA(0): Driver registered support for the following operations:
(II)         solid
(II)         copy

instead of

(II) EXA(0): Driver registered support for the following operations:
(II)         Solid
(II)         Copy
(II)         Composite (RENDER acceleration)

Also mesa software rasterizer is in place and starting compiz crashes X. At least here (in contrast to the EXA case) I can a crash stack trace in Xorg:

Backtrace:
0: /opt/gfx-test/bin/Xorg(xf86SigHandler+0x79) [0x80b7279]
1: [0xb7fdc400]
2: /opt/gfx-test/lib/dri/i965_dri.so(intel_batchbuffer_reset+0x66) [0xa76906a6]
3: /opt/gfx-test/lib/dri/i965_dri.so(intel_batchbuffer_alloc+0x3a) [0xa7690bfa]
4: /opt/gfx-test/lib/dri/i965_dri.so(intelInitContext+0x436) [0xa7696846]
5: /opt/gfx-test/lib/dri/i965_dri.so(brwCreateContext+0x75) [0xa76bae15]
6: /opt/gfx-test/lib/dri/i965_dri.so [0xa769e44e]
7: /opt/gfx-test/lib/dri/i965_dri.so [0xa768c9e0]
8: /opt/gfx-test/lib/dri/i965_dri.so [0xa768ca76]
9: /opt/gfx-test/lib/xorg/modules/extensions//libglx.so [0xb7b25acc]
10: /opt/gfx-test/lib/xorg/modules/extensions//libglx.so [0xb7b187d4]
11: /opt/gfx-test/lib/xorg/modules/extensions//libglx.so [0xb7b18aa7]
12: /opt/gfx-test/lib/xorg/modules/extensions//libglx.so [0xb7b1ac0a]
13: /opt/gfx-test/bin/Xorg(Dispatch+0x33f) [0x808ccdf]
14: /opt/gfx-test/bin/Xorg(main+0x3ed) [0x807147d]
15: /lib/libc.so.6(__libc_start_main+0xe5) [0xb7c0c685]
16: /opt/gfx-test/bin/Xorg [0x8070901]
Comment 6 Tobias Hain 2008-09-16 07:23:00 UTC
Created attachment 18923 [details]
a more recent Xorg.0.log
Comment 7 Tobias Hain 2008-09-16 07:56:47 UTC
There's one interesting assertion failing in the EXA + (intel-2008-q3) drm case when launching compiz:

Xorg: intel_regions.c:514: intel_recreate_static: Assertion `region->buffer != ((void *)0)' failed.
Comment 8 Tobias Hain 2008-09-16 15:11:06 UTC
more observations:

export LIBGL_ALWAYS_INDIRECT=TRUE
results in glxinfo always display the accelerated Mesa DRI Intel(R) 965GM. It still confuses me since glxinfo did display acclerated Mesa at some former git commit and also on a Ubuntu Intrepid 8.10 install with Mesa 7.1.

Having the above export in place the crashes and error messages are reproducable. And even not only when starting compiz, but also when just starting glxgears (!!).

That means EXA will crash with the above assertion fail with both mesa (master) and (intel-2008-q3) branch.

The UXA case with a intel 2d driver from (dri2) branch will crash with the given stack trace.
Comment 9 Eric Anholt 2008-09-16 17:25:59 UTC
The issue in the final comments is fixed with commit 904f31a62444d9f7e9b12ddafaa4beeb7fed6dfa.

compiz with EXA is now working fine on my GM965 system.
Comment 10 Tobias Hain 2008-09-17 05:22:27 UTC
Although bug has been closed, I'd still like to do some remarks:

EXA case:
---------
Yes compiz works. I'm seeing this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=17233

It's not entirely stable. Working a while with compiz may result in screen freeze: Mouse can still be moved, but nothing selected. The machine can be connected to by means of SSH, but no log reveals anything suspicious. It's just hard to file a good new bugreport if there are no error message or crash log.

UXA + DRI2 case:
----------------
Works as well. I'm even not seing above bug#17233. However very few icons are distorted and refresh areas are calculated wrong. That means when moving windows certain areas keep a partial window image instead of restoring background information. Some composition seems to not work.

Frequent crashes such as:
Backtrace:
0: /opt/gfx-test/bin/Xorg(xf86SigHandler+0x79) [0x80b7279]
1: [0xb8016400]
2: /lib/libc.so.6(__libc_calloc+0xf5) [0xb7c9fd55]
3: /opt/gfx-test/lib/dri/i965_dri.so [0xa76d674d]
4: /opt/gfx-test/lib/dri/i965_dri.so(intel_miptree_create_for_region+0x4d) [0xa76d688d]
5: /opt/gfx-test/lib/dri/i965_dri.so(intelSetTexBuffer+0xbe) [0xa76ea9ae]
6: /opt/gfx-test/lib/xorg/modules/extensions//libglx.so [0xb7b5f93d]
7: /opt/gfx-test/lib/xorg/modules/extensions//libglx.so [0xb7b51148]
8: /opt/gfx-test/lib/xorg/modules/extensions//libglx.so [0xb7b50017]
9: /opt/gfx-test/lib/xorg/modules/extensions//libglx.so [0xb7b54c0a]
10: /opt/gfx-test/bin/Xorg(Dispatch+0x33f) [0x808ccdf]
11: /opt/gfx-test/bin/Xorg(main+0x3ed) [0x807147d]
12: /lib/libc.so.6(__libc_start_main+0xe5) [0xb7c46685]
13: /opt/gfx-test/bin/Xorg [0x8070901]

Performance:
------------
I don't expect GEM to be faster than TTM at this time. However these are my observations on a T7500 @2,2GHz and DDR2-667 DualChannel:

glxgears:
EXA + TTM + tiling : 725 fps
EXA + TTM + no tiling : 575 fps
EXA + GEM + tiling : 200 fps
UXA + DRI2 + no tiling : 30 fps

I'm still confused why glxinfo displays Software Rasterizer without export LIBGL_ALWAYS_INDIRECT=TRUE. This behavior was different before.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.