Bug 9261 - mga: Xinerama & EXA crashes on startup
Summary: mga: Xinerama & EXA crashes on startup
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/mga (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high critical
Assignee: Tilman Sauerbeck
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-06 06:40 UTC by Thomas Scheffler
Modified: 2018-06-12 19:06 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Log from version 1.4.5 debug enabled (37.23 KB, text/plain)
2006-12-06 08:27 UTC, Thomas Scheffler
no flags Details
Patch (822 bytes, patch)
2007-01-12 11:42 UTC, Tilman Sauerbeck
no flags Details | Splinter Review

Description Thomas Scheffler 2006-12-06 06:40:16 UTC
x11-drivers/xf86-video-mga in version 1.4.3, 1.4.4 or 1.4.5 does not work on my MGA
G550 AGP. I have to stay with 1.4.2 so far. System is Gentoo Linux 2006.1 on
Pentium IV (32 bit).

"lspci -v" for the card:
01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G550 AGP (rev 01)
(prog-if 00 [VGA])
        Subsystem: Matrox Graphics, Inc. Millennium G550 Dual Head DDR 32Mb
        Flags: bus master, medium devsel, latency 128, IRQ 16
        Memory at d0000000 (32-bit, prefetchable) [size=32M]
        Memory at f0800000 (32-bit, non-prefetchable) [size=16K]
        Memory at f0000000 (32-bit, non-prefetchable) [size=8M]
        [virtual] Expansion ROM at f0820000 [disabled] [size=128K]
        Capabilities: [dc] Power Management version 2
        Capabilities: [f0] AGP version 2.0

Here is what's in Xorg.0.log at the end:

(II) MGA(0): Splitting WC range: base: 0xd0000000, size: 0x1800000
(==) MGA(0): Write-combining range (0xd1000000,0x800000)
(==) MGA(0): Write-combining range (0xd0000000,0x1800000)
(II) MGA(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
(--) MGA(0): 16 DWORD fifo
(==) MGA(0): Default visual is TrueColor
(II) MGA(0): X 1280 Y 1024 bpp 32
(II) MGA(0): Start at 0x6d397000, size 17fec00, osb 501000
(==) MGA(0): Backing store disabled
(==) MGA(0): Silken mouse enabled
(**) Option "dpms"
(**) MGA(0): DPMS enabled
(II) MGA(0): Using overlay video
(==) RandR enabled
(==) MGA(1): Write-combining range (0xd1800000,0x800000)
(II) MGA(1): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
(--) MGA(1): 16 DWORD fifo
(II) MGA(1): X 1280 Y 1024 bpp 32
(II) MGA(1): Start at 0x6c383000, size 7ff000, osb 501000
(==) MGA(1): Backing store disabled
(==) MGA(1): Silken mouse enabled
(**) Option "dpms"
(**) MGA(1): DPMS enabled

Backtrace:
0: /usr/bin/X(xf86SigHandler+0x85) [0x80cb185]

Fatal server error:
Caught signal 11.  Server aborting

(II) Screen 0 shares mem & io resources
(II) Screen 1 shares mem & io resources
Comment 1 Daniel Stone 2006-12-06 07:49:59 UTC
could you please try compiling with fewer compiler flags (i note that you're
using -fomit-frame-pointer at least, which prevents useful backtraces) and see
if that makes a difference?
Comment 2 Thomas Scheffler 2006-12-06 08:27:38 UTC
Created attachment 7981 [details]
Log from version 1.4.5 debug enabled

CFLAGS used to compile: "-march=pentium4 -O2 -pipe"
gcc-Version 4.1.1 (Gentoo 4.1.1-r3)
Comment 3 Tilman Sauerbeck 2006-12-06 09:29:00 UTC
Does it work if you use XAA instead of EXA?

Recompiling xf86-video-mga with debugging symbols would be cool, otherwise that
backtrace is somewhat useless ;)
Comment 4 Thomas Scheffler 2006-12-06 13:48:44 UTC
OK here's my next shot, sorry I just get more info from X than from mga_drv.so.
Maybe you can give me a hint...
CFLAGS="-march=pentium4 -O2 -pipe -ggdb"
I added nostrip to FEATURES to keep debugging symbols an reemerged

=x11-base/xorg-server-1.1.1-r2 =x11-drivers/xf86-video-mga-1.4.5

All I got at the end of Xorg.0.log is this:

(II) MGA(1): X 1280 Y 1024 bpp 24
(II) MGA(1): Start at 0x6c435000, size 7ff000, osb 3c1000
(==) MGA(1): Backing store disabled
(==) MGA(1): Silken mouse enabled
(**) Option "dpms"
(**) MGA(1): DPMS enabled

Backtrace:
0: /usr/bin/X(xf86SigHandler+0x81) [0x80cb06c]
1: [0xffffe420]
2: /usr/lib/xorg/modules/drivers/mga_drv.so [0x6fcda1f2]
3: /usr/lib/xorg/modules/drivers/mga_drv.so [0x6fcc9632]
4: /usr/lib/xorg/modules/drivers/mga_drv.so [0x6fcca5e8]
5: /usr/bin/X(AddScreen+0x1e5) [0x806dccd]
6: /usr/bin/X(InitOutput+0x221) [0x809d707]
7: /usr/bin/X(main+0x277) [0x806e47b]
8: /lib/libc.so.6(__libc_start_main+0xe3) [0x6fd62873]

Fatal server error:
Caught signal 11.  Server aborting

(II) Screen 0 shares mem & io resources
(II) Screen 1 shares mem & io resources


Version 1.4.5 does indeed work when using XAA instead of EXA, so this maybe
another hint.
Comment 5 Tilman Sauerbeck 2006-12-07 04:17:37 UTC
Does EXA work if you disable Xinerama/MergedFB?
Comment 6 Thomas Scheffler 2006-12-07 06:34:50 UTC
Nope if I disable Xinerama and enable EXA I get a black screen. I have do login
from remote to kill X (kill -9) to get back to console again. But I don't notice
any error message in Xorg.0.log.
Comment 7 Tilman Sauerbeck 2006-12-07 09:26:25 UTC
Since I cannot reproduce this, getting a usable backtrace would really help.
Or you could use git-bisect to find out which commit introduced the problem.
Comment 8 Tilman Sauerbeck 2006-12-25 15:23:12 UTC
I can reproduce this with an G450 dual VGA.
Comment 9 Tilman Sauerbeck 2006-12-25 15:57:31 UTC
Using EXA on the first head and XAA on the second works. Enabling EXA on the
second head, too, makes the driver crash.

The driver seems to call into the XAA code in mga_storm.c and crashes there
because pMga->AtypeNoBLK is still NULL.
Comment 10 Tilman Sauerbeck 2007-01-12 11:42:16 UTC
Created attachment 8384 [details] [review]
Patch

This might fix the crash, I didn't test it though.
Comment 11 Thomas Scheffler 2007-01-25 04:51:42 UTC
(In reply to comment #10)
> Created an attachment (id=8384) [details]
> Patch
> 
> This might fix the crash, I didn't test it though.

Tried it against version 1.4.6.1 and it resolved the crash. But when X starts the second monitor behaves strange. A lot of noise is produced on both monitors by applications running on the second. It is simply enough to move the mouse cursor over the second screen. It will leave artifacts. Disable EXA is the only possibility for the moment though.
Comment 12 Daniel Stone 2007-02-27 01:35:01 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 13 Adam Jackson 2018-06-12 19:06:22 UTC
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.


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.