Bug 10742 - xf86-video-glint crash during load because of endian problem
Summary: xf86-video-glint crash during load because of endian problem
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/glint (show other bugs)
Version: git
Hardware: Other All
: medium critical
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-24 10:26 UTC by Brice Goglin
Modified: 2009-06-04 10:38 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Brice Goglin 2007-04-24 10:26:30 UTC
Christian Tusche reported this bug to the Debian BTS today. He's using the xf86-video-glint driver 1.1.1 (1:1.1.1-3 in Debian) on a Sparc machine (and thinks the bug might also occur on PPC).

System configuration:
Sun Ultra60 with Raptor GFX graphic card (Permedia2v chipset)
running etch with a 2.6.20 kernel.
The problem also existed in Xorg 7.0.

Problem:
The Xserver hangs or crashes when loading the driver. As from the logfile, the card is wrongly detected, e.g. 4MB video ram instead 
of 8MB.

Reason:
The driver correctly writes to the big-endian registers of the card, but the 
MMIO_xxxx functions do a byte-swap by default on this architecture, ending up 
in a wrong byte-order. For reference, see "compiler.h" from the "xorg-server" 
source.

Solution:
Define "SPARC_MMIO_IS_BE" for compiling the glint driver.
E.g., by:
# CFLAGS="-O2 -DSPARC_MMIO_IS_BE" ./configure
(maybe on PPC_MMIO_IS_BE has to be defined on PPC architecture)

I suggest setting these defines in the source code in "config.h".
Comment 1 Matthieu Herrb 2009-06-04 10:38:47 UTC
Fixed in commit 1b36ca0c453191e4837cea25794731b166df19f7


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.