Summary: | mga/G450: Driver segfaults during startup when using MergedFB | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Stefan Dirsch <sndirsch> | ||||||
Component: | Driver/mga | Assignee: | Tilman Sauerbeck <tilman> | ||||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||
Severity: | normal | ||||||||
Priority: | medium | CC: | eich, idr, mat | ||||||
Version: | git | ||||||||
Hardware: | Other | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
i915 platform: | i915 features: | ||||||||
Attachments: |
|
Description
Stefan Dirsch
2009-04-02 19:16:49 UTC
Well, reverting the patch isn't that easy any longer, since new elements for memory probing have been added to struct mga_device_attributes meanwhile. So a proper fix would be appreciated. Unfortunately I can't figure out the bugzilla account of Ian Romanick. In case nobody can still remember how to configure MergedFB with mga driver. Just as an example. Section "Device" BoardName "G450 DH G450" BusID "2:0:0" Driver "mga" Identifier "Device[0]" Option "MergedFB" Option "Monitor2HSync" "30-80" Option "MetaModes" "1280x1024-1280x1024" Option "Monitor2Position" "LeftOf" Option "Monitor2VRefresh" "59-75" Screen 0 VendorName "Matrox" EndSection I'm attaching the HAL patch I'm using and the HALlib itself. HALlib needs to be extracted in src/. This command line is required to link mgahal module after building the driver: gcc -m32 \ -o /usr/lib/xorg/modules/drivers/mgahal_drv.so \ -shared \ .libs/mga_halmod.o .libs/clientlx.o HALlib/mgaHALlib.a \ -Wl,-Bstatic -Wl,-Bdynamic Created attachment 24484 [details] [review] xf86-video-mga-hal.diff HAL patch Created attachment 24485 [details]
HALlib-4.1.tar.gz
HAL library.
I just committed a patch, which works for me. commit 32bc0bcec815a363a47b9e7337d06370baf0c0d4 Author: Stefan Dirsch <sndirsch@suse.de> Date: Thu Apr 16 15:34:12 2009 +0200 Prevent MergedFB setups from crashing. Second time mga_read_and_process_bios() is called pMga->chip_attribs is a NULL pointer for some reason. (#21022) diff --git a/src/mga_bios.c b/src/mga_bios.c index b78890e..c015077 100644 --- a/src/mga_bios.c +++ b/src/mga_bios.c @@ -326,8 +326,9 @@ Bool mga_read_and_process_bios( ScrnInfoPtr pScrn ) * isn't found or can't be read we'll still have some reasonable values * to use. */ - (void) memcpy(& pMga->bios, & pMga->chip_attribs->default_bios_values, - sizeof(struct mga_bios_values)); + if (pMga->chip_attribs) + (void) memcpy(& pMga->bios, & pMga->chip_attribs->default_bios_values, + sizeof(struct mga_bios_values)); /* If the BIOS address was probed, it was found from the PCI config space |
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.